Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Feb 19, 2004 at 08:06 PM

    Hart,

    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.

    Chris

    Add 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