cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical mapping error

Former Member
0 Kudos

Gurus,

need help on 2 issues i face in graphical mapping. Am doing a idoc to file(txt) scenario which work fine for single item delivery.

a) in case of multiple item delivery, i run into error "Cannot produce target element". I tested this out in debug mode in message mapping with xml file, found that mapping is working for the header & first item, but errors out when the tags are opened for the second itemline. i get "Cannot produce target element /ns0:MT_OBDEL/Item[2]/DELID"

b) the std idoc i use, has a segment which is repetitive. I want to map one of the segment occurance(say for field f1 = 'C') alone and map its value to a field on file. how to do this ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi BRamchan !

a) It seems that your target message structure is not as expected. You should create a dummy structure with occurs = 0..unbounded (for example) that inside contains the structures that could appear multiple times. Then you should map the 0..unbound structure from the source to the 0..ubound of the target...and the 0..1 or 1..1 of the source with the 0..1 or 1..1 of the target... Please send target structure and I will tell you what is wrong.

b) you could use an advanced UDF that receives the complete queue for that field and only outputs the values you care. The advanced UDF could receive a list of values for the f1 source field and then by using a loop you could detect which values you want to keep and then build the output based on this criteria.

Regards,

Matias.

Former Member
0 Kudos

Matias,

for b)

I havent got faintest idea on java, appreciate if you can provide a sample code for this scenario.

justin_santhanam
Active Contributor
0 Kudos

BRamchan,

Can u give us the source and sample target structure(not the entire IDOC) . With an example.

raj.

Former Member
0 Kudos

The source is idoc TSPDLS01. E1TPDLH is the header seg and E1TPDLI is the item seg.

The target structure is like below:

Header (1:1)

delid (1:1)

warehouse(1:1)

customer(1:1)

Item(0:unbound)

delid(0:1)

warehouse(0:1)

delitm(0:1)

matnr(0:1)

justin_santhanam
Active Contributor
0 Kudos

BRamchan,

Which field did u mapped to <b>delid</b>? Are u using any criteria?

raj.

Former Member
0 Kudos

Hi BRamchan !!

you should map the E1TPDLH tag to the "Header" tag, then delid, warehouse,customer. Then map E1TPDLI to "Item". Then map E1TPDLI child elements to "Item" child elements.

Regards,

Matias.

Former Member
0 Kudos

I have done the nodal maps and individual field mappings as well.

like E1TPDLH is mapped to Header and E1TPDLI is mapped to Item.

Item-delid is mapped to E1TPDLH-delid. In the debug the first item is mapped to the delivery# value. The second item is causing the error, as seen in the message