Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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!


Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question