‎2008 Aug 01 1:36 PM
Hi all,
I need to read payroll results and then write an outbound which should appear in XML format.
Can anybody suggest me how to bring outbound file directly in XML?
thanks
siddartha
‎2008 Aug 01 1:42 PM
From WE21 create a port of type xml FILE it will create the outbound idoc in XML format.....
‎2008 Aug 01 1:44 PM
Hi
Thanks for the reply.
I am not creating any idoc?just need the outbound output file in xml format.
can u suggest?
‎2008 Aug 02 9:22 PM
Hello Siddartha
If you report is a customer report where you have the final output in an internal table then use XML transformation, e.g.:
DATA: gd_xml TYPE string,
gt_xml TYPE TABLE OF string.
CALL TRANSFORMATION ID ident
SOURCE itab = gt_itab
RESULT XML = gd_xml.
APPEND gd_xml TO gt_xml.
" Download to PC using CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
...Regards
Uwe
‎2008 Aug 03 5:56 PM
Thank you very much Uwe Schieferstein.
I need to create a header in XML format for those results.so still ur logic works for me?
please suggest.
thanks
‎2008 Aug 03 8:41 PM
Hello Siddartha
You just need to define the structure of your (complex) itab as required for the XML transformation, e.g.:
TYPES: BEGIN OF ty_s_list.
TYPES: header TYPE <structure of header>.
TYPES: data TYPE <table type of payroll data>.
TYPES: END OF ty_s_list.
TYPES: ty_t_list TYPE STANDARD TABLE OF ty_s_list
WITH DEFAULT KEY.
DATA: gt_list TYPE ty_t_list.
...
CALL TRANSFORMATION ID ident
SOURCE itab = gt_list
RESULT XML = gd_xml.
APPEND gd_xml TO gt_xml.
" Download to PC using CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
...
Regards
Uwe