on 04-13-2007 6:58 AM
I am doing idoc to file scenario and stuck with the mapping in the following case. I think an UDF or JAVA mapping will do the bill. can some one help me in this regard please.
IDoc message type, IDoc basic type, IDoc extension
PAYEXT.PEXR2002.ZEXR2002.
<u><b>conditions:</b></u>
IF E1IDB02 BA-FIIKWAER = CNY
then MID(E1EDKA1 BE-NAME1,12,11)
IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1EDKA1 BE-NAME1)<=35
then MID(E1EDKA1 BE-STRAS,1,35)
IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1EDKA1 BE-NAME1)>35
then MID(E1EDKA1 BE-NAME1,36,35)
This will be mapped to "Info Line 1" field in file.
Thanks,
Kiran
Kiran,
UDF is simple,
let fiikwaer and NAME1 and Stras be the inputs to the udf with input paramerters a and b and c respecitbvely.
if(a.equals("CNY")){
return(b.substring(12,11));
}else{
if(name1.length()<=35){
return(c.substring(1,35));
}
else{
return(c.substring(36,35));
}
}
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mr.Kiran,
here is the code
pass the following fields to Context UDF
1.E1IDB02-FIIKWAER
2.E1EDKA1-NAME1
3.E1EDKA1-STRAS
for(int k = 0;k<FIIKWAER.length;k++)
{
if(FIIKWEAR[k].equalsIgnoreCase("CNY"))
result.addValue(NAME1[k].substring(11,12));
else if(!(FIIKWEAR[k].equalsIgnoreCase("CNY"))&&(NAME1[k].length() <= 35))
result.addValue(STRAS[k].substring(1,35));
else if(!(FIIKWEAR[k].equalsIgnoreCase("CNY"))&&(NAME1[k].length() > 35))
result.addValue(NAME1[k].substring(35,36));
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kiran,
No need for java mapping or Udf.
Use thge IF function in the grpahical mapping along with the Sbustr function.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi bavesh,
here i need to check 2 qualifiers.
am not getting logic, can u plz give me the xml of the same or any screen shot...
if i need to use java mapping, how can i do it. i donn have any idea on it?
or i can even appreciate if u can give me code for UDF as i am 0 in java area.
tx a lot.
kiran
Hi Mr.Kiran,
what is this CNY,is it value?
What is the occurrence of FIIKWAER and NAME1 field?
Cheers,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.