Skip to Content
avatar image
Former Member

How to convert from XML string to ABAP Structure


I have a XML string such as:

<?xml version="1.0" encoding="UTF-8"?>
<posting xmlns="">
	<bkpf belnr="1700001284">
		<bseg buzei="001">
		<bseg buzei="002">

It contains accounting document data. Also, on the ABAP Dictionary, I have the following structures:

ZPOSTING: 1 field, named posting, with data type ZBKPF

ZBKPF: Fields BELNR, BUKRS, GJAHR, BLART, BLDAT, BUDAT and TCODE. Also, I have a field named BSEG, that refers to a Table Type with line type BSEG.

I need to convert the XML string into an ABAP variable of type ZPOSTING, with all corresponding values. Please note that BSEG is a table.

How can I achieve this? I though about using CALL TRANSFORMATION and XML deserialization, but I couldn't find any examples.

PS: I'm using NetWeaver 2004s, SP 11.

Thanks in advance!


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 03, 2008 at 03:49 PM
    Add comment
    10|10000 characters needed characters exceeded