Skip to Content
author's profile photo Former Member
Former Member

How to loop within XI

Hello everyone,

I am trying a scenario where a flat file, in which each line represents a purchase order, is sent to XI through File Adapter, and then XI creates one RFC for each line to call a purchase order creation BAPI in a SAP system. This BAPI only has a structure as input parameter.

The line structure can be easily mapped to the BAPI input structure using XI provided mapping tool.

My question is: how can I loop through all the lines in the file to generate multiple RFC calls within XI? Is there an easy way to make this happen?

One workaround solution might be: create a BAPI wrapper in the target system so that it can accept an input table (a row corresponding to a line in the file) and then loop through the table to call the PO Creation BAPI for each row. However, this needs a little bit of coding.

Any comment / help is appreciated!

Regards, Hart

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 19, 2004 at 08:06 PM


    In XI 2.0, I've built this type of scenario by having the flat file adapter split the file into multiple "recordsets" where each line would be a separate message in the XI integration engine. The messages are processed in EOIO mode so that order is maintained.

    In XI 3.0, the mapping tool will have the ability to split a source message into multiple messages.


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Chris,

      Thanks a lot for your help!

      Can you please provide me a quick reference to what I need to config in file adapter so that it can split the file and then send each recordset as separate message?

      Regards, Hart

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.