2007 May 13 11:06 AM
Hallow
I move file from internal table to xml
And I wont to now if I can change this context that automatic I get In file
<b><?xml version="1.0" encoding="iso-8859-8-i" ?>
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"></b>
Next question my table is in lower case and In file I get it in upper case ,how can I get it like I send (lower case).
Next here in my code I use ID (I TAKE IT FROM SDN) WHAT DOES IT MEAN
CALL TRANSFORMATION <b>('ID')</b>
SOURCE itab = person_tab
RESULT XML xml_table.
REGARDS
2007 May 14 7:10 AM
Hi,
you can take the help from this code :
*----
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 .
*----
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:\file_name.xml'
TABLES
data_tab = itab.
Regards,
Sandeep Kaushik
Hallow
I move file from internal table to xml
And I wont to now if I can change this context that automatic I get In file
<b><?xml version="1.0" encoding="iso-8859-8-i" ?>
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"></b>
Next question my table is in lower case and In file I get it in upper case ,how can I get it like I send (lower case).
Next here in my code I use ID (I TAKE IT FROM SDN) WHAT DOES IT MEAN
CALL TRANSFORMATION <b>('ID')</b>
SOURCE itab = person_tab
RESULT XML xml_table.
REGARDS
2007 May 14 6:56 AM
Q2. table name and filed name will always be in upper case
Q3. ID is the name of the XSLT program which is responsible for converting itab to xml format. (you can view the program from SE80->edito object->transformation)
2007 May 14 7:10 AM
Hi,
you can take the help from this code :
*----
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 .
*----
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:\file_name.xml'
TABLES
data_tab = itab.
Regards,
Sandeep Kaushik
2007 May 14 8:05 AM
Hello,
Why would you like to change the generated header?
It's generated automatically, so you can use the reverse transformation, ie from xml to abap...
Regards,
Walter
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |