• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » SAP RFC_READ_TABLE Length of Selection Criteria

#1 2011-06-03 15:23:48

digitah
New member
Registered: 2011-06-02
Posts: 1

SAP RFC_READ_TABLE Length of Selection Criteria

I have a list of 1,000+ profit centers contained in a regularly updated file. One of my requirements is to retrieve project information from SAP only where the profit center is a member of that list. I am using RFC_READ_TABLE to retrieve data from the SAP table. My job looks like this so far:

tJava --> tSAPInput --> tFileOutputDelimited

In tJava, I read the file and build the selection criteria string, which looks like "PRCTR = '12345' OR PRCTR = '98765' OR...". I set a context variable to that selection criteria. tSAPInput has its "OPTIONS" table ParameterValue set to context.ProfitCenterCriteria.

After many failures and head scratching I figured out that this method works, until the context variable length grows beyond a certain point. The "OPTIONS" table in RFC_READ_TABLE accepts a string of about 72 characters per row. You must split a single long statement amoung multiple rows. I can't figure out how to split the profit center selection criteria context variable into a form that the "OPTIONS" table will accept. I tried inserting commas in the string where the string should split between rows. I tried inserting line breaks. Nothing works. Is there a way to tell TOS that this string should be divided into multiple table rows?

Just to be clear, if I were to hard code the selection criteria directly in the tSAPInput component it would look like this:
"PRCTR = '12345' OR PRCTR = '98765'", "OR PRCTR = '13335' OR PRCTR = '98885'"

That works because TOS recognizes the comma as a new row. A variable that contains this: ""PRCTR = '12345' OR PRCTR = '98765' OR PRCTR = '13335' OR PRCTR = '98885'" does not work, because it is not being split into multiple rows.

Offline

#2 2011-06-04 02:09:15

JohnGarrettMartin
Member
Registered: 2009-01-07
Posts: 762

Re: SAP RFC_READ_TABLE Length of Selection Criteria

you might have a better time by trying to modify the component to do what you want--

take a look at the generated code to see exactly what the issue is, and if you find a problem, look here:

$TALEND_HOME/plugins/org.talend.designer.components.localprovider/components/tSAPInput

Talend components use jet to generate code; look at the begin, main and end .javajet files.

Offline

#3 2012-01-21 11:57:11

Foldi Tamas
Member
Company: Starschema Ltd
Registered: 2010-05-19
Posts: 28
Website

Re: SAP RFC_READ_TABLE Length of Selection Criteria

I suggest to use tPLSAPInput free component from Talend Exchange (http://talendforge.org/exchange/index.p … ction=view). It has a built in method to split long WHERE conditions into smaller pieces to set properly the OPTIONS table TEXT field.


Uploaded Images

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » SAP RFC_READ_TABLE Length of Selection Criteria

Board footer

Powered by FluxBB