on 04-07-2010 2:08 PM
We have a scenario of idoc->XI-JDBC
the below given segment may get repeated , as shown below ,
E1EDP19[2]--idoc segment
QUALF---003
IDTNR---01000123(Bar Code No)
E1EDP19[3]--idoc segment
QUALF---003
IDTNR---20500000000034(EAN No)
Reqd mapping
if QUALF=003
THEN IDTNR----->Bar_code_Number_EAN
Now IDTNR has to be mapped with Bar_code_Number_EAN for the segment which comes last
Pl suggest how to map using graphical mapping for the above scenario.
is this question correct? QUAL 003 should come only once under E1EDP19???
What is your target structure.. I don't think if there will be any issue in doing graphical mapping because it seems straight forward..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarvesh
The question is very correct
The below given segment may get repeated , as shown below , QUALF is repeated with every segment.
sender structure
E1EDP19[1]--idoc segment
QUALF---002
IDTNR---01000123(Bar Code No)
E1EDP19[2]--idoc segment
QUALF---003
IDTNR---01000123(Bar Code No)
E1EDP19[3]--idoc segment
QUALF---003
IDTNR---20500000000034(EAN No)
Target mapping
if QUALF=002
THEN IDTNR----->Articel_No
No issue when QUALF=002
but when QUALF=003, segment E1EDP19 may be repeated , when its repeated
target mapping
IDTNR-------> Bar_code_Number_EAN , IDTNR has to be from last repeated segment.
rgds
mojib
Hi Sarvesh
The question is very correct
For every repetition of idoc segment E1EDP19, QUALF is repeated
the below given segment may get repeated , as shown below ,
sender structure
E1EDP19[2]--idoc segment
QUALF---002
IDTNR---01000123(Bar Code No)
E1EDP19[2]--idoc segment
QUALF---003
IDTNR---01000123(Bar Code No)
E1EDP19[3]--idoc segment
QUALF---003
IDTNR---20500000000034(EAN No)
Target mapping
if QUALF=002
THEN IDTNR--->Article_No this is the direct mapping so , no issues
if if QUALF=003
THEN IDTNR----->Bar_code_Number_EAN
Now IDTNR has to be mapped with Bar_code_Number_EAN for the segment which comes last
Hope the reqmnt is more clear
rgds
mojib
The following code , I've put in the UDFmapBarcodEAN
Cache:queue
public void mapBarcodEAN(String[] QUALF,String[] IDTNR,ResultList result,Container container){
String temp=" ";
for(int i=0;i<QUALF.length;i++)
{
if(QUALF<i>.equals("003"))
{
temp =IDTNR<i>;
}
}
result.addValue(temp);
I m getting the following error :
RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MT_IB_INVOICE/STATEMENTNAME/si_invoice_header/ACCESS/Bar_code_Number_EAN. The message is: Exception:[java.lang.ArrayIndexOutOfBoundsException: 2] in class com.sap.xi.tf._MM_INVOICE_ method mapBarcodEAN$[, com.sap.aii.mappingtool.flib3.IfWithoutElse@130f9ee0]
Pl help ..
rgds
Hi Raj ,
The current mapping works fine if the parent segment E1EDP01 is only one but if that gets repeated then the last value of IDTNR is getting populated in the target side, very clearly i m giving the source and target structure and the mapping done using the UDF
Source structure
E1EDP01
E1EDP19[1]--idoc segment
QUALF---002
IDTNR---01000123(Bar Code No)
E1EDP19[2]--idoc segment
QUALF---003
IDTNR---01000123(Bar Code No)
E1EDP19[3]--idoc segment
QUALF---003
IDTNR---20500000000030(EAN No)
E1EDP01
E1EDP19[1]--idoc segment
QUALF---002
IDTNR---01000123(Bar Code No)
E1EDP19[2]--idoc segment
QUALF---003
IDTNR---01000123(Bar Code No)
E1EDP19[3]--idoc segment
QUALF---003
IDTNR---20500000000031(EAN No)
E1EDP01
E1EDP19[1]--idoc segment
QUALF---002
IDTNR---01000123(Bar Code No)
E1EDP19[2]--idoc segment
QUALF---003
IDTNR---01000123(Bar Code No)
E1EDP19[3]--idoc segment
QUALF---003
IDTNR---20500000000032(EAN No)
Target mapping
if QUALF=002
THEN IDTNR--->Article_No this is the direct mapping so , no issues
if QUALF=003
THEN IDTNR----->Bar_code_Number_EAN, now this IDTNR should get repeated every time the segment E1EDP01 gets repeated , currently only the last value form all the IDTNR is coming to the target side.
The current mapping works fine if the parent segment E1EDP01 is only one
Target structure
Access1
IDTNR--> Bar_code_Number_EAN( value is 20500000000030)
Access2
IDTNR--> Bar_code_Number_EAN( value is 20500000000031)
Access3
IDTNR--> Bar_code_Number_EAN( value is 20500000000032)
Current mapping
If QUALF = 003
Then QUALF ---->
mapBarCodeEAN---->Bar_code_Num_EAN
If QUALF = 003
Then IDTNR ---->
Context of QUALF is set to E1EDP01
Context of IDTNR is set to E1EDP01
thanks for your personalised help
rgds
mojib
Edited by: mohammad mojib ur rahman on Apr 9, 2010 1:30 PM
Thanks all for your support
rgds
mojib
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
some hitch has come thats why I've reopened
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Write a UDF and compare the qualifier with 003. Get the last string value in a loop. I do not think just graphical mapping would be sufficient.
VJ
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.