on 08-17-2010 3:54 AM
Hi Experts
I am working on on a SOAP to IDOC scenario where I have the parent node as VconditionRecordScale defined as 0-Unbounded on the sender side and I have the input as
Input:
<VConditionRecordScale> (0-9999)
<VScaleValue>20000.000</VScaleValue>
<VConditionValue>3.0000</VConditionValue>
</VConditionRecordScale>
<VConditionRecordScale>
<VScaleValue>10000.000</VScaleValue>
<VConditionValue>3.0500</VConditionValue>
</VConditionRecordScale>
<VConditionRecordScale>
<VScaleValue>5000.000</VScaleValue>
<VConditionValue>3.1000</VConditionValue>
</VConditionRecordScale>
<VConditionRecordScale>
<VScaleValue>1000.000</VScaleValue>
<VConditionValue>3.2500</VConditionValue>
</VConditionRecordScale>
<VConditionRecordScale>
<VScaleValue>100.000</VScaleValue>
<VConditionValue>4.5000</VConditionValue>
</VConditionRecordScale>
OutPut Should be in the reverse (i.e from bottom to top)
<E1KNOW> (0-9999)
<KSTBW>100.000<KSTBW>
<KBETR>4.5000<KBETR>
<KSTBW>1000.000<KSTBW>
<KBETR>3.2500<KBETR>
<KSTBW>5000.000<KSTBW>
<KBETR>3.1000<KBETR>
<KSTBW>10000.000<KSTBW>
<KBETR>3.0500<KBETR>
<KSTBW>20000.000<KSTBW>
<KBETR>3.0000<KBETR>
</E1KNOW>
Please let me know how can I write the UDF to acive this
Thanks
PR
Hi PR,
Use this below code
Map source side VConditionRecordScale node to target side E1KNOW node
Map VScaleValue udf1 KSTBW
Map VConditionValue udf1 KBETR
Create Queue type UDF with input parameter as a
int n=a.length
for(int i=n-1; i=>0 ; i--)
result.addValue(a<i>);
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi PR,
You can achieve this by writting a small UDF.
Take all the input values in a single context and send this as input to UDF, store all the input values in a String array and send this values in reverse order as output.
Thanks,
Hemanth.
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.