04-27-2012 1:54 AM
dear all my friends
i have five internal tables that i would like to convert them to xml files put them in an ftp server directory .
which function modules that i should use please support me with a code sample .
thanks
Moderator message: please do more research before posting.
Message was edited by: Thomas Zloch
04-27-2012 2:26 AM
Hi,
Regarding XML conversion, if you have Class CL_SALV_TABLE in your system, it has a Method TO_XML which you can use to convert to XML, below is the sample logic.
****************************************************
DATA: gcl_alv TYPE REF TO cl_salv_table,
v_xstring TYPE xstring.
v_msg TYPE REF TO cx_salv_msg.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = gcl_alv
CHANGING
t_table = i_itab ).
CATCH v_msg INTO lx_msg.
ENDTRY.
v_xstring = gcl_alv->to_xml( '04' ) .
******************************************************
V_STRING will the internal table data in XML format. Similarly use create for other internal tables.
Thanks & Regards
Bala Krishna