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

XML format for outbound

Former Member
0 Likes
907

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

5 REPLIES 5
Read only

Former Member
0 Likes
791

From WE21 create a port of type xml FILE it will create the outbound idoc in XML format.....

Read only

0 Likes
791

Hi

Thanks for the reply.

I am not creating any idoc?just need the outbound output file in xml format.

can u suggest?

Read only

uwe_schieferstein
Active Contributor
0 Likes
791

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

Read only

0 Likes
791

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

Read only

0 Likes
791

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