on 08-19-2009 3:26 PM
Hello,
There is a situation where I need to multiply the value of an EDI field D_6060 under segment C_C186 under S_QTY with the same field value of D_6060 of second occurance of S_QTY and map the result to an output IDOC field.
The structure of the EDI source file is shown below:
LIST u2013 1....1 (root node)
S_UNB u2013 1....1
S_UNH u2013 1....unbounded
G_SSG25 u2013 0....200000
S_LIN u2013 1....1
S_QTY u2013 0...10
C_C186 u2013 1...1
D_6063 u2013 1...1 (xsd:string)
D_6060 u2013 1...1 (xsd:decimal)
D_6411 u2013 0...1 (xsd:string)
Any suggestions will be highly appreciated.
Thanks,
Subhajit.
Hi Subhajit,
If it is always a multiplication of the first two occurances of D_6060 field under S_QTY, you can write a small UDF to meet your requirement.
Input: D_6060 (After removing Contexts , Use removeContext function)
UDF type , chose as Queue.
Pseudo Code:
* Declare two int type variables to get the first and second value of the D_6060
v_first = D_6060[0];
v_second = D_6060[1].
v_result = v_first*v_second.
* Convert the int type v_result into string type v_result_str
result.addValue(v_result_str).
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Give a try :
Use the u201CIndexu201D for S_QTY and map "index" and "constant= 2" to u201CequalsAu201D pass this to if of u201Cif thenu201D, for then map D_6060, map the output of "if then" to the target field.
Regards,
Venu V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use standard function useOneUsMany.
1st parameter = D_6060;
2nd = S_QTY
3rd = S_QTY
Regards
Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.