‎2009 Aug 27 6:23 PM
Hello all,
I have a requirement in which I need to write a program that retrieves employeee master data and create XML output. I know how to retrieve employee master data and I am using logical database PNP and all that but I am just wondering if there is any function module/class from SAP that gives me employee master data directly in XML format!
I did reserach on SDN but could not find much information. If there is no FM module available, could someone please give me some ideas on how I can create an XML output of the employee master data?
Thanks.
Mithun
‎2009 Aug 27 6:29 PM
Hello Ravi,
Try this way:
Read master data into internal table.
use call transformation to convert that internal table data into XML.
You can use call transformation as follows:
DATA ITAB TYPE TABLE OF <master data table> WITH HEADER LINE...
DATA XML_STRING TYPE STRING.
CALL TRANSFORMATION ID
SOURCE MATDAT = ITAB[]
RESULT XML XML_STRING.
Hope this helps!
Thanks,
Augustin.