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
366

Hallow

I wont to move file of mine to xml I have internal table with data person_tab

And I wont to move the data in format utf-8 anyone can tell me how ?

(I don’t now xml) I use call transformation and after the function gui_download but

I get the file like ex.2 (iso...)and not ex.1 some one can explain how I can change it, if it possible?

Regards.

TYPES : BEGIN OF 1_itab,

werks TYPE persa,

persg TYPE persg,

persk TYPE persk,

orgeh TYPE orgeh,

stell TYPE stell,

END OF 1_itab.

DATA : person_tab TYPE TABLE OF 1_itab,

wa_person_tab LIKE LINE OF <b>person_tab</b>

TYPES: BEGIN OF ttab,

record(65535) TYPE c,

END OF ttab.

DATA: <b>xml_table</b> TYPE TABLE OF ttab.

CALL TRANSFORMATION ('ID')

SOURCE itab = <b>person_tab</b>

RESULT XML <b>xml_table</b>.

ex.1

<b>this is what i wont</b>

<?xml version="1.0" encoding="<b>UTF-8</b>" ?>

-

ex.2

this is what i get

<?xml version="1.0" encoding="iso-8859-8-i"?>

<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><ITAB><item><OPRTION_CODE/><CARDNUMBER>000000</CARDNUMBER><CONTACLESSCOUNTER1>00</CONTACLESSCOUNTER1><PERID>156328452</PERID><BANKNO>00</BANKNO><FIRSTNAMEHEBREW.......>

Hallow

I wont to move file of mine to xml I have internal table with data person_tab

And I wont to move the data in format utf-8 anyone can tell me how ?

(I don’t now xml) I use call transformation and after the function gui_download but

I get the file like ex.2 (iso...)and not ex.1 some one can explain how I can change it, if it possible?

Regards.

TYPES : BEGIN OF 1_itab,

werks TYPE persa,

persg TYPE persg,

persk TYPE persk,

orgeh TYPE orgeh,

stell TYPE stell,

END OF 1_itab.

DATA : person_tab TYPE TABLE OF 1_itab,

wa_person_tab LIKE LINE OF <b>person_tab</b>

TYPES: BEGIN OF ttab,

record(65535) TYPE c,

END OF ttab.

DATA: <b>xml_table</b> TYPE TABLE OF ttab.

CALL TRANSFORMATION ('ID')

SOURCE itab = <b>person_tab</b>

RESULT XML <b>xml_table</b>.

ex.1

<b>this is what i wont</b>

<?xml version="1.0" encoding="<b>UTF-8</b>" ?>

-

ex.2

this is what i get

<?xml version="1.0" encoding="iso-8859-8-i"?>

<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><ITAB><item><OPRTION_CODE/><CARDNUMBER>000000</CARDNUMBER><CONTACLESSCOUNTER1>00</CONTACLESSCOUNTER1><PERID>156328452</PERID><BANKNO>00</BANKNO><FIRSTNAMEHEBREW.......>

1 REPLY 1
Read only

Former Member
0 Likes
342

Hi,

Check the program from the following link:

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

Regards,

Bhaskar