on 11-14-2008 11:38 AM
Hi ,
I want to implement below logic in XI.
Target filed is ADJUST_TYPE.
Source fields are E1P0000-MASSN and E1P0000-MASSG
The combination of the 2 would lead to the ADJUST_TYPE.
There is a combination mapping you need to follow based on the list of values given below:
Here an example:
IF E1P0000-MASSN = U5 and E1P0000-MASSG = DM.
ADJUST_TYPE = D.
ENDIF.
If the above condition fails then we need to check other records from the below table until a combination is found.
MASSN * MASSG * ADJUST_TYPE
_______________________________
U5 ***** DM ***** D
U6 ***** DM ***** D
U7 ***** DE ***** D
U7 ***** RE ***** E
U7 ***** GI ***** G
U7 ***** MI ***** M
V4 ***** ED ***** O
V4 ***** PS ***** O
V4 ***** UB ***** O
V6 ***** ML ***** O
V7 ***** MD ***** O
V8 ***** MD ***** O
U5 ***** PR ***** P
U6 ***** PR ***** P
U7 ***** QL ***** Q
U7 ***** SI ***** S
U5 ***** LL ***** T
U6 ***** FP ***** T
U6 ***** IR ***** T
U6 ***** LL ***** T
U6 ***** PF ***** T
U6 ***** TR ***** T
Below are values that need excluding: meaning that if we have a combination read of below, then ADJUST_TYPE = spaces:
An example:
IF E1P0000-MASSN = U8 and E1P0000-MASSG = AC.
ADJUST_TYPE = spaces or ' '.
ENDIF.
MASSN * MASSG
_______________
U8 ***** AC
U9 ***** CC
V1 ***** RC
V9 ***** D1
V9 ***** D2
W1 ***** DC
W1 ***** RF
W1 ***** VT
W2 ***** SD
W2 ***** SP
W2 ***** SS
W3 ***** DD
W3 ***** NE
U3 ***** AJ
U3 ***** AR
U3 ***** PS
U3 ***** RS
U4 ***** DC
U4 ***** LT
U4 ***** OT
U4 ***** RF
U4 ***** TC
U1 ***** AQ
U1 ***** NH
U1 ***** RE
Based on 2 tables the ADJUST_TYPE is filled. That means we need to check the combination for above table and also a combination for below table. If a combination from a below table is found then ADJUST_TYPE is balnk. Please let me know how to implement the logic. I want to use graphical mapping. But using boolean statments for all the values in tables above become cumbersome. Can anyone tell whether we can write a UDF for the above required logic or any other alternative is there.
Regards
Suresh
Edited by: mariosuresh on Nov 14, 2008 12:41 PM
Hi,
maybe you could concat your two input values and then use a Fix value function.
U5DM -> D
.
.
.
U8AC -> ' '
.
.
.
Default Value -> ??
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the reply. I have one question. Can I use two fixvalues functions for each table seperately. ie., two fix value functions in single field mapping.
Best Regards
Suresh Kasu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply.
So once the values are concatenated and two tables are created then how can i compare the two source fields with these values. First I will be checking the table 2 and if the combination is found then target field is assigned space else the 1st table is checked for combination and if a record is found then the appropriate value is assigned. The target field(adjust_type) is one but I need to check the two tables at the same time.
Best Regards
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Concat the 2 source fields MASSN and MASSG. So in case E1P0000-MASSN = U5 and E1P0000-MASSG = DM, concatenation would become U5DM. Now for your first table, use standard XI function -> Fix Mapping, in the following format
Key******* Value
U5DM ***** D
U6DM ***** D
U7DE ***** D
U7RE ***** E
Same way for the second table also u may provide blanks in value.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Refer the below to write UDFs for similar value mappings.
https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/fileLookupin+UDF
Regards,
Jilan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.