on 07-22-2008 9:31 AM
Hello Friends,
I need some help in mapping through regular or UDF.
Requirment is I have target field CORD_CODE,
This needs to ge the value based on the segment values of EIEDT44-VSTEL
If VSTEL = CO10 then 1055
If VSTEL = CO11 then 1054
If VSTEL = CO13 then 1057
If VSTEL = CO12 then 1056
Like this.
Can we create UDF for the same or anyt other alternative?
<removed by moderator>
Regards
Ramesh
Edited by: Mike Pokraka on Jul 24, 2008 1:46 PM
hi
use fix values option in mapping.
take VSTEL as source and give fix value function in between source and target
in this fix value give values like
CO10 1055
CO11 1054
CO13 1057
CO12 1056
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramesh,
This error Cannot produce target element /ns0:MT_GuiaTransport/DELIVERY_RECORDS[2]/MERCK_COORD_CODE could be becaus of two reasons
1. Node VSTEL would have not been in the source structure.
2. Value in the node would have been different than the possible values.
Solution:
In addition to this graphical mapping
If VSTEL = CO10 then 1055 else drag and drop another if-then-else and if VSTEL = CO11 then 1054 else drag and drop another if-then-else and if VSTEL = CO13 then 1057 and drop another if-then-else and if VSTEL = CO12 then 1056 .....
1. First check if the node VSTEL exist then check the conditions else map a constant.
2. Add a constant to the else part of the last condition check i.e if VSTEL = CO12 then 1056 else constant.
Thanks
SaNv...
Just to elaborate:
If your source come like this
a
a
a
with no context change then your target field would also have to be
t
t
t
if you have an element above the t like this
Segment
t
Segment
t
Segment
t
then you will get your error.
So what you need to do it either split by value or change the context of your source node which you can do by right clicking on the source node in your graphical mapping
Edited by: Alex on Jul 22, 2008 11:23 AM
Hi,
you could use standard function FixValues (under Conversions).
Just put it between source and target and double click it on it.
A table will open where you could enter your value pairs.
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 ramesh,
you can handle it with IF Then Else conditions.....
If VSTEL = CO10 then 1055
If VSTEL = CO11 then 1054
If VSTEL = CO13 then 1057
If VSTEL = CO12 then 1056
If VSTEL = CO10 then 1055 else drag and drop another if-then-else and if VSTEL = CO11 then 1054 else drag and drop another if-then-else and if VSTEL = CO13 then 1057 and drop another if-then-else and if VSTEL = CO12 then 1056 .....
no need to go for UDF....
Thanks,
Madhu
Edited by: Madhu sudhan Reddy on Jul 22, 2008 10:34 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.