cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Issues

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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.