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

Function Module

Former Member
0 Likes
812

Hi Experts,

Can any body has sample code to use the FM TEXT_CONVERT_XML_TO_SAP...??

Which converts XML file to Text file.

Because we can't test that FM in SE37.

7 REPLIES 7
Read only

eddy_declercq
Active Contributor
0 Likes
736

Hi,

Have a look at this thread:

Eddy

PS.

Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.

Spread the wor(l)d!

Read only

0 Likes
736

Try this:


REPORT ZHK_XML3 . 
type-pools: TRUXS. 
data: TAB_RAW_DATA TYPE TRUXS_XML_TABLE, 
TOT_SIZE TYPE I, 
TOT_SIZE1 TYPE I. 

data: begin of TAB_CONVERTED_DATA occurs 0, 
data1(250) type c, 
end of TAB_CONVERTED_DATA. 

DATA: FILENAME1 LIKE RLGRAP-FILENAME. 

FILENAME1 = 'C:hkcmnicfg.xml'. 


CALL FUNCTION 'TEXT_CONVERT_XML_TO_SAP' 
  EXPORTING 
    I_FIELD_SEPERATOR = ';' 
    I_TAB_RAW_DATA = TAB_RAW_DATA 
    I_FILENAME = FILENAME1
    I_TOTALSIZE = TOT_SIZE 
  TABLES 
    I_TAB_CONVERTED_DATA = TAB_CONVERTED_DATA.

Read only

0 Likes
736

Hi All,

Thanks..

Read only

0 Likes
736

Hi,

When i exicute your code it is going to short dump.It says:

A RAISE statement in the program "SAPLTRUX " raised the exceptio

condition "CONVERSION_FAILED".

Since the exception was not intercepted by a superior program

in the hierarchy, processing was terminated.

Short description of exception condition:

For detailed documentation of the exception condition, use

Transaction SE37 (Function Library). You can take the called

function module from the display of active calls.

Any suggessions on this?

Regards

Read only

Laxmana_Appana_
Active Contributor
0 Likes
736

Hi,

if you run any FM , if it gives error 'Error generating the test frame' , then write a program and call this FM in your program , it will work.

check this link :

Regards

Appana

Read only

Former Member
0 Likes
736

hi ravi,

check these threads...

Read only

Former Member
0 Likes
736

Hi Ravi,

Check this link. Hope it will help.

Regards,

Bhavana