Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Filling an XML structure with data

Former Member
0 Likes
461

Hi

I’m about to write a program that shall do GL postings based on IDocs, using standard FM BAPI_ACC_DOCUMENT_POST.

The challenge is that the program shall return the results of the postings back to the sending system in XML-format.

The interface team has defined an XML/XSD/WSDL document containing the required structure:

<i><?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_Receipt xmlns:ns0="http://www.compello.com/xi/glposting">

<Header>

<Filler1/>

<Title/>

<Filler2/>

<Filler3/>

<Filler4/>

<Filler5/>

<Filler6/>

<Filler7/>

<Filler8/>

<b><Bilagsnr/></b>

<Filler9/>

</Header>

<b><Error> (Occurrence = 0 .. unbounded)

<Filler1/>

<ErrorCode/>

<ErrorText/>

</Error></b>

</ns0:MT_Receipt></i>

…and I’m supposed to fill this structure with the reference document number in the element <Bilagsnr/> and all messages returned from the BAPI (except those of type ‘I’ and ‘S’) in the <Error>-table.

I have tried to understand what to do by looking into several threads, but as I am quite a novice when it comes to XML, I’m still a bit uncertain of how to solve this task.

Can anyone give an example how to solve this, preferably referring to the above described structure?

I’m working on an SAP ECC 6.0 system.

Thanks

1 REPLY 1
Read only

Former Member
0 Likes
327

Not exactly a rush of answers, maybe I should have posted it in the XI forum instead. However, I finally managed to resolve it myself.

Message was edited by:

Ole Kristian Branæ