cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc should be generated depends on the unique value

Former Member
0 Kudos

Hi friends,

XML file contains multiple Purchase orders which are not sorted. number of idoc should be genereated depends up on the unique purchase order number.

My question is how to create idocs based on the unique purchase order number.It's very urgent my friends if any one faced this type of requriments pls give me complete description and how to sort the purchase order numbers

Edited by: prathima on Oct 9, 2011 12:32 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

HI prathima,

step1:

First Export the z/standard IDoc xsd and change the <IDOC> Maximum occurrence is unbounded then imported into the External Definitions.

Step2:

Purchase voucher field -> removeContext -> Sort -> spliBbyValue(Value change) -> IDOC FIELD.

let me know , if you have any Issue.

thanks,

Sankar.S

zameerf
Contributor
0 Kudos

Hi,

First take the IDoc xsd and change the <IDOC> occurrence to unbounded by adding maxOccurs attribute.

Refer this wiki page,

http://wiki.sdn.sap.com/wiki/display/XI/ChangingtheOccurrencesofStandard+IDOC

Then import this new xsd as an External Definition and use as target structure in Message Mapping.

Sort the unique PO value from source xml and then split by value[value change] to map to <IDOC> node.

You can test the input xml in the message mapping and hope this should work

Thanks,

Zameer

Former Member
0 Kudos

Hi prathima ,

You rule should be based on the top IDoc segment.

first you need to edit the target schema to allow multiple IDocs.(look in the forum for the relevant guide for it)

then using graphical mapping create the content based rule you need.

If you managed to create the number of IDoc top segments you needed , then you are in the right path.

you big challange then will be to map the relevant nodes Items & sub-Items to the target structure.

Good luck!

former_member191435
Contributor
0 Kudos

Hi Pratima,

Can u talk Purchaseorder field and make it context as top level then use remove context then split by value change to target IDOC

PO----> remove context--->sort---> SPlitby value(change) -


> IDOC

still if u face any issue let me know

Thanks,

Enivass