Skip to Content
0
Sep 03, 2023 at 09:03 PM

SAP PO JSON Respose - Parse to XML

130 Views

Hello All,

I have requirement to convert JSON response into XML and parse only the rows values into target system. can you help me to achiever it through XSLT or anyother mapping in SAP PO. Like For Columns "Workcenter_Code" value of first record is "S_A114M1" and value of second record is "S_A114M1" so I need only the all the 10 values for each record and map it to target structure and don't need other elements like outputs,rowlimitexceeded and transaction. I tried with message mapping but during conversion rows values are not getting converted as expected. Kindly help me on it.

{"outputs":

{"Result_Code":null,

"Result_Error":null,

"Result_Message":null},

"tables":[

{"columns":

["Workcenter_Code","Part_No","Job_No","Operation_Code","Log_Date","Workcenter_Status","Duration","Op_No","Update_Date","Shift"],

"rows":[

["S_A114M1","6026581","7603942","Laserschweißen (laserweld)","2023-07-01T05:00:00Z","09 Aus (Off)",8.00000,10,"2023-08-30T09:57:00Z","3rd"],

["S_A114M1","6026581","7603942","Laserschweißen (laserweld)","2023-07-03T13:00:00Z","09 Aus (Off)",8.00000,10,"2023-08-30T09:57:00Z","2nd"],],

"rowLimitExceeded":false}],

"transactionNo":"258654"

}

Output XML

<MessageType>

<Workcenter_Code>S_A114M1</Workcenter_Code>

<Part_No>6026581</Part_No>