on 04-07-2008 9:23 AM
Hi Experts,
I have scenario IDoc(ORDERS05) to cXML, where i am sending the Maufacturer part number(MFRPN) through the segment E1EDP19 od the IDoc,but not getting into the cXML.
I have mapped MFRPN to the element MPNID of cXML, as mentioned below:
IF E1EDP19-QUALF= 004 then move MFRPN into MPNID.
(using If without else function).
And when i checked the message in the Mapping test tab, i found that the Display queue is working correctly for all the inputs and If with out else function but for the target field(MPNID) it shows all fields with 'SUPPRESS' .
Please suggest why MPNID is not getting created in the cXML.
Thanks in advance,
MK
Hello MK,
I also faced the same problem with orders05 but i solved it with following logic
1. Change the Context of Qualf from E1EDP19 TO E1EDP01 this is done by right click on Qualf choos E1EDP01. similarly change context of MFRPN from E1EDP19 TO E1EDP01.
Once it is done plz follow the mapping
2. To Compare Qualf use Equals function then provide output of this to If without else function
3. The out put of If without else is giving to SPLIT BY VALUE
4. Output of this is given to Map with default and finaly to target field.
Reward points if it solves.
Thanks,
Venkatesh
Edited by: venkatesh bs on Apr 15, 2008 11:06 AM
Edited by: venkatesh bs on Apr 15, 2008 11:08 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
After your output of if without else put remove context and split by value ( each value ) in sequence and then check the queues.
Regards,
Shri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
test the message mapping with the original payload with which u r not getting the value filled. Aslo u change that particular field to 0004 manually and test. might be the payload has a value with an extra space or something like that for that field when entering XI....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
just check in msg mapping in display queue, the output of equalS function.........is this showing true for the constant 004......if not, then check your constant it should be 004 and check there should be no space in its end........if equals is showing correct output, then if without else will also show you correct output.
Regards,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have checked in my system like this.
ifWithoutElse ( QUALF EqualS 04 ) then MFPRN -
> TRRGET.
it is working fine, BUT if you have many E1EDP19 segments lets say 5, and if the top most QUALF is not having the value equal to 04 or it is empty then you will get suppressed value. To solve this do like this.
ifWithoutElse (QUALF EqualS 04) then MFPRN -
> removeContext -
> splitByValue -
> TRRGET.
Regards,
Sarvesh
Thanks Sarvesh and Rajeev,
It is working with the removeContexts function. what was the issue before.
And as we have multiple E1EDP19 segments, if we remove the context for E1EDP19-QUALF.
will it not effect the whole mapping of IDoc to cXML as the E1EDP19-QUALF and E1EDP19-MFRPN are need to be considered from the same context.
Please suggest further to resolve it.
Raj, can i have mail id, so that i can mail you the mapping snapshot.
Thank you.
**********
Please read the Forum's Rules of Engagement,
i.e.,
[/thread/117188 [original link is broken];
and refrain from using email correspondence as the main objective of the Forums is to share knowledge.
SDN PI/XI Forum Moderator
MK,
Thanks for sharing the link! Why did you changed the context of MFRPN? Don't change the context.
Let me clear something, are u looking for the below logic
Source
<IDOC>
<E1EDP19>
<QUALF>010</QUALF>
<MFRPN>MAT1</MFRPN>
</E1EDP19>
<E1EDP19>
<QUALF>004</QUALF>
<MFRPN>MAT2</MFRPN>
</E1EDP19>
<E1EDP19>
<QUALF>014</QUALF>
<MFRPN>MAT3</MFRPN>
</E1EDP19>
<E1EDP19>
<QUALF>004</QUALF>
<MFRPN>MAT4</MFRPN>
</E1EDP19>
</IDOC>
Target
<Record>
<Material>
<Field1>123</Field1>
<Material>MAT2</Material>
</Material>
<Material>
<Field1>ABC</Field1>
<Material>MAT4</Material>
</Material>
</Record>
Am I right?
raj.
Hi Raj,
the source structure is
<IDOC>
<E1EDP19 SEGMENT="1">
<QUALF>002</QUALF>
<IDTNR>R-CA-34045676-T</IDTNR>
</E1EDP19>
<E1EDP19 SEGMENT="1">
<QUALF>001</QUALF>
<IDTNR>0000000000345768</IDTNR>
<KTEXT>LIBRARY BUNDEL</KTEXT>
</E1EDP19>
<E1EDP19 SEGMENT="1">
<QUALF>003</QUALF>
<IDTNR>345000053454</IDTNR>
</E1EDP19>
<E1EDP19 SEGMENT="1">
<QUALF>004</QUALF>
<MFRPN>WE300-4R4-30-FE-Z</MFRPN>
<MFRNR>080000213</MFRNR>
</E1EDP19><
</IDOC>
And the MFRPN is mapped to the below element of target cXML structure
<xsd:element name="ManufacturerPartID" type="ManufacturerPartID" />
Please explain how can we solve this issue.
Thank you.
MK,
I suggest you to write the simple UDF in order to achieve it.
QUALF ---> MapWithDefault["No Value"]---> RemoveContext---->1
MFRPN---> MapWithDefault["No Value"]---> RemoveContext---->2
1&2--->UDF---> ManufacturerPartID
UDF- Advanced(Queue), two input parameters
for(int i=0;i<QUALF.length;i++)
{
if(QUALF<i>.equals("004"))
{
result.addValue(""+MFRPN<i>+"");
}
}
You can think, before I said we should not use Remove Context. but in my logic I used Remove Context!
If you use RemoveCOntext right after QUALF, then your logic won't work, But in my logic I used it after MapWithDefault, hence it will work perfectly for sure!
If it doesn't helps. let me know!
raj.
Raj,
I followed your logic, but i am getting the below error on mapping test.
RuntimeException in Message-Mapping transformation: Exception:[java.lang.ArrayIndexOutOfBoundsException: 3] in class com.sap.xi.tf._IDOC_to_cXML_ method MFR_UDF$[com.sap.aii.mappingtool.tf3.CBufIter@1ba0341e, com.sap.aii.mappingtool.tf3.CBufIter@32bdabbd]
Please suggest further, to rectify the error.
Thank you.
> Thanks Sarvesh and Rajeev,
>
> It is working with the removeContexts function. what was the issue before.
>
> And as we have multiple E1EDP19 segments, if we remove the context for E1EDP19-QUALF.
> will it not effect the whole mapping of IDoc to cXML as the E1EDP19-QUALF and E1EDP19-MFRPN are need to be considered from the same context.
>
> Please suggest further to resolve it.
The efect of remove context will be only in the mapping where you have used it not in the entire mapping.
Thanks Sarvesh.
but Raj suggested that we should not use removecontexts.
And the other thing is we need to change it similarly for the PO-change message,
where we have same logic as PO for the line(s) that have changed.
and for the line(s) that have not changed we are using BAPI_PO_GETDETAIL to retrieve rest of the details of PO.
Manufacturer part number is stored in the MANU_MAT of BAPI_PO_GETDETAIL, but it is not mapped to the cXML.
Please suggest on how can i change the logic so as to pass the MFRPN to cXML for the PO line(s) coming from the BAPI_PO_GETDETAIL.
Thank you,
MK
Hi,
what function are you using for comparing the elements?
You should use the Text function equalsS.
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.