cancel
Showing results for 
Search instead for 
Did you mean: 

Context Problem in Mapping

Former Member
0 Kudos

Hi All,

I am facing problem with Context while mapping. I have the source like this

E1ADRM4

-Name1

-address

-city

-country

E1EDL20

-ZDELVINFO

--Appointment Confirmation No.

Target Structure is like this

STOP

-Name1

-address

-city

-country

-Appointment Confirmation No.

I mapped E1ADRM4 segment to STOP Segment.

i am getting filled all the fields in proper way except Appointment Confirmation No.

E1ADRM4 & E1EDL20 repeats and i have to get the values one by one but always i am getting the first value only

Please suggest me some method to overcome this, i used context change and every thing but no use

Regards

Edited by: Vamsi Krishna on Nov 2, 2010 10:04 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vamsi,

Let us know how segments E1ADRM4 & E1EDL20 repeat. For each E1ADRM4 is there a corresponding E1EDL20? If this is the case you can use formatByExample.

Check this link for details on this function.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/67/7ca04267deb111e10000000a155106/frameset.htm

Inbound Queue 1 -> E1EDL20

Inbound Queue 2 -> E1ADRM4

Regards

Ven

Former Member
0 Kudos

Venkata,

Thanks for replying.

This is the hierarchy of my source structure Idoc.

E1EDT20

-E1ADRM4( Repeats)-----mapped to STOP(Repeats) segment in target

E1EDL20(Repeats)

-ZDELVINFO

--Appoint Confirmation No

E1ADRM4 may come only 1 time E1EDL20 may come 2 times.Means 1 stop can have multiple deliveries.Could you please let me know how to handle it now.I feel i am not able to get the proper values for Appoint Confirmation No is because of i mapped the E1ADRM4 segment to target of STOP Segment.

Appoint Confirmation No is from E1EDL20-ZDELVINFO Segment.

Regards

Edited by: Vamsi Krishna on Nov 2, 2010 10:50 PM

Former Member
0 Kudos

Can you provide an example of your source and desired target test data?

RKothari
Contributor
0 Kudos

Hello,

Try using 'useOneAsMany' Node function in the mapping of field 'Appoint Confirmation No'.

Provide the value of Appoint Confirmation No in first queue as input, rest in two queues provide the segment E1ADRM4 as input.

-Rahul

Former Member
0 Kudos

You can try below approach to perform your mappping..

E1EDL20--->STOP

Name1->CopyValue->Name1

address->CopyValue->address

city->CopyValue->city

country->CopyValue->country

ApptConfNo--->ApptConfNo (No need to use Copy value here)

Former Member
0 Kudos

Sarvesh,

I can't mapp E1EDL20 to STOP because E1EDL20 contains Delivery Info, one STOP can have multiple deliveries.

Suppose 2 deliveries and 1 STOP means, in this case i can't repeat STOP 2 times.So i mapped E1ADRM4 segment to STOP.

And one more thing is E1ADRM4 segment will have stop1 and stop2 ...etc information and i can't use Copy value here because i have to mapp stop1 values from source to stop1 values to target & stop2 values from source to stop2 values in target.

In the same way, Appoint confirmation No also comes 2 times depends on how many stops we have.Here is the sample input and output i an expecting

<E1ADRM4>

<PARTNER_Q>01</PARTNER_Q>

<PARTNER_ID>1108</PARTNER_ID>

<NAME1>1108 WAREHOUSE DC</NAME1>

<STREET1>1108 WAREHOUSE</STREET1>

<STREET2/>

<STREET3/>

<CITY1>WAREHOUSE</CITY1>

<REGION>IL</REGION>

<COUNTRY1>USA</COUNTRY1>

<POSTL_COD1>60195</POSTL_COD1>

<TELEPHONE1/>

</E1ADRM4>

<E1ADRM4>

<PARTNER_Q>02</PARTNER_Q>

<PARTNER_ID>1107</PARTNER_ID>

<NAME1>CARLISLE DC</NAME1>

<STREET1>XX1</STREET1>

<STREET2/>

<STREET3/>

<CITY1>CARLISLE</CITY1>

<REGION>PA</REGION>

<COUNTRY1>USA</COUNTRY1>

<POSTL_COD1>65232</POSTL_COD1>

<TELEPHONE1/>

</E1ADRM4>

</E1EDT20>

<E1EDL20>

<VBELN>0080003804</VBELN>

<ZATEDLVINFO>

<PLPUD>20100928</PLPUD>

<PLPUT>2203</PLPUT>

<STOP>01</STOP>

<APNTD>20100930</APNTD>

<APNTT>0910</APNTT>

<APNTC>CONFIRMATION STOP1</APNTC>

<APNTCN>APPT CONF NO</APNTCN>

<PRO>PRO NO</PRO>

<CONTAINER>CONTAINER NO</CONTAINER>

<VESSEL>VESSEL NAME AND NO</VESSEL>

<ETD_CITY>CHICAGO</ETD_CITY>

<ETD>11/10</ETD>

<ETA_CITY>ROTTERDAM</ETA_CITY>

<ETA>12/10</ETA>

</ZATEDLVINFO>

</E1EDL20>

<E1EDL20>

<VBELN>0080003805</VBELN>

<ZATEDLVINFO>

<PLPUD>20100928</PLPUD>

<PLPUT>2203</PLPUT>

<STOP>02</STOP>

<APNTD>20100930</APNTD>

<APNTT>1310</APNTT>

<APNTC>CONFIRMATION STOP2</APNTC>

<APNTCN>APPT CONF NO</APNTCN>

<PRO>PRO NO</PRO>

<CONTAINER>CONTAINER NO</CONTAINER>

<VESSEL>VESSEL NAME AND NO</VESSEL>

<ETD_CITY>CHICAGO</ETD_CITY>

<ETD>11/10</ETD>

<ETA_CITY>ROTTERDAM</ETA_CITY>

<ETA>12/10</ETA>

</ZATEDLVINFO>

</E1EDL20>

OUTPUT expecting like this

<Stop>

<Shipmentnumber>0001063050</Shipmentnumber>

<Delbillno>00224000000004442</Delbillno>

<Action>A</Action>

<Record_Type>S</Record_Type>

<Stopno>01</Stopno>

<Delpoint>1108</Delpoint>

<Delpointaddr1>1108 WAREHOUSE DC</Delpointaddr1>

<Delpointaddr2>1108 WAREHOUSE</Delpointaddr2>

<Delpointaddr3/>

<Delpointcity>WAREHOUSE</Delpointcity>

<Delpointstate>IL</Delpointstate>

<Delpointzip>60195</Delpointzip>

<Appointment_Date>20100930</Appointment_Date>

<Appointment_Time>0910</Appointment_Time>

<Appointment_ID>CONFIRMATION STOP1</Appointment_ID>

</Stop>

<Stop>

<Shipmentnumber>0001063050</Shipmentnumber>

<Delbillno>00224000000004442</Delbillno>

<Action>A</Action>

<Record_Type>S</Record_Type>

<Stopno>02</Stopno>

<Delpoint>1107</Delpoint>

<Delpointaddr1>CARLISLE DC</Delpointaddr1>

<Delpointaddr2>XX1</Delpointaddr2>

<Delpointaddr3/>

<Delpointcity>CARLISLE</Delpointcity>

<Delpointstate>PA</Delpointstate>

<Delpointzip>65232</Delpointzip>

<Appointment_Date>20100930</Appointment_Date>

<Appointment_Time>1310</Appointment_Time>

<Appointment_ID>CONFIRMATION STOP2</Appointment_ID>

</Stop>

Appoint_Date,Appoint_time and Appoint_ID are not coming like as given in above output xml.

Always it is taking from the 2nd delivery only, i.e <APNTD>20100930</APNTD>

<APNTT>1310</APNTT>

<APNTC>CONFIRMATION STOP2</APNTC>

Please let me know how to proceed

Regards

Edited by: Vamsi Krishna on Nov 3, 2010 3:59 PM

Edited by: Vamsi Krishna on Nov 3, 2010 4:02 PM

Former Member
0 Kudos

Vamsi,

This example is simple 1:1 and always produce correct result as I tested. So give me such example where you are not getting the desired output.

What I understood from your problem is if E1ADRM4 come twice & E1EDL20 comes thrice then there will be 2 STOP segments but I am understanding where the value of 3rd E1EDL20 will go. Can you provide a good example.

Former Member
0 Kudos

Sarvesh,

I changed those 3 fields from ZATEDELVINFO segment to E1ARDM4 and working fine

Thanks for the support

Regards

Vamsi

Answers (0)