cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Records from SAP R3 table to XI via RFC - strange error

Former Member
0 Kudos

Hi all

Using RFC to send multiple records from a SAP R3 table to an XI file only sends the first record however the payload on the sender seems to have all the records filled in.

Any ideas on how to fix this ( -- it might not be possible to use RFC anyway as remore function calls don't like TABLES parameters).

If the data has to be saved as a file before sending to XI it rather loses the whole point of using the XI system.

All the examples / posts / blogs I see on pushing data from R3 to XI seem to use either Files or IDOCS on the R3 side or when using an RFC seem to transfer a SINGLE record.

I'm basically reading a load of sales orders, adding some extra stuff and creating an XML file which will later be processed on the server,

for example Receiver Grouping Payload from the log contains 3 records as shown below

:


  <?xml version="1.0" encoding="UTF-8" ?> 
- <rfc:Z_XI_003_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <IT_CUSTOMER_INFO_2>
- <item>
  <CUSTOMERID>100000</CUSTOMERID> 
  <COMPANY>Eldiano Trading Co. Ltd.</COMPANY> 
  <SHORT_NAME>BIOSTAR</SHORT_NAME> 
  <STREET>240, Arch. Makariou III</STREET> 
  <STREET2 /> 
  <STREET3 /> 
  <STREET4 /> 
  <POSTCODE /> 
  <CITY>Limassol</CITY> 
  <COUNTRY>Cyprus</COUNTRY> 
  <PO_BOX /> 
  <PO_BOX_PO_CODE /> 
  <PO_BOX_CITY /> 
  <TEL_NUMBER /> 
  <TELEX /> 
  <FAX_NUMBER /> 
  <CURRENCY /> 
  <LANG>E</LANG> 
  <SMTP_ADDR /> 
  <STATE /> 
  <ABCCODE /> 
  <REGION /> 
  <PAYTERM /> 
  <CORPORATE>N</CORPORATE> 
  <INDAGENT>N</INDAGENT> 
  <AGENT /> 
  <LANDA>CY</LANDA> 
  <ZTERM /> 
  <REGIO /> 
  <SALESMAN1 /> 
  <ACCT_ASS_GRP /> 
  <HKUNNR>60000</HKUNNR> 
  <SALES_REGION /> 
  </item>
- <item>
  <CUSTOMERID>100001</CUSTOMERID> 
  <COMPANY>Slaully Tiekimo Base</COMPANY> 
  <SHORT_NAME>BIOSTAR</SHORT_NAME> 
  <STREET>SA 0017 Ul. Bielsklo 30A</STREET> 
  <STREET2 /> 
  <STREET3 /> 
  <STREET4 /> 
  <POSTCODE /> 
  <CITY>Siaullai</CITY> 
  <COUNTRY>Lithuania</COUNTRY> 
  <PO_BOX /> 
  <PO_BOX_PO_CODE /> 
  <PO_BOX_CITY /> 
  <TEL_NUMBER /> 
  <TELEX /> 
  <FAX_NUMBER /> 
  <CURRENCY /> 
  <LANG>E</LANG> 
  <SMTP_ADDR /> 
  <STATE /> 
  <ABCCODE /> 
  <REGION /> 
  <PAYTERM /> 
  <CORPORATE>N</CORPORATE> 
  <INDAGENT>N</INDAGENT> 
  <AGENT /> 
  <LANDA>LT</LANDA> 
  <ZTERM /> 
  <REGIO /> 
  <SALESMAN1 /> 
  <ACCT_ASS_GRP /> 
  <HKUNNR>60000</HKUNNR> 
  <SALES_REGION /> 
  </item>
- <item>
  <CUSTOMERID>100002</CUSTOMERID> 
  <COMPANY>ADM EUROPOORT</COMPANY> 
  <SHORT_NAME>ADMEUROPOO</SHORT_NAME> 
  <STREET>ELBEWEG 125</STREET> 
  <STREET2 /> 
  <STREET3 /> 
  <STREET4 /> 
  <POSTCODE>3198 LC</POSTCODE> 
  <CITY>EUROPOORT</CITY> 
  <COUNTRY>Netherlands</COUNTRY> 
  <PO_BOX /> 
  <PO_BOX_PO_CODE /> 
  <PO_BOX_CITY /> 
  <TEL_NUMBER /> 
  <TELEX /> 
  <FAX_NUMBER /> 
  <CURRENCY /> 
  <LANG>N</LANG> 
  <SMTP_ADDR /> 
  <STATE /> 
  <ABCCODE /> 
  <REGION /> 
  <PAYTERM /> 
  <CORPORATE>N</CORPORATE> 
  <INDAGENT>N</INDAGENT> 
  <AGENT /> 
  <LANDA>NL</LANDA> 
  <ZTERM /> 
  <REGIO /> 
  <SALESMAN1 /> 
  <ACCT_ASS_GRP /> 
  <HKUNNR>60000</HKUNNR> 
  <SALES_REGION /> 
  </item>
  </IT_CUSTOMER_INFO_2>
  </rfc:Z_XI_003_RFC>

However The actual Output file generated only has ONE record in it ??????


  <?xml version="1.0" encoding="UTF-8" ?> 
- <ns1:MT_Customer_Master xmlns:ns1="http://ournamespace.com/xi/files">
- <ITEM>
  <Customerid>100000</Customerid> 
  <Company>Eldiano Trading Co. Ltd.</Company> 
  <Shortname>BIOSTAR</Shortname> 
  <Street>240, Arch. Makariou III</Street> 
  <Street2 /> 
  <Street3 /> 
  <Street4 /> 
  <Postcode /> 
  <City>Limassol</City> 
  <Country>Cyprus</Country> 
  <Po_box /> 
  <Po_box_po_code /> 
  <Po_box_city /> 
  <Tel_number /> 
  <Telex /> 
  <Fax_number /> 
  <Currency /> 
  <Lang>E</Lang> 
  <Smtp_addr /> 
  <State /> 
  <Abccode /> 
  <Region /> 
  <Payterm /> 
  <Corporate>N</Corporate> 
  <Indagent>N</Indagent> 
  <Agent1 /> 
  <Landa>CY</Landa> 
  <Zterm /> 
  <Regio /> 
  <Salesman1 /> 
  <Acct_ass_grp /> 
  <Hkunnr>60000</Hkunnr> 
  <Sales_region /> 
  </ITEM>
  </ns1:MT_Customer_Master>

So what's happened to the rest of the data ?????

Cheers

jimbo

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

answered by another thread

former_member240483
Contributor
0 Kudos

like for other structure we set occurence as 0 to unbound if we wanna send multiple messages ...

If you want to send multiple records u r occurence must be 0 to unbound in RFC also..

check that for your RFC ?

Regards

Rao

Edited by: PT Rao on Jun 12, 2008 5:13 PM

Edited by: PT Rao on Jun 12, 2008 5:17 PM

former_member181962
Active Contributor
0 Kudos

Hi James,

HOw is your Target Structure's ITEM Node mapped?

Is it mapped to the ITEM node of your source?

Regards,

Ravi Kanth Talagana

Former Member
0 Kudos

Hi there

Yes I've mapped Item to item

Cheers

jimbo

Former Member
0 Kudos

Hi,

Did you tried testing the message directly from Interface Mapping in IR. What's the output coming there ?

Check your File channel if by any chance the File Content Conversion is set on or any other parameter is explicitly set. In order to avoid any confusion can you pelase cerate a new File Receiver channel with the default values and try again.

+Pls reward point if find useful.+

Thanks

Amit