on 02-17-2011 9:00 AM
Hi frnds,
i am doing an idoc-file scneario...below are teh strcuturess
Idoc:
---ZTXT(NOde)
---ZLine1(Subnode) [0:10 occurance]
Name(Attribute)
Value(Attribute)
File:
---TXT(NOde)
--Cost
--rate
--excValue
The Logic is if Name Attribute is equal to "Cost"(name of the field in target) then value should be mapped to "Cost" fieldOr if Name attribute is equal to "rate"(name of the field in target) then the value should be mapped to "rate"
I tried with using "if then" fn but when the Zline1 node is repeated with different its generating only one value on the target side . its not generating multiplpe values..(Ex say if we have values as cost and rate being repeated in Idoc its generating only one field cost in file no value is entered for rate )
Can you help me where i am going wrong..
Hi,
<ZLine1> -----> <TXT>
<@Name> --------------> <@value>-->
<equalsS> ------------------> <if then else> -----> <Cost>
<Constant = cost> -----> <constant = blank> --->
1) Map ZLine to TXT directly
2) Check if value of Name is equal to cost using equalsS Text function.
3) Map the output of equalsS to <if then else> and map the Value attribute to Then input and a constant blank to else input.
4) Map the if then else to Cost.
Similarly do the mapping for Rate.
This must satisfy your requirement.
Regards,
Aravind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Similar to this
<@Name> --------------> <@value>-->
<equalsS> ------------------> <if then else> -----> <Cost>
<Constant = cost> -----> <constant = blank> --->
Have you done the mapping for Rates as well?
<@Name> --------------> <@value>-->
<equalsS> ------------------> <if then else> -----> <Rate>
<Constant = rates> -----> <constant = blank> --->
Regards,
Aravind
U have to use the same logic on both the target fields...
for example- use this-
U need to keep the context at root node for the source field.
1.compare Name with constant value COST using equals function - output map to if without else - map it to Cost
2. compare Name with constant value RATE using equals function - output map to if without else - map it to RATE
chirag
right click on source and change context to higher node- and then apply the logic - compare the value with equals function then use if then else...
chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Can you please provide the occurance of Text , Cost and Value?
Please check Text node occurance ..
IF its multiple than you need to map it with Zline.
IF Cost and Value are having multiple occurance then
you need to make the context of Name and Value attribute in source structure to ZTXT level or
insert remove context function after source fields Name and Value (before IF then Else) in the mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>..(Ex say if we have values as cost and rate being repeated in Idoc its generating only one field cost in file no value is entered for rate )
As I understand, in source Idoc the Node ZLine1 will Either contain Name as Cost or Rate not both.
If your mapping for Txt is with ZLine1 segment than in each occurance of Txt either Cost will be populated or Rate value will be populated but not both.
Do you want to populate both(Cost and Rate) values in single TXT node ??
Can you provide the mapping you are using to populate TXT node?
User | Count |
---|---|
83 | |
24 | |
12 | |
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.