Skip to Content
avatar image
Former Member

Merge IDocs: Context problem for 2nd IDoc

Hi,

I have a req:

I have to merge 2 IDocs, material master and classification master. I have used multimaping 2:1. Target is a single soap message with only one statement (like: insert table matmaster values (material, maktx, lable1, lable2, lable3)...)

in SAP, there may not be all classifications maintained for each material. So, the Classification IDoc field E1AUSPM-ATWRT may not be passed to PI.

This segment E1AUSPM repeats in IDoc depends on classifications associated to material. max E1AUSPM segments are 100.

So, if the classifications are not present in SAP, PI is not receiving the Field ATWRT in segment E1AUSPM. (there are some other fields in the segment).

I am passing the MATNR, MAKTX, ATNAM, ATWRT and ATFLV to a UDF(type queue). The MATNR and MAKTX are from MATMAS. The fields ATNAM, ATWRT and ATFLV are from CLFMAS IDoc. These three Fields are from same segment E1AUSPM.

I am using Context in Segment level E1AUSPM. I used "Exists", "RemContxt", "MapWithDefault"... tried all the Node functions.

The problem is the contexts are not populating as per the IDoc data. I am getting inconsistent values in target message.

if I remove context, only first value I am getting to the UDF.

Can anybody suggest me how to feed blank values to the ATWRT context with regards of ATNAM? then I can reed in UDF.

Thanks for your time...

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 09, 2009 at 02:43 PM

    Here is aditional info:

    the IDoc CLFMAS Segment E1AUSPM Field ATWRT is not passing (coming) to PI in some segments. This is valid configuration in ECC. Now I have to fill empty context in the place if missed fields.

    <E1AUSPM SEGMENT="1">

    <MSGFN>004</MSGFN>

    <ATNAM>FLDCDE</ATNAM>

    <ATWRT>17</ATWRT> --- ATWRT present in Segment

    <ATFLV>0.000000000000000E+00</ATFLV>

    </E1AUSPM>

    <E1AUSPM SEGMENT="1">

    <MSGFN>004</MSGFN>

    <ATNAM>PALHCM</ATNAM>

    <ATWRT>10</ATWRT> --- ATWRT present in Segment

    <ATFLV>1.800000000000000E+01</ATFLV>

    </E1AUSPM>

    <E1AUSPM SEGMENT="1">

    <MSGFN>004</MSGFN>

    <ATNAM>PALHIN</ATNAM>

    <ATFLV>1.900000000000000E+01</ATFLV> --- ATWRT NOT present in Segment

    </E1AUSPM>

    <E1AUSPM SEGMENT="1">

    <MSGFN>004</MSGFN>

    <ATNAM>PALLCM</ATNAM>

    <ATFLV>2.000000000000000E+01</ATFLV> --- ATWRT NOT present in Segment

    </E1AUSPM>

    <E1AUSPM SEGMENT="1">

    <MSGFN>004</MSGFN>

    <ATNAM>ROLHWT</ATNAM>

    <ATWRT>25</ATWRT> --- ATWRT present in Segment

    <ATFLV>1.800000000000000E+01</ATFLV>

    </E1AUSPM>

    Above is the structure coming to PI. I am using the context in E1AUSPM level.

    When I see the context in Mapping:

    ATNAM | ATWRT | ATFLV

    FLDCDE | 17 | 0

    PALHCM | 10 | 18

    PALHIN | 25 | 19

    PALLCM | - | 20

    ROLHWT | - | 18

    Actually the ATWRT value 25 should come in 5th row. but it moving to 3rd row. I am getting improper order or values into UDF.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 09, 2009 at 05:27 PM

    Solved... I used another UDF and passed the required values with out context. And passed to main UDF.

    Thanks for Ur time...

    Add comment
    10|10000 characters needed characters exceeded