cancel
Showing results for 
Search instead for 
Did you mean: 

how to change the order of item records?

Former Member
0 Kudos

Hello,

IDOC - File

Required Structure:

Header

item1

child1

item2

child2

item3

child3

File now generating in the following manner:

Header

item1

item2

item3

child1

child2

child3

what changes do I need to make in order to get the required strucutre in the file?

so that for each item, the child gets displayed?

Nikhil.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Nikhil,

Can you paste the XML Target Structure and the Content Conversion....

Regards,

Manju.

Former Member
0 Kudos

Target structure:

+MT_TARGET

++TARGET

+++Header

+++Orderitm

+++Ordchild

The Orderitm and Ordchild get the data from an IDOC segment named ZE1XYZ

so I have mapped Orderitm and Ordchild to ZE1XYZ.

thus, how many no of times, that ZE1XYZ repeat, im getting those many item and child records but they are being displayed in the following order.

+MT_TARGET

++TARGET

+++Header

+++Orderitm

+++Orderitm

+++Orderitm

+++Ordchild

+++Ordchild

+++Ordchild

===

the desired output should be:

+MT_TARGET

++TARGET

+++Header

+++Orderitm

+++Ordchild

+++Orderitm

+++Ordchild

+++Orderitm

+++Ordchild

Nikhil.

prabhu_s2
Active Contributor
0 Kudos

can u have ur target DT as if i had undersstood ur requirement correctly, ordchild contains items relevant to orderitm:

+MT_TARGET

++TARGET

+++Header

+++Orderitm

++++Ordchild

Former Member
0 Kudos

PS :

The FCC parameters are :

Recordset strcuture : HEADER,Orderitm,Ordchild

HEADER.fieldSeparator : |

HEADER.endSeparator : 'nl'

Orderitm.fieldSeparator:|

Orderitm.endSeparator : 'nl'

Ordchild.fieldSeparator : |

Ordchild.endSeparator : 'nl'

Former Member
0 Kudos

Prabhu,

do you want me to place Ordchild inside Orderitm?

that was the case previously but it wasnt displaying all the fields from the second repetetion onwards

thus, the Ordchild was put on the same heirarchy as that of Oderitm and Header

cant i achieve my required output format without changing DT?

prabhu_s2
Active Contributor
0 Kudos

by changing the DT for the target u can have the target data in the below format

+MT_TARGET

++TARGET

+++Header

+++Orderitm

++++Ordchild

+++Orderitm

++++Ordchild

+++Orderitm

++++Ordchild

FCC has nothing to do with it for framing target data. it can be contolled in mapping

Former Member
0 Kudos

Nikhi,

If you map the field TARGET in the Target Structure to your Source IDOC,I think should work.

You can check this out first in the (Test Tab) in mapping itself.If it does not work fine there..there is no point in looking at other things.

prabhu_s2
Active Contributor
0 Kudos

maybe using udf u can acheive this without changing the DT.

<b>You can check this out first in the (Test Tab) in mapping itself.If it does not work fine there..there is no point in looking at other things.</b>

it shud work with the below DT

+MT_TARGET

++TARGET

+++Header

+++Orderitm

++++Ordchild

...if it doenst the mapping is not correct

Message was edited by:

Prabhu S

Former Member
0 Kudos

its working now

thanks

Answers (1)

Answers (1)

prabhu_s2
Active Contributor
0 Kudos

change the DT of the target and perform mapping