cancel
Showing results for 
Search instead for 
Did you mean: 

how to Split Single Idoc into 2 files and put some delay

Former Member
0 Kudos

Hi,

I have a IDoc to file Scenario. Invoice Idoc to Flat file scenario

this is a reuse Interface

Current Scenario we have graphical mapping(used for lookup and dynamic filename, mostly all the field mappings are 1-1) and ABAP Mapping to convert Idoc to flat file, 1 Idoc will generate 1 file.

In addition to the above case, there is 1 more requirement

Correction Invoice case. where in I get single Idoc with Multiple Item categories (Original data and Correction data)

In this case always I need to send two files(2 Idoc data), first Idoc is for Original Idoc and 2nd is Corrected Invoice, these 2 idocs should be sent with some delay.

In Correction Invoice case, I should generate 2 idocs based on Item category (PSTVY) value.

Suppose I have 4 E1EDP01 segments out of which PSTVY has value "AA" and "BB" repeated twice as shown below

<PSTYV>AA</PSTYV>

<PSTYV>AA</PSTYV>

<PSTYV>BB</PSTYV>

<PSTYV>BB</PSTYV>

So I need to generate 2 Idoc 1 for AA and other for BB.

If there is no correction Invoice, 1 idoc for 1 file will be generated.

Am planning to use BPM to delay the idocs and identigy bpm based on Document type else no bpm...

How do I split the mapping of single Idoc to 2 files based on Item category.

Thanks,

Varun

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi Varun,

if you are using 2 different receiver communication channels set Communication Channels Priority like High, Medium & Low then High Priority should be execute first.

other wise go for BPM for time delay process.

Regards,

Naga.

varun_k
Contributor
0 Kudos

two separate mappings were defined and in the second mapping udf is used to delay the execution

Former Member
0 Kudos

You can use the multi-mapping to split the message payloads according to business requirement (AA and BB segments values)

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

And then send to different receivers by adding the conditions on the Receiver Determination (for example, "field = AA" go to Receiver1, and "field = BB" to to Receiver2).

http://help.sap.com/saphelp_nwpi71/helpdata/en/26/5ccd3bb4560f01e10000000a11402f/frameset.htm

Or even Extended (enhanced) receiver determination, should the scenario be more complex:

http://wiki.sdn.sap.com/wiki/display/XI/EnhancedReceiverDeterminationinSAP+XI