cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping related Issues

Former Member
0 Kudos
299

Hi all ,

I am working on IDOC-XI-xml file scenario . I am able to trigger the file properly

and able to receive it in XI .

But I am getting problems in mapping . The problem is as follows :

I did one to one mapping for WP_PLU02 idoc(Material Master) .

If there are <u><b>ten or more Material triggered in single IDOC</b></u> then How can we map it to our target data .

Can anybody share mapping example of multiple material master mapped to one data target .

Thanks & Regards

Accepted Solutions (1)

Accepted Solutions (1)

STALANKI
Active Contributor
0 Kudos

Iam still not very clear .Can you send the xsd for source and target structures to sravya.talanki@wipro.com.I will be surely able to help.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Umesh,

For looping in mapping, Connect the input node that repeats to the output node that need to repeat accordingly.

Your Mapping looks like:

E1WPA01.....................POS_OUTPUT

...FILALE.............--->..............POS_FIELD1

...AENDKENNZ.....--->..............POS_FIELD2

In this, also connect E1WPA01 to POS_OUTPUT, and it looks like:

<b>E1WPA01...........--->.......POS_OUTPUT</b>

...FILALE.............--->..............POS_FIELD1

...AENDKENNZ.....--->..............POS_FIELD2

Then POS_OUTPUT repeats as many times as E1WPA01.

For more information on mapping:

http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm

For some examples on message mapping, refer to:

http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm

--- Pops V

Former Member
0 Kudos

Hi Sravya Talanki,

My sending IDOC with data is as follows :-

Begin of sender IDOC(<b>WP_PLU02</b>)

<E1WPA01 SEGMENT="1">

<FILIALE>N001</FILIALE>

<AENDKENNZ>MODI</AENDKENNZ>

<AKTIVDATUM>20050808</AKTIVDATUM>

<AENDDATUM>00000000</AENDDATUM>

<HAUPTEAN>20500000000108</HAUPTEAN>

<ARTIKELNR>000000000000000002</ARTIKELNR>

<POSME>EA</POSME>

- <E1WPA02 SEGMENT="1">

<WARENGR>CRISPIES</WARENGR>

<VERPGEW>0</VERPGEW>

<WAAGENKR>002</WAAGENKR>

<WAAGENART>X</WAAGENART>

<PRDRUCK>X</PRDRUCK>

<ARTIKANZ>X</ARTIKANZ>

<MHDRZ>0</MHDRZ>

<MHDHB>0</MHDHB>

</E1WPA02>

- <E1WPA03 SEGMENT="1">

<QUALARTTXT>LTXT</QUALARTTXT>

<SPRASCODE>E</SPRASCODE>

<TEXT>DESCRIPTION 1test</TEXT>

<LFDNR>0001</LFDNR>

</E1WPA03>

- <E1WPA03 SEGMENT="1">

<QUALARTTXT>02</QUALARTTXT>

<SPRASCODE>E</SPRASCODE>

<TEXT>Pos till text description - 2</TEXT>

<LFDNR>0001</LFDNR>

</E1WPA03>

- <E1WPA04 SEGMENT="1">

<KONDART>VKP0</KONDART>

<BEGINDATUM>20050808</BEGINDATUM>

<BEGINNZEIT>0000</BEGINNZEIT>

<ENDDATUM>99991231</ENDDATUM>

<ENDZEIT>0000</ENDZEIT>

- <E1WPA05 SEGMENT="1">

<VORZEICHEN>+</VORZEICHEN>

<KONDWERT>10.6</KONDWERT>

<MENGE>1</MENGE>

<CURRENCY>INR</CURRENCY>

</E1WPA05>

</E1WPA04>

</E1WPA01>

- <E1WPA01 SEGMENT="1">

<FILIALE>N001</FILIALE>

<AENDKENNZ>MODI</AENDKENNZ>

<AKTIVDATUM>20050808</AKTIVDATUM>

<AENDDATUM>00000000</AENDDATUM>

<HAUPTEAN>2050000000133</HAUPTEAN>

<ARTIKELNR>000000000000000013</ARTIKELNR>

<POSME>EA</POSME>

- <E1WPA02 SEGMENT="1">

<WARENGR>PREMIUM00</WARENGR>

<VERPGEW>0</VERPGEW>

<PRDRUCK>X</PRDRUCK>

<ARTIKANZ>X</ARTIKANZ>

<MHDRZ>0</MHDRZ>

<MHDHB>0</MHDHB>

</E1WPA02>

- <E1WPA03 SEGMENT="1">

<QUALARTTXT>LTXT</QUALARTTXT>

<SPRASCODE>E</SPRASCODE>

<TEXT>tax</TEXT>

<LFDNR>0001</LFDNR>

</E1WPA03>

- <E1WPA03 SEGMENT="1">

<QUALARTTXT>02</QUALARTTXT>

<SPRASCODE>E</SPRASCODE>

<TEXT>ta</TEXT>

<LFDNR>0001</LFDNR>

</E1WPA03>

- <E1WPA04 SEGMENT="1">

<KONDART>VKP0</KONDART>

<BEGINDATUM>20050808</BEGINDATUM>

<BEGINNZEIT>0000</BEGINNZEIT>

<ENDDATUM>99991231</ENDDATUM>

<ENDZEIT>0000</ENDZEIT>

- <E1WPA05 SEGMENT="1">

<VORZEICHEN>+</VORZEICHEN>

<KONDWERT>10</KONDWERT>

<MENGE>1</MENGE>

<CURRENCY>INR</CURRENCY>

</E1WPA05>

</E1WPA04>

</E1WPA01>

End of sending IDOC

And my graphical mapping is as follows

FILIALE ---> POS_FIELD1

AENDKENNZ ---> POS_FIELD2

AKTIVDATUM ---> POS_FIELD3

AENDDATUM ---> POS_FIELD4

HAUPTEAN ---> POS_FIELD5

ARTIKELNR ---> POS_FIELD6

POSME ---> POS_FIELD7

WARENGR ---> POS_FIELD8

VERPGEW ---> POS_FIELD9

WAAGENKR ---> POS_FIELD10

WAAGENART ---> POS_FIELD11

PRDRUCK ---> POS_FIELD12

ARTIKANZ ---> POS_FIELD13

MHDRZ ---> POS_FIELD14

MHDHB ---> POS_FIELD15

QUALARTTXT ---> POS_FIELD16

SPRASCODE ---> POS_FIELD17

TEXT ---> POS_FIELD18

LFDNR ---> POS_FIELD19

KONDART ---> POS_FIELD20

BEGINDATUM ---> POS_FIELD21

BEGINNZEIT ---> POS_FIELD22

ENDDATUM ---> POS_FIELD23

ENDZEIT ---> POS_FIELD24

VORZEICHEN ---> POS_FIELD25

KONDWERT ---> POS_FIELD26

MENGE ---> POS_FIELD27

CURRENCY ---> POS_FIELD28

Please observe IDOC data(xml) segment E1WPA01 repeting twice & E1WPA03 repeting 4 times

Segment E1WPA01 is for one material and in original file there are 10 materials.

segment E1WPA01 is header

segment E1WPA04 is item

segment E1WPA05 is sub-item

Tell me if my graphical mapping is wrong.

Is i have to use graphical mapping or any other mapping.

STALANKI
Active Contributor
0 Kudos

Hi Umesh,

Do you want to split 1 idoc into 10xml files meaning a seperate file for each material?Can you provide the target and source structure.It would be helpful.

Former Member
0 Kudos

Alternatively you can also create an External Defintion say for example ORDERS05_BATCH which is based on the original Std ORDERS05 schema. In the batch version just make this node unbounded:

<xsd:element name="IDOC" type="ORDERS.ORDERS05" minOccurs="0" maxOccurs="unbounded" />

Rest of the schema remains the same. In your case this will be the Materials IDOC name.

After that you can use this External Definition in your Message Mapping and can have multiple Material IDOCs that you can mape to recurring node in the target.

Thanks

Ashish

Former Member
0 Kudos

Hi Umesh,

It is looping concept, but it depends upon different mapping methods.

for example

like in XSLT you can use "For each", msg mapping you can use the standard functions with min max settings of your target structure.

Check these links, they may help

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters

http://help.sap.com/saphelp_nw04/helpdata/en/21/6faf35c2d74295a3cb97f6f3ccf43c/frameset.htm

Regards

Vishnu

Former Member
0 Kudos

Hi Umesh,

I generally get them to send the idocs one at a time because then if there is a problem with one material it can be resent and each material can be monitored.

Alternatively one can use the BPM and split the materials into single materials and then you would have 10 xml for our receiver.

regards

john