cancel
Showing results for 
Search instead for 
Did you mean: 

Sending IDOC Values

Former Member
0 Kudos

Hi,

I have one standard IDOC in R/3 with One segment and inside we have 3 fields.

Normally this IDOC will be having multiple line item values while triggering from R/3 to XI.

Sample IDOC Input Payload

<?xml version="1.0" encoding="UTF-8" ?>

<ns0:createHierarchy xmlns:ns0="http://www.XXX.com/">

<ns0:locationId>C1</ns0:locationId>

<ns0:param_Hierarchy>

<ns0:Hierarchy>

<ns0:internalId>7070</ns0:internalId>

<ns0:externalId>FF0101001</ns0:externalId>

<ns0:description>FOOD</ns0:description>

<ns0:parentId>FF0101</ns0:parentId>

</ns0:Hierarchy>

<ns0:Hierarchy>

<ns0:internalId>7070</ns0:internalId>

<ns0:externalId>FF</ns0:externalId>

<ns0:description>FOOD2</ns0:description>

<ns0:parentId>F</ns0:parentId>

</ns0:Hierarchy>

</ns0:param_Hierarchy>

</ns0:createHierarchy>

I want Output payload as

<?xml version="1.0" encoding="UTF-8" ?>

<ns0:createHierarchy xmlns:ns0="http://www.XXX.com/">

<ns0:locationId>C1</ns0:locationId>

<ns0:param_Hierarchy>

<ns0:Hierarchy>

<ns0:internalId>7070</ns0:internalId>

<ns0:externalId>FF</ns0:externalId>

<ns0:description>FOOD2</ns0:description>

<ns0:parentId>F</ns0:parentId>

</ns0:Hierarchy>

<ns0:Hierarchy>

<ns0:internalId>7070</ns0:internalId>

<ns0:externalId>FF0101001</ns0:externalId>

<ns0:description>FOOD</ns0:description>

<ns0:parentId>FF0101</ns0:parentId>

</ns0:Hierarchy>

</ns0:param_Hierarchy>

</ns0:createHierarchy>

Iam getting the values from input in one order and i want the output values in completely reverse order

Please suggest how to do this

Regards

Suman

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Suman,

the sort function in the graphical functions is NOT appropriate, because only the children of the field you use the functions are not getting sorted.

Best is to use a XSLT Mapping. You can sort all fields at onces.

http://www.xml.com/pub/a/2002/07/03/transform.html

http://www.w3.org/TR/xslt#sorting

Regards Mario

Former Member
0 Kudos

Hi,

No, i dont want to use any other mapping other than Graphical .

Here the values which are comming from R/3 is one order and as it is that order is creating in output file

But i want to change the order of the values.

Like I want to have the second value as first input value and the frirst as second

Regards

Suman

Former Member
0 Kudos

Hello,

On what basis you want to sort the records? Generally sort functionality is not available in Graphical Mapping..but we can achieve but for that we need to have complex code in UDF.

Thanks,

Vijay Kumar T.

Former Member
0 Kudos

Hi,

Any Updates

Regards

Suman