0% found this document useful (0 votes)
42 views10 pages

Billing Outout in XML Format (ABAP To XML)

This document outlines the process for generating billing output in XML format from ABAP data, detailing the necessary system requirements, SAP configuration, and development steps. It includes instructions for defining output types in NACE, creating structures for invoice data, and using transformation tools to generate XML. The expected outcome is the ability to execute billing runs and produce XML outputs for invoices successfully.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views10 pages

Billing Outout in XML Format (ABAP To XML)

This document outlines the process for generating billing output in XML format from ABAP data, detailing the necessary system requirements, SAP configuration, and development steps. It includes instructions for defining output types in NACE, creating structures for invoice data, and using transformation tools to generate XML. The expected outcome is the ability to execute billing runs and produce XML outputs for invoices successfully.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

KM: How To Series

Billing output in XML format (ABAP to XML)

Version 1.0

Dibya Ranjan Pradhan


Rahul Kadukar
How To Series

Table of Contents

Contents

Background.....................................................................................................................................3
Business Requirement:...............................................................................................................3
Define output type for XML format and use translation tool to generate XML from ABAP data
type.............................................................................................................................................3
Prerequisites...................................................................................................................................3
System Requirements:................................................................................................................3
SAP Configuration:......................................................................................................................3
Process Flow...................................................................................................................................4
Billing output in XML format through transaction VF01/VF02/VF03/VF31....................................4
Sample Development.....................................................................................................................4
Expected Outcome.........................................................................................................................8
FAQ’s..............................................................................................................................................9

Billing output in XML format (ABAP to XML) Page 2


Dibya Pradhan, Rahul Kadukar, Deloitte, R10
How To Series

Background

Business Requirement:
The Business requires to issue billing output in XML format. Based on the output
types defined in the system we can issue billing output as print output, FAX, email
and EDI.
When billing run (VF31) is done client may require billing output in PDF/XML format.

Define output type for XML format and use translation tool to generate XML
from ABAP data type.
This document will cover the creation transformation using transaction
STRANS/XSLT_TOOL. This document also contains details about defining output type
in NACE for XML output.

Prerequisites

System Requirements:
SAP ECC 6.0 System
Access to STRANS, NACE, ABAP Developer access.

SAP Configuration:
 Output type for XML output needs to be defined in NACE for application billing
(V3).
 Assign driver program for medium “Print output” and Form routine “Entry”.

Billing output in XML format (ABAP to XML) Page 3


Dibya Pradhan, Rahul Kadukar, Deloitte, R10
How To Series

Billing output in XML format (ABAP to XML) Page 4


Dibya Pradhan, Rahul Kadukar, Deloitte, R10
How To Series

Process Flow
Billing output in XML format through transaction VF01/VF02/VF03/VF31

Sample Development

Development activities
The following development activities are needed:
1. Create a structure to hold all invoice data. E.g. structure with a header
invoice structure and deep invoice item structure.
2. Create a transformation using the custom structure created above.
3. Create a driver program to fetch and populate invoice details to the custom
structure. Call transformation and generate XML.
4. Assign driver program to the output type for XML in NACE.

Detailed Technical Approach:

Billing output in XML format (ABAP to XML) Page 5


Dibya Pradhan, Rahul Kadukar, Deloitte, R10
How To Series

1. Create a structure to hold all invoice data.


1. Create structures to hold invoice header and item data.

Billing output in XML format (ABAP to XML) Page 6


Dibya Pradhan, Rahul Kadukar, Deloitte, R10
How To Series

2. Create a transformation using the custom structure created


above.
1. Create transformation in XSLT_TOOL/STRANS. Go to
XSLT_TOOL/STRANS. Give transformation name and select create.
Give description of the transformation and select transformation type
“Simple Transformation.

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

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

Billing output in XML format (ABAP to XML) Page 7


Dibya Pradhan, Rahul Kadukar, Deloitte, R10
How To Series

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

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

3. Create a driver program to fetch and populate invoice details to


the custom structure. Call transformation and generate XML.
1. In the driver program call the transformation exporting structure with
all required invoice details.

Billing output in XML format (ABAP to XML) Page 8


Dibya Pradhan, Rahul Kadukar, Deloitte, R10
How To Series

2. Code can be written to download the XML string on the specified


location or to preview the XML. To preview XML function module
“SCOL_TRACE_SHOW_XML” can be used.
4. Assign driver program to the output type for XML in NACE.
1. Create an output type for XML in NACE. Define driver program to the
output type.

Expected Outcome

Once above development is complete:


1. To generate invoice output in XML format, execute billing run (VF31) with XML
output type.

2. XML is downloaded or previewed online.

Billing output in XML format (ABAP to XML) Page 9


Dibya Pradhan, Rahul Kadukar, Deloitte, R10
How To Series

FAQ’s

1. How to add new fields to the XML?


Define the field in the structure. Populate the field in the driver program. In the
transformation drag the field. Define <TAG> for the field. Select pretty printer
and activate the transformation.

2. How to handle UTF-8/UTF-16 XML format.

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


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

Billing output in XML format (ABAP to XML) Page 10


Dibya Pradhan, Rahul Kadukar, Deloitte, R10

You might also like