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

Reading the Application server file into XML format

Former Member
0 Likes
1,276

Hi All,

I have a file in application server..i m reading that file and i have stored the file in internal table...is there any provision to show that in XML format...As i have stored the XML format data into application server and then again i want to read that file in XML format from a report..IS this possible...

1 ACCEPTED SOLUTION
Read only

former_member192432
Participant
0 Likes
1,018

Hi ,

Please try this class method class : CL_EX_ISHMED_MV_CONVERT_XMLOUT

method : IF_EX_ISHMED_MV_CONVERTER~CONVERT_DOCUMENT

I never used it but try this out .

Regards

Chetan

6 REPLIES 6
Read only

Lukas_Weigelt
Active Contributor
0 Likes
1,018

I didn't unserstand what you ultimately want to do.

I understood you have an XML file on your application server and you read it in, probably with OPEN DATASET, READ DATASET, from there into your program.

1. Why do you read it into an internal table and not into a variable of type Xstring?

2. Do you mean you want to display the XML File which you read from the application server? If yes, you have to read the file into an XSTRING variable and then use FM "DISPLAY_XML_STRING"

If this doesn't help you, please clarify your question.

Cheers, Lukas

Read only

0 Likes
1,018

Hi Lukas...Thanks for ur reply...

Actually i am having .XML (In tcode FDTA)file... by using BADI i am saving the .XML data in application server directly(as in the BADI i am getting the data in form of internal table of type TAB_DMEE_OUTPUT_FILE) so i am saving the file in AL11 by .TXT format(can i save directly that file in .XML format in AL11??)..so now i have created a new report that will call the AL11 file in .TXT format and do some modification and store in some other folder in AL11..in the report i am placing one pushbutton to see what are all the modifications done...so for this purpose i want to view this in .XML format...I hope u understood it...

Read only

0 Likes
1,018

Okay, I think I got it. This is what I understood from your explanation:

You got some XML-data in a BADI of the type TAB_DMEE_OUTPUT_FILE, so initially the XML data you are provided with are in text form and not in binary form. You then save this XML-Data in Text-Form on the Application Server. Then you alter this text-file with another program and shift the altered file, which is still of text-format, into another directory. Then you want to look at the text-file in XML Format as its contents is actually XML.

Try this for your button:

DATA: lv_xstring.

OPEN DATASET <absolute path on application server to textfile> FOR INPUT IN BINARY MODE.

READ DATASET <absolute path on application server to textfile> INTO lv_xstring.

CLOSE DATASET <absolute path on application server to textfile>.

CALL FUNCTION 'DISPLAY_XML_STRING'

EXPORTING

xml_string = lv_xstring.

Cheers, Lukas

Read only

0 Likes
1,018

i m using 4.6c...there is no FM DISPLAY_XML_STRING ...any other FM available...

Read only

former_member192432
Participant
0 Likes
1,019

Hi ,

Please try this class method class : CL_EX_ISHMED_MV_CONVERT_XMLOUT

method : IF_EX_ISHMED_MV_CONVERTER~CONVERT_DOCUMENT

I never used it but try this out .

Regards

Chetan