Skip to Content
avatar image
Former Member

Graphical mapping error

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 ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Sep 18, 2007 at 08:38 PM

    BRamchan,

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

    raj.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Sep 18, 2007 at 08:44 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Matias,

      for b)

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