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

abap to xml

Former Member
0 Likes
1,030

hallow

i wont to now if there is function that u can import abap

to xml

regards

hallow

i wont to now if there is function that u can import abap

to xml

regards

8 REPLIES 8
Read only

Former Member
0 Likes
988

<b>import file</b>

Read only

0 Likes
988

Hi,

Can you try this function module ALINK_XML_CREATE_COMPONENT

Else

what sap application data you want to make xml is it for forms or else related to Adobe.

Uday.

Read only

Former Member
0 Likes
988

Hi,

Please check this sample program.

1. ABAP Internal Table -


> XML

XML ---> ABAP Internal Table

2. This program will show both.

3. It will do this for

T001 table.

4. Just copy paste in new program.

REPORT abc.

*----


DATA

DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.

DATA : BEGIN OF itab OCCURS 0,

a(100) TYPE c,

END OF itab.

DATA: xml_out TYPE string .

DATA : BEGIN OF upl OCCURS 0,

f(255) TYPE c,

END OF upl.

DATA: xmlupl TYPE string .

                                                              • FIRST PHASE

                                                              • FIRST PHASE

                                                              • FIRST PHASE

*----


Fetch Data

SELECT * FROM t001 INTO TABLE t001.

*----


XML

CALL TRANSFORMATION ('ID')

SOURCE tab = t001[]

RESULT XML xml_out.

*----


Convert to TABLE

CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'

EXPORTING

i_string = xml_out

i_tabline_length = 100

TABLES

et_table = itab.

*----


Download

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filetype = 'BIN'

filename = 'd:\xx.xml'

TABLES

data_tab = itab.

                                                              • SECOND PHASE

                                                              • SECOND PHASE

                                                              • SECOND PHASE

BREAK-POINT.

REFRESH t001.

CLEAR t001.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = 'D:\XX.XML'

filetype = 'BIN'

TABLES

data_tab = upl.

LOOP AT upl.

CONCATENATE xmlupl upl-f INTO xmlupl.

ENDLOOP.

*----


XML

CALL TRANSFORMATION ('ID')

SOURCE XML xmlupl

RESULT tab = t001[]

.

BREAK-POINT.

Regards,

Ferry Lianto

Read only

0 Likes
988

Hi Ferry,

I have checked this Program,

This is perfect fine.

we can use this logic to generate the XML source code.

Uday.

Read only

Former Member
0 Likes
988

If you working in SMART forms means we can specify the ouptut in defining the global settings>Form attributes>Click output options tab and we can select the required output format

Read only

0 Likes
988

Hi Mahesh,

yaa Mahesh generally default format is there i.e standard format when u start download the form we can see the XML generated format.

Yes we can choose from format output then also we can get the XML out put.

Uday

Read only

Former Member
0 Likes
988

Hi,

Refer to the following link:

http://sap-img.com/abap/sample-xml-source-code-for-sap.htm

Hope this helps.

Reward if helpful.

regards,

Sipra

Read only

Former Member
0 Likes
988

View examples and interfaces of SAP parser in package SIXML. Find blogs in snd too