on 09-10-2014 1:12 PM
Hi,
I am trying to use the tSAPInput component with RFC_READ_TABLE function to extract data from multiple SAP tables. I have started with SFLIGHT as a very basic & small table, where I want to extract only a couple of columns.
The Input - FIELDNAME I have defined without issue, but for the output schema I receive errors when trying to define the columns that I require. If I use the default of "WA" then it works, but many of the tables that I want to extract are wider than the 512 characters of WA schema definition.
Therefore I have created my own schema and columns in the
output, but I receive the following error:
Starting job SAP_Test at 11:25 10/09/2014.
[statistics] connecting to socket on port 3932
[statistics] connected
Exception in component tSAPInput_3
com.sap.conn.jco.JCoRuntimeException: (127)
JCO_ERROR_FIELD_NOT_FOUND: Field MANDT is not a member of TAB512
at com.sap.conn.jco.rt.AbstractMetaData.indexOf(AbstractMetaData.java:404)
at com.sap.conn.jco.rt.AbstractRecord.getString(AbstractRecord.java:2870)
at sap_connector.sap_test_0_1.SAP_Test.tSAPInput_3Process(SAP_Test.java:959)
at sap_connector.sap_test_0_1.SAP_Test.tSAPConnection_1Process(SAP_Test.java:398)
at sap_connector.sap_test_0_1.SAP_Test.runJobInTOS(SAP_Test.java:1315)
at sap_connector.sap_test_0_1.SAP_Test.main(SAP_Test.java:1174)
[statistics] disconnected
job SAP_Test ended at 11:25 10/09/2014. [exit code=1]
Attached is a screenshot of the job and components:
Any help would be much appreciated.
Thanks
Bri
Hi Brian,
I hope it's not too late
First, you can see in the function "RFC_READ_TABLE" the system return this structure "WA", so you can't change it in the tSAPinput.
And second the limit of 512 characters was done by SAP.
So I created another function "ZRFC_READ_TABLE" like explain here. KB #0007 [rfcconnector.com]
Procedure
SE37
to copy the module RFC_READ_TABLE
to a custom name, for example ZRFC_READ_TABLE
SE11
to copy the structure TAB512
to a custom name, for example ZTAB4096
WA
member of ZTAB4096
to component type CHAR
with length 4096
ZRFC_READ_TABLE
and change the type of the TABLES
parameter DATA
to ZTAB4096
Resgards,
Xavier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
an approach with RFC_READ_TABLE or similar ones should be avoided. They access tables directly without adhereing application specific authority checks. Therefore, when you anyway need to create a remote enabled function module as there is not a fitting one in the standard, create a use case specific one, think about required authorization checks and call this dedicated funtion module instead.
Best regards,
Markus
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.