Menu

Home

Welcome to my small project sap2csv

This project provides a tool to access SAP JCo API to Query any SAP Table, then generate a csv file with the content of that table.

You can watch a quick video on how to use the tool here: https://www.linkedin.com/hp/update/6261247904141320192

You need to obtain the SAP connector from SAP(for registered customers and partners).

Linux: Get sapjco3.jar and libsapjco3.so
Windows: Get sapjco3.jar and sapjco3.dll

On Linux:
1- Create a new directory(e.g. sapTables) and subdirectory called lib. Under lib, copy sapjco3.jar.
2- Copy libsapjco3.so under your jre/lib subdirectory. For my Linux server with OpenJDK 1.7, location is: /etc/alternatives/java_sdk_1.7.0/jre/lib/amd64/libsapjco3.so
3- Copy .java and .jar under your directory(e.g. sapTables)
4- To compile on Linux, use: javac -cp ./lib/sapjco3.jar sap2csv.java
5- To execute on Linux, use: java -cp ./lib/sapjco3.jar:./sap2csv.jar sap2csv 800 EN 00 192.168.2.33 USER10 password V_USERNAME

N.B. If you try to execute the tool without providing the 7 mandatory arguments, it will output usage information:

java -cp ./lib/sapjco3.jar:./sap2csv.jar sap2csv
Arg length = 0
sap2csv by Michel Bluteau https://sourceforge.net/projects/sap2csv/
sap2csv Usage
java -cp ./lib/sapjco3.jar:. sap2csv JCO_CLIENT JCO_LANG JCO_SYSNR JCO_ASHOST JCO_USER JCO_PASSWD tablename
java -cp ./lib/sapjco3.jar:. sap2csv 800 EN 00 207.188.73.69 USER10 password V_USERNAME

The SAP user that you need to be able to query the SAP tables via BAPI function RFC_READ_TABLE are:
- SAP_ALL Profile
N.B. The permissions can be more granular, but for a test environment, SAP_ALL will at least confirm that with the right permissions, the tool is working for you.


Interesting Tables for HCM/HR: PA000, IT0001
for ECC Accounts and Groups: V_USERNAME, USR01, USGRP
for ECC Profiles: AGR_PROF, UST10S_ProfAuth, UST10C_CompositeProf, UST04_UserProfiles
for ECC Roles: AGR_TCODES, AGR_USERS, AGR_AGRS_CompositeRoles
for SAP GRC: GRACFUNCACT, GRACFUNCT , GRACFUNC

                         You can google for additional tables

Project Members:


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.