ABAP

ABAP
Showing posts with label sm69 commands and using. Show all posts
Showing posts with label sm69 commands and using. Show all posts

Thursday, January 3, 2013

XML upload download

*-------------- DATA
data : t001 like table of yautmm0004 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 tabloadı into table t001 up to 2 rows.

*------------------- 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 = 'c:\dene.xml'
tables
data_tab = itab.

******************************* SECOND PHASE
******************************* SECOND PHASE
******************************* SECOND PHASE
*BREAK-POINT.
*REFRESH t001.
*CLEAR t001.

call function 'GUI_UPLOAD'
exporting
filename = 'C:\dene.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.

Total Pageviews