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

Convert data to XML format and send it to application server

Former Member
0 Likes
985

Hi,

My requirement is to convert internal table data into XML format and after that transfer it to Application server. Can any of you send me the sample code for the requirement or any step by step approach.

Regards,

Mukesh Kumar

Hi,

My requirement is to convert internal table data into XML format and after that transfer it to Application server. Can any of you send me the sample code for the requirement or any step by step approach.

Regards,

Mukesh Kumar

4 REPLIES 4
Read only

Former Member
0 Likes
603

Use this FM



WS_EXCEL

Read only

Former Member
0 Likes
603

hi

for convert data into xml format

i am giving samle code to you

u try to understand the logic and do,

it is very easy one,

2. for sending to application server

u use open dataset .

it will solve your problems,

ztest

perform get_filename using filename 'S'.

CHECK NOT rlgrap-filename IS INITIAL.

concatenate rlgrap-filename extn into pathname

separated by separator.

ftype = rlgrap-filetype.

ftype = 'ASC'.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = pathname

FILETYPE = ftype

WRITE_FIELD_SEPARATOR = 'X'

TRUNC_TRAILING_BLANKS = 'X'

TABLES

DATA_TAB = disp_tab2

EXCEPTIONS

FILE_WRITE_ERROR = 1.

Read only

Former Member
0 Likes
603

1st convert the internal table data to XML by using call transformation

like:

DATA:

lt_t005 TYPE STANDARD TABLE OF t005.

TYPES:

xmlline(1024) TYPE x.

DATA:

lt_xml TYPE STANDARD TABLE OF xmlline.

SELECT * FROM t005 INTO TABLE lt_t005.

CALL TRANSFORMATION id

SOURCE data_node = lt_t005

RESULT XML lt_xml.

Now create an file in application server using open dataset statement and then transfer the table (lt_xml) content to the file..

Regards,

JOy.

Read only

Former Member
0 Likes
603

HI mukesh,

to do that you need to do a CALL TRANSFORMATION ,to convert data into XML format from ABAP and then use GUI_download to deposit the file in the application server.

the t-code to create the transformation in STRANS.

hope it helps,

regards,

babu