2007 Aug 13 9:56 AM
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
2007 Aug 13 10:02 AM
2007 Aug 13 10:06 AM
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^
2007 Aug 13 10:23 AM
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