cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a node in ABAP Mapping

Former Member
0 Kudos

Hello All,

I need to create the follwoing structure using ABAP mapping

<IDocFlatFile>

<FlatFile>

<FlatFileString/>

</FlatFile>

</IDocFlatFile>

With the follwoing code

data irc type i.

data: odocument type ref to if_ixml_document.

odocument = ixmlfactory->create_document( ).

data: IDocFlatFile type ref to if_ixml_element.

IDocFlatFile = odocument->create_simple_element(

name = 'IDocFlatFile'

parent = odocument ).

data: fileString type ref to if_ixml_element.

fileString = odocument->create_simple_element(

name = 'FlatFileString'

value = t_result

parent = IDocFlatFile ).

I am able to generate the

<IDocFlatFile>

<FlatFileString/>

</IDocFlatFile>

But I want to add one more level (<FlatFile>

) in the structure. Can any one help me in doing the same.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Nanda,

I think you are tyring to convert IDOC into IDOC Flat file. If yes then please check this document:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc...

Also you can send the IDoc to a flat file, creating a type file port. If you send the IDoc in this way, you have the complete idoc in the flat file. If you want like this please see this thread (Kanth solution):

Regards,

---Satish

Former Member
0 Kudos

The problem has been solved now.