Wednesday, April 6, 2011

Issue billing document output in XML format

This document describes basically how to trigger XML file from ABAP program.

Requirement

Issue billing document output in XML format.

Create an output type for XML in NACE. Define driver program to the output type.

Create a structure in SE11 to hold billing document data.

In the driver program fill this structure with related data.

Create transformation in XSLT_TOOL. Go to XSLT_TOOL. Give transformation name and select create. Give description of the transformation and select transformation type “Simple Transformation”.

Use wizard to create XML lines for the transformation. Select wizard from the tool bar.



Select the root node, right click and insert new root.

Drag the node “INVOICE” from the root node and drop in the Sample transformation window.

Save and go back. XML source code is created in the editor. Now change the as per requirement. Select “Pretty Printer”, save and activate the transformation.

In the driver program call the transformation exporting structure with all required invoice details.

Limitations

For “UTF-8”encoding use data type XSTRING to collect XML file.

For “UTF-16” encoding use data type string to collect XML file.

Issue Output

Run transaction VF31, select output type for XML output execute.



1 comment:

Geetha said...

Thanks a lot. This is really helpful. Could please post more about the invoice struc. header & details.

Thanks,
Gita

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive

goodsites