cancel
Showing results for 
Search instead for 
Did you mean: 

Parse and split Flat File into IDoc XMLs possible by Conversion Agent?

Former Member
0 Kudos

Dear All,

I am now working on a scenario, which SAP XI File Adapter picks up a flat file with multiple IDoc data. As SAP XI IDoc Adapter sends IDoc one by one, I am thinking to use the Conversion Agent to Parse the flat file into IDoc XML, which recognized by SAP XI, and also split the multiple IDoc data by Conversion Agent, then send them to SAP XI File Adapter one by one.

Actually till now, the parsing from flat file to IDoc XML by Conversion Agent is ok, but I am facing problem to split the multiple IDoc data and send them one by one. Is there anyone who has experience on this? Any suggestions or comments are appreciated.

Thanks & Regards,

Nick

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Nick,

I don't think it will be possible to split the IDOC to multiple files in Conversion Agent. You can also try to use two mappings

First Mapping

Source EDI XML Multiple Idocs - Single IDOC

Second mapping

Single IDOC to Required Format.

I will also try to check if splitting can be done in Conversion agent.

Suman Jaltar

former_member189558
Contributor
0 Kudos

Hello Nick,

Just take the target idoc XSD in ur desktop and open in Notepad.

Change the occurance of <b><IDOC> to 0..unbounded </b>and import it directly in the target messgae of Message Mapping. ( Import XSD/XML)....

You are done .. this will create multiple target idocs

Thanks,

Himadri

Former Member
0 Kudos

Hi Nick,

The Current client I am assisting right now has a similar situation. Let me share some ideas i have been working here. I get Multiple PO orders in a single EDI 850 trasnction file and using Conversion agent I Parser it into EDI-XML Format. In Message Mapping for each PO I need to create a separate IDOC hence my single EDI-XML Format has to generate multiple IDOCS and send it to SAP System. To solve this solution without using BPM please refer the following blog

/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change

Let me know if you need any more details.

Suman Jaltar

Former Member
0 Kudos

Suman,

Thank you very much!

It seems we have the similar situation. Actually I have already read Michel's blog, but the client is thinking to split the data in Conversion Agent, and the SAP XI just handle the iDoc one by one. Do you have any experience in spliting message and send to SAP XI using Conversion Agent?

Regards,

Nick

Former Member
0 Kudos

As SAP XI IDoc Adapter sends IDoc one by one, I am thinking to use the Conversion Agent to Parse the flat file into IDoc XML, which recognized by SAP XI, and also split the multiple IDoc data by Conversion Agent, then send them to SAP XI File Adapter one by one.

Nick,

as your getting SAP XI IDoc Adapter sends IDoc one by one then why do u want to collect these and split again ?

as your getting an IDOC directly send to XI and XI will create a file out of it. their is no need to use Conversion agent converting into IDOC to File and collecting then again splitting.

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

Thanks Sreeram,

Actually I am facing a migration project, the client already has the scenario there, they have flat file with multiple idoc data inside on a file server for SAP XI File Adapter to pick up, and want to use conversion agent to split and send to SAP R/3.

Regards,

Nick

Former Member
0 Kudos

Nick,

I think you cant split in conversion agent i would suggest you split in mapping.

Regards

Sreeram.g.reddy

Former Member
0 Kudos

Nick,

Try to use the Map Function in Conversion agent which will allow you to perform the splitting of files.

<b>Map(XPath("/Functional_Acknowledgment_997/*s/Interchange_envelope_Loop"),

XPath("/Functional_Acknowledgment_997"), [X12EDIValidation()])</b>

Suman Jaltar

Former Member
0 Kudos

Suman,

Thank you very much on the suggestion!

I added a Map to my service, but for the source and target of the Map, I can not add XPath like your sample, and I did not find the transformation of X12EDIValidation() in my Conversion Agent. Could you please give me more details?

Regards,

Nick

Former Member
0 Kudos

Hi Nick,

How Complex is your file structure? If its a simple flat file, my suggestion would be to use file content conversion in file adapter and set the parameter "RecordSets per message"equal to 1 and have a mapping program to convert it into IDoc.

If you can't use the normal file content conversion, you have to define a multimapping which could split the incoming bundled idoc messages into separate messages before sending it to R/3 via IDoc adapter.

Former Member
0 Kudos

Rahul,

Thank you very much for your suggestion! But the file structure is quite Complex, it is an IDoc like Order, Delivery, etc.

Regards,

Nick