cancel
Showing results for 
Search instead for 
Did you mean: 

Display the records as parent and child nodes

Former Member
0 Kudos

Source IDOC has the followign fields :

MATNR

STLNR

IDNRK

STLNR1

Receiver side file :

Mat_stock

+Mat_level

++field1

++field2

++field3

++BOM

++BOM_parent

The Mapping rules I need to follow are:

STLNR is corresponding parent material ID of MATNR

STLNR1 is corresponding child material ID of IDNRK

If STLNR exists, fetch corresponding MATNR

same way if IDNRK exists, fetch corresponding STLNR1 and compare it with STLNR. If they are same, insert the first row for Mat_stock in such a way that Matnr exists as parent BOM

same way, since STLNR == STLNR1, display Mat_stock as a record with IDNRK as the child node

how do I do this? please help

thanks and regards,

Venkat.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Nikhil,

Provide the sample test data of Source and how the data should be look like in Target.With your post Target Structure is fine.Waht about Source ? All your Four fields you mentioned are in same heirarchie level ? Provide the Idoc name , So that u can get more help from all.

Cheers

Veera

0 Kudos

Hi Nikhil,

Looking at your scenario it seems that it can be done by using UDFs but the scenario would be more clear if you let me know which IDoc you are using.

Regards,

Amit.

Former Member
0 Kudos

The source is BOMMAT03

the destination is a file

with the above specified data format

Former Member
0 Kudos

Amit,

I tried writing a UDF by taking 4 inputs (for all 4 nodes)

but its not working out.

I am not so gud @ writing UDF.

Can you help me please?

thanks

Nikhil