cancel
Showing results for 
Search instead for 
Did you mean: 

Header details are not coming in 2nd idoc.

Former Member
0 Kudos

This is my input XML :

<?xml version="1.0" encoding="UTF-8"?>

<X12>

<ISA>

<ISA01>00</ISA01>

<ISA02>12</ISA02>

</ISA>

<GS>

<GS01>PO</GS01>

<GS02>6111350003</GS02>

</GS>

<TS_850>

<ST>

<ST01>850</ST01>

<ST02>300091666</ST02>

</ST>

<BEG>

<BEG01>00</BEG01>

<BEG02>KC</BEG02>

</BEG>

<SE>

<SE01>116</SE01>

<SE02>300091666</SE02>

</SE>

</TS_850>

<TS_850>

<ST>

<ST01>850</ST01>

<ST02>300091667</ST02>

</ST>

<BEG>

<BEG01>00</BEG01>

<BEG02>KC</BEG02>

</BEG>

<SE>

<SE01>116</SE01>

<SE02>300091667</SE02>

</SE>

</TS_850>

</X12>

This is my output XML :

<?xml version="1.0" encoding="UTF-8"?>

<ZZ_-AFS_-ORDERS05>

<IDOC BEGIN="1">

<E1EDK01 SEGMENT="1">

<ACTION>003</ACTION>

<BSART>KC</BSART>

<BELNR>367</BELNR>

<ZJCP_ISA SEGMENT="1">

<AUTH_INFO_QUALIF>00</AUTH_INFO_QUALIF>

<AUTHORIZATION_INFORMATION>12</AUTHORIZATION_INFORMATION>

</ZJCP_ISA><ZJCP_GS SEGMENT="1">

<FUNCTIONAL_IDENTIFIER_CODE>PO</FUNCTIONAL_IDENTIFIER_CODE>

<APPLICATION_SENDER_CODE>6111350003</APPLICATION_SENDER_CODE>

</ZJCP_GS>

</E1EDK01>

<E1EDK14 SEGMENT="1">

<ORGID>2300</ORGID>

</E1EDK14><E1EDK02 SEGMENT="1">

<QUALF>002</QUALF><BELNR>367</BELNR><POSNR>10</POSNR></E1EDK02>

</IDOC><IDOC BEGIN="2">

<E1EDK01 SEGMENT="2">

<ACTION>003</ACTION>

<BSART>KC</BSART>

<BELNR>367</BELNR>

<ZJCP_ISA SEGMENT="2">

</ZJCP_ISA><ZJCP_GS SEGMENT="2">

</ZJCP_GS></E1EDK01>

<E1EDK14 SEGMENT="2">

<ORGID>2300</ORGID>

</E1EDK14>

<E1EDK02 SEGMENT="2">

<QUALF>002</QUALF>

<BELNR>367</BELNR>

<POSNR>20</POSNR>

</E1EDK02></IDOC></ZZ_-AFS_-ORDERS05>

My problem is with the value of ISA and GS segments, the value of the same segments are available in first idoc (see XML output), in second idoc the values are not available.

Give me idea, why it is not there ? Is it mapping problem ?

ISA and GS are header details, we need to pass that in every idoc.

Regards,

Study SAP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

Here the problem is the you need to pass same header values to all IDOCs. For this you need to use the node function useOneAsMany

To pass ISA values map as below

ISA ---> useOneAsMany -


> ZJCP_ISA

BEG01--->

BEG01--->

ISA01 ---> useOneAsMany -


> AUTH_INFO_QUALIF

BEG01--->

BEG01--->

Similary repeat the logic for other Header elements. This will allow you to replicate the Header segments as many times as the Details IDOCs segments are available.

Refer

http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/frameset.htm

Thanks

Swarup

Answers (0)