cancel
Showing results for 
Search instead for 
Did you mean: 

tSAPInput Talend - Output schema definition error

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member215526
Active Participant
0 Kudos

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

  1. Use transaction SE37 to copy the module RFC_READ_TABLE to a custom name, for example ZRFC_READ_TABLE
  2. Use transaction SE11 to copy the structure TAB512 to a custom name, for example ZTAB4096
  3. Modify the WA member of ZTAB4096 to component type CHAR with length 4096
  4. Save and activate the new structure with Ctrl+F3
  5. Open the newly created ZRFC_READ_TABLE and change the type of the TABLES parameter DATA to ZTAB4096

Resgards,

Xavier

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

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