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

xml to sap

Former Member
0 Likes
418

Hi,

I converted xml file to sap using some PARSE FM's.

But internal table data is stored in the format like:

filedname value

kunnr afFff

name1 afafa

land1 us

. .

. .

. .

so on.

instead of this format I want my internal table in the format

kunnr name1 land1

aagag dgagg us.

Can any one give me some idea on this.

thanks inadvance.

Hi,

I converted xml file to sap using some PARSE FM's.

But internal table data is stored in the format like:

filedname value

kunnr afFff

name1 afafa

land1 us

. .

. .

. .

so on.

instead of this format I want my internal table in the format

kunnr name1 land1

aagag dgagg us.

Can any one give me some idea on this.

thanks inadvance.

2 REPLIES 2
Read only

Former Member
0 Likes
395

Hi,

Internal table which would have the same structure as in the excel file,so change the header(column wise) into rowwise.Then use FM.

Hope t vl work.f u hav any further help let me know.

Warm Regards,

Mohandoss P.

Read only

Former Member
0 Likes
395

Hi try the following program to convert form xml to sap rather u r FM :


data :response TYPE string.
Response is where u pass the xml file to it.

*FM converting the XML format to abap
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = response
IMPORTING
buffer = xml.

*FM converting XMl to readable format to a internal table.
CALL FUNCTION 'SMUM_XML_PARSE'
EXPORTING
xml_input = xml
TABLES
xml_table = t_xml
return = return.

Reward If Found Helpful.