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

Uploading XML file from application server into SAP internal table

Former Member
0 Likes
1,380

Hello Experts,

I need to convert the data from XML file which is on application server into an internal table and upload this data using BDC.

Since the file is on application server I can't use GUI_UPLOAD.

I have read the XML file into an internal table having char type field using the READ DATASET statement. But I'm not able to parse the file.

Can anybody please suggest me an alternative way so that I can directly get the values in an internal table.

I have tried using function modules SMUM_XML_PARSE and TEXT_CONVERT_XML_TO_SAP, but I'm not able to pass proper parameters to them

Please help !!! This is urgent.

Thanks in Advance.

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
845

read the XML using open data set into a variable of type string. and then use FM SCMS_STRING_TO_XSTRING to convert the string to xstring. pass the xstring to SMUM_XML_PARSE

Raja

Hello Experts,

I need to convert the data from XML file which is on application server into an internal table and upload this data using BDC.

Since the file is on application server I can't use GUI_UPLOAD.

I have read the XML file into an internal table having char type field using the READ DATASET statement. But I'm not able to parse the file.

Can anybody please suggest me an alternative way so that I can directly get the values in an internal table.

I have tried using function modules SMUM_XML_PARSE and TEXT_CONVERT_XML_TO_SAP, but I'm not able to pass proper parameters to them

Please help !!! This is urgent.

Thanks in Advance.

4 REPLIES 4
Read only

athavanraja
Active Contributor
0 Likes
846

read the XML using open data set into a variable of type string. and then use FM SCMS_STRING_TO_XSTRING to convert the string to xstring. pass the xstring to SMUM_XML_PARSE

Raja

Read only

0 Likes
845

Hi Raja,

I tried the same. But it not populating the table and giving an error message in the return table "line 1 col 1-unexpected symbol; expected '<', '</', entity reference, charac".

I can't find any ' ; ' in the XML file. What could be the possible reason of error?

Read only

0 Likes
845

Hi Raja,

My problem is solved with ur suggestion. Thanks a lot !!!

Regards

Radhika

Read only

0 Likes
845

Hi ,

How did u solve your problem can any one give me the idia.

thanks