cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Mapping,

Former Member
0 Kudos

Hi,

for a IDOC to CSV Conversion im Using an ABAP Mapping within my interface. To read the single IDOC fields im using the

following working statment.

el_element = idocument->find_from_path('/_-FOX_-SHPMNT03/IDOC/E1EDT20/E1ADRM4/NAME1').

But as E1ADRM4 occures two times I want to set a filter

el_element = idocument->find_from_path('/_-FOX_-SHPMNT03/IDOC/E1EDT20/E1ADRM4[PARTNER_Q=''OTP'']/NAME1').

and that does not work. Is find_from_path not fully XPATH 1.0 compatible?

Is there an other way to define a filter?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

kkram
Contributor
0 Kudos

Stefan

I would suggest you to use simple transformation to convert the xml to abap internal tables. It is much easier to deal with instead of hardcoding your xpath values in the program.

Once you have done your mapping, you could convert the internal tables back to xml.

I know this doesn't answer your question rather suggesting to use a different way of parsing your XML but it is worth to take a shot at it. Look for simple transformation in ABAP documentation.

KK