on 04-10-2007 8:13 AM
Hi,
Target field is : Bank Address 1:
Source mapping: it is a Idoc with the following requirements
IF E1IDB02 BA-FIIKWAER = CNY and LEN(E1IDB02 BB-FIIBKNAM)<=11
then MID(E1IDB02 BB-FIIBKNAM,2,10)
IF E1IDB02 BA-FIIKWAER = CNY and LEN(E1IDB02 BB-FIIBKNAM)>11
then MID(E1IDB02 BB-FIIBKNAM,12,11)
IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1IDB02 BB-FIIBKNAM)<=35
then MID(E1IDB02 BB-STRAS,1,35)
IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1IDB02 BB-FIIBKNAM)>35
then MID(E1IDB02 BB-FIIBKNAM,36,35)
E1IDB02 -- is a segment name with occurence 1..1
BA and BB are the qualifiers
FIIBKNAM is the field name.
I am unable to map this as the condition has to be given with two qualifiers at a time.
Can some one help me out on this. Can we define the UDF where we can store this information as temporary variable. If UDF can be defined, please let me know with the details.
Regards,
Manoj
Thnaks for your support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj,
You can try using graphical funciton..
E1IDB02 BA-FIIKWAER = CNY(use constant to store this value)
LEN(E1IDB02 BB-FIIBKNAM)<=11 (use greater than less than function) -
>AND( use and operator between these two)
else repeat the same according to the condition and map to receiver field--->MID(E1IDB02 BB-FIIBKNAM,2,10)
Hope i am clear.
Please try with this..if you struck in middle,please let me know.
Thanks and Regards,
Chandu.
Message was edited by:
Chandu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manojkumar,
Change the source filed <b>context</b>. In mapping editor select the source field and right click and select context ( which is root to that source field). select the node of having occurance 0...unbounded or 1..unbounded.
I guess it should work fine...try this and let me know.
Thanks and Regards,
Chandu.
HI,
Yes, but you have to write your own UDF ,
but i can give example use this to solve your problem.
IF E1IDB02 BA-FIIKWAER = CNY
then MID(E1EDKA1 BE-NAME1,12,11)
1)
input E1EDKA1 BE-NAME1,E1IDB02 BA-FIIKWAER
if (E1IDB02 BA-FIIKWAER = CNY) {
return substring(E1EDKA1 BE-NAME1,12,11);
}
2)
input E1EDKA1 BE-NAME1,E1IDB02 BA-FIIKWAER
IF (E1IDB02 BA-FIIKWAER <> CNY ) && ( (E1EDKA1 BE-NAME1).length<=35)
{
return substring(E1EDKA1 BE-STRAS,1,35);
}
3)
IF (E1IDB02 BA-FIIKWAER <> CNY) && ((E1EDKA1 BE-NAME1).length>35)
{
return substring(E1EDKA1 BE-NAME1,36,35);
}
Before map this first map with same level of empty constant and concat it, if it is empty,later map with substring.
Regards
Chilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.