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

xml to text

Former Member
0 Likes
805

Hallow

i have xml string and I wont to move it to text page that u can see like

<b>Ex.1</b> I have a internal table with data from r3 (person_tab) and I use call transformation to move it to string <b>id_xml</b> but now I wont to move it to text file like in ex.1 and I don’t now how ,in function gui_upload u need to use tables .

What can I do ?

regards

data:id_xml type string.

CALL TRANSFORMATION ('ID')

SOURCE itab = person_tab

RESULT XML <b>ld_xml</b>.

<b>Ex.1</b>

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/abapxml" version="1.0">

<xsl:template match="//I_DATA">

<asx:abap xmlns:asx="http://www.sap.com/abapxml">

<asx:values>

<I_DATA>

<xsl:for-each select="DETAIL">

<I_DATA1>

<KEY1>

<xsl:value-of select="KEY1"/>

</KEY1>

<KEY2>

<xsl:value-of select="KEY2"/>

</KEY2>

<CONT>.........

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
777

plz some one can tell me

if i cant do that

regards

Hallow

i have xml string and I wont to move it to text page that u can see like

<b>Ex.1</b> I have a internal table with data from r3 (person_tab) and I use call transformation to move it to string <b>id_xml</b> but now I wont to move it to text file like in ex.1 and I don’t now how ,in function gui_upload u need to use tables .

What can I do ?

regards

data:id_xml type string.

CALL TRANSFORMATION ('ID')

SOURCE itab = person_tab

RESULT XML <b>ld_xml</b>.

<b>Ex.1</b>

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/abapxml" version="1.0">

<xsl:template match="//I_DATA">

<asx:abap xmlns:asx="http://www.sap.com/abapxml">

<asx:values>

<I_DATA>

<xsl:for-each select="DETAIL">

<I_DATA1>

<KEY1>

<xsl:value-of select="KEY1"/>

</KEY1>

<KEY2>

<xsl:value-of select="KEY2"/>

</KEY2>

<CONT>.........

5 REPLIES 5
Read only

Former Member
0 Likes
777

hi all

maybe i have to use onther function?

regards

Read only

Former Member
0 Likes
778

plz some one can tell me

if i cant do that

regards

Read only

0 Likes
777

check this thread

you need to create a internal table and move your xml to the itab and then use gui_download

Raja

Read only

0 Likes
777

hi Durairaj Athavan Raja

i decleare itab type table of char 255

u have a better sugstion ?

my qustion is how i organize the file like ex.1 that i bring above

or i cant do that

regards

Read only

0 Likes
777

if you know the length use

itab type table of char 50000 or

itab type standard table of string.

Raja