on 04-18-2013 4:20 PM
Hello friends,
I am working on an IDOC to file scenario and when I am trying to map the IDOC it's taking the value only for the first node and when it fails the condition it's giving error.
The structure of the idoc is as below :
<E1EDK14 SEGMENT="">
<QUALF>Z03</QUALF>
<ORGID>ER-12345-ER</ORGID>
</E1EDK14>
<E1EDK14 SEGMENT="">
<QUALF>Z06</QUALF>
<ORGID>AB-1223-ER</ORGID>
</E1EDK14>
and my mapping is done in this way :
ORGID-------->
then
QUALF---->equalsS ------> if ---->substring (3..8)----->OrderNumber
else
Constant----->
(Z06)
Constant---->
(00000000)
and when I test I am getting the value in OrderNumber as "0000"
But when I change the value of QUALF to "Z06" for the first node, it gives the correct result as "12345".
Could you please verify my mapping and suggest something,such that it takes the value of ORGID wherever it finds QUALF = Z06 ,but not only for first node?
Thanks in advance !
Regards,
Sambaran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sambarn,
What is the occurance of Order Number at target side,as per mapping logic what you have written for the data what you have tested you will have two values for order number 0000,1223-ER.
First occurance order number value will have 0000,second occurance order number will have 1223-ER.
if you have set ordernumber occurance to 1 then you will see output value 0000.
what is your requirement?
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sambaran,
According to your requirement, if any <QUALF> is Z06 you need to pass the corresponding <OrgID>.
Use a UDF for the the above. Remove context for both <QUALF> and <ORGID> and give it as input to the UDF.
<ORGID> -->
UDF_ORGID_FROM_Z06--->substring(3..8) ---> OrderNumber
<QUALF>--->
Small piece of code that you will require:
int sum=0000;
for (int i=0;i<a.length;i++)
{
if(QUALF[i].equals("Z06")
sum = ORGID[i];
}
return sum;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.