cancel
Showing results for 
Search instead for 
Did you mean: 

Processing xml in abap mapping

Former Member
0 Kudos

Hi all,

I use abap mapping to create XML from Idoc, I use if_ixml interface to do it.

In my code I use method get_elements_by_tag_name (on object if_ixml_document)

to find all elements with the same name:

I checked my mapping in SXI_MAPPING_TEST and it is working when I put formatted idoc

(with many lines, one tag in one line).

But when I put one long line with all tags in one line (XI receives idoc in such format from ECC)

method get_elements_by_tag_name does not return any result.

I checked also others searching methods but without results.

It looks like only first 255 characters are processed. When element, which I am looking for,

is in further position, it is not finding.

Does anyone know what is a root cause of such situation and how can I resolve my problem?

Best Regards,

Przemek

Accepted Solutions (0)

Answers (2)

Answers (2)

udo_martens
Active Contributor
0 Kudos

Hi Przemek,

method get_elements_by_tag_name() worked fine for me, even mapping IDocs. I assume it is just the test environment but the during runtime it will work. So make one runtime test and then test with formatted XML.

Regards,

Udo

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

did you have a look at abap mapping section of the wiki ?

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=79955426

there are so many coding samples

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michal,

Thanks for your link.

I searched sdn, not only Process Integration forum, but I did not find answer why it is not working.

When I comment part with get_elements_by_tag_name my mapping is working fine.

Best Regards,

Przemek

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

get_elements_by_tag_name work fine for all my abap mappings so you must be doing wrong something else

the code from this page works for IDOCs also:

http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm

with small changes to the nodes so maybe compare it with yours

Regards,

Michal Krawczyk