I've made an XML.
My message type is
field: bukrs 1..unbounded.
The file will contain N company codes.
On the other side, i have a BAPI. This bapi contains, as tables, to fields : company and error.
i want to make the mapping between the XML file and the internal table of the BAPI called company (defined in tables).
How do i have to make the mapping?
How are you doing the mapping, using Message Mapping or XSLT. If its the message mapping then it can automatically create multiple line items for unbounded field. I.e 'burks' mapped to company codes. If you have multiple entry of 'burks' then there will be corresponding multiple company codes which you can use the Receiver RFC adapter to populate the BAPI table in R/3. If you are using XSLT then you have to use the tag called, <xsl:for-each>
Hope this helps.
There are many ways to proceed with this scenario.
1. You can use graphical mapping wherein you need to import your BAPI in the integration repository and map the reqiurements as needed.
Note: While doing complex mapping, be careful on fixing the context's for the source fields to get the desired output.
2. You can also use ABAP mapping for the same.
You create an ABAP mapping in SE24 transaction and specify the ABAP mapping in the mapping objects in your repository.
3. If your scenario is strictly File to RFC, You don't need a mapping, create a inbound proxy out of the XML file in the SAP system, Loop throu the source XML data and dump it in the internal table specified and make a call with the RFC