Application Development 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: 

Problem with Call Transformation (ABAP to XML)

0 Kudos
348

Hello

I call the tranformation function to serialize. I want to convert a ABAP internal table into XML.One of the column type is of time(t). On transformation, the values are changed.

Ex : If I have a value of 000009 (time format), on calling transformation it gets converted to 00:00:09. I dont want this conversion. I want to have the value as it is. I cant change the column data type from time to string.

Regards

Raghavendra

3 REPLIES 3

Former Member
0 Kudos
180

Former Member
0 Kudos
180

hi

good

try this code

Just look at this piece of code, I think it should help you.

DATA : ITAB TYPE TABLE OF SPFLI,

L_XML TYPE REF TO CL_XML_DOCUMENT.

SELECT * FROM SPFLI INTO TABLE ITAB.

  • CREATE THE XML OBJECT

CREATE OBJECT L_XML.

  • CONVERT THE DATA TO XML

CALL METHOD L_XML->CREATE_WITH_DATA( DATAOBJECT = ITAB[] ).

  • DATA IS CONVERTED TO XML; DISPLAY THE XML-DOCUMENT

CALL METHOD L_XML->DISPLAY.

thanks

mrutyun^

0 Kudos
180

Hi

Thanks all for the reply.

But here is what I am actually looking for...

I have the following code piece of code

DATA: l_t_data TYPE REF TO DATA.

field-symbols: <l_t_data> type standard table.

I do some processing....

assign l_t_data->* to <l_t_data>.

call transformation id source PAGE = <l_t_data> result XML E_DYNDATA_RETURN.

But the table <l_t_data> has one column of data type time.Since the field is of type time, on tranforming, the values are 'Converted' (Ex: values '000009' changes to 00:00:09, which I dont want).

Regards

Raghavendra