Skip to Content
0
Sep 28, 2010 at 06:42 AM

ALV GRID EXPORT TO XML

653 Views

Dear Madam / Sir,

Firstly thank you very much for attending my question.

My question is regarding Excise Dealer Return (India) to be filed in XML format.

I have completed ALV GRID with all required fields, but the XML portion is pending just because I don't know how to make XML as per Sample Format given by Excise Dept.

Although I have tried to make XML file by putting below mentioned code but the format is not as required:

FORM create_xml .
  DATA : l_xml TYPE REF TO cl_xml_document,
         sysubrc TYPE sy-subrc .
* CREATE THE XML OBJECT
  CREATE OBJECT l_xml.

* CONVERT THE DATA TO XML
  CALL METHOD l_xml->create_with_data( dataobject = gt_finalx[] ).

* DATA IS CONVERTED TO XML; DISPLAY THE XML-DOCUMENT
  CALL METHOD l_xml->display.
ENDFORM.                    " CREATE_XML

===========================================================

Below is the sample XML content provided by Excise Dept. in which the XML file must be created.

Kindly guide me as to how to make XML as per the format required.

With Warm Regards,

SAMPLE XML CODE PROVIDED BY EXCISE DEPT.

=======================================

- <ACES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ACES_DLR.xsd";>

- <RETURN ReturnType="DLR" ToolVer="1.0";>
- <HEADER-DATA>
  <RETURN-YEAR>2009</RETURN-YEAR> 
  <QUARTER>Jul-Sep</QUARTER> 
  <DEALER-NAME>ABC Limited</DEALER-NAME> 
  <REGISTRATION-NUMBER>BFMPS5767QXD001</REGISTRATION-NUMBER> 
  <NIL-RETURN>No</NIL-RETURN> 
  </HEADER-DATA>
- <INVOICE-HEADER>
- <INVOICE-PARTICULARS SL-NO="1">
  <INVOICE-NUMBER>12365897777777771541</INVOICE-NUMBER> 
  <INVOICE-DATE>15/11/2009</INVOICE-DATE> 
- <INVOICE-ITEMS>
  <DESCRIPTION-OF-GOODS>details of goods</DESCRIPTION-OF-GOODS> 
  <CETSH-NUMBER>01019020</CETSH-NUMBER> 
  <QUANTITY-CODE>U</QUANTITY-CODE> 
  <QUANTITY>1235.00<;/QUANTITY> 
  <AMOUNT-OF-DUTY-INVOLVED>226584.00<;/AMOUNT-OF-DUTY-INVOLVED> 
  </INVOICE-ITEMS>
- <INVOICE-ITEMS>
  <DESCRIPTION-OF-GOODS>details of goods</DESCRIPTION-OF-GOODS> 
  <CETSH-NUMBER>84369100</CETSH-NUMBER> 
  <QUANTITY-CODE>KG</QUANTITY-CODE> 
  <QUANTITY>3368.00<;/QUANTITY> 
  <AMOUNT-OF-DUTY-INVOLVED>99653.00<;/AMOUNT-OF-DUTY-INVOLVED> 
  </INVOICE-ITEMS>
  </INVOICE-PARTICULARS>
- <INVOICE-PARTICULARS SL-NO="2">
  <INVOICE-NUMBER>12556523655542154445</INVOICE-NUMBER> 
  <INVOICE-DATE>11/10/2009</INVOICE-DATE> 
- <INVOICE-ITEMS>
  <DESCRIPTION-OF-GOODS>details</DESCRIPTION-OF-GOODS> 
  <CETSH-NUMBER>63064900</CETSH-NUMBER> 
  <QUANTITY-CODE>U</QUANTITY-CODE> 
  <QUANTITY>456.00<;/QUANTITY> 
  <AMOUNT-OF-DUTY-INVOLVED>2236.00<;/AMOUNT-OF-DUTY-INVOLVED> 
  </INVOICE-ITEMS>
  </INVOICE-PARTICULARS>
  </INVOICE-HEADER>
- <DOCUMENT-HEADER>
- <DOCUMENT-DETAIL SL-NO="1">
  <INVOICE-BILL-ENTRY-NO>55623255451145</INVOICE-BILL-ENTRY-NO> 
  <DATE>17/10/2009</DATE> 
  <ISSUED-BY>Manufacturer</ISSUED-BY> 
  <REGISTRATION-NUMBER>BFMPS5767QXD002</REGISTRATION-NUMBER> 
  <NAME>SEZ ltd</NAME> 
  <ADDRESS>udyog vihar</ADDRESS> 
- <INVOICE-ITEMS>
  <DESCRIPTION-OF-GOODS>goods desc</DESCRIPTION-OF-GOODS> 
  <CETSH-NUMBER>84079020</CETSH-NUMBER> 
  <QUANTITY-CODE>U</QUANTITY-CODE> 
  <QUANTITY>66</QUANTITY> 
  <AMOUNT-OF-DUTY-INVOLVED>9999999999999</AMOUNT-OF-DUTY-INVOLVED> 
  </INVOICE-ITEMS>
- <INVOICE-ITEMS>
  <DESCRIPTION-OF-GOODS>Description Of Goods</DESCRIPTION-OF-GOODS> 
  <CETSH-NUMBER>84079020</CETSH-NUMBER> 
  <QUANTITY-CODE>U</QUANTITY-CODE> 
  <QUANTITY>21.00<;/QUANTITY> 
  <AMOUNT-OF-DUTY-INVOLVED>23.00<;/AMOUNT-OF-DUTY-INVOLVED> 
  </INVOICE-ITEMS>
  </DOCUMENT-DETAIL>
- <DOCUMENT-DETAIL SL-NO="2">
  <INVOICE-BILL-ENTRY-NO>556232554511889</INVOICE-BILL-ENTRY-NO> 
  <DATE>17/11/2009</DATE> 
  <ISSUED-BY>Importer</ISSUED-BY> 
  <REGISTRATION-NUMBER>BFMPS5767QXD005</REGISTRATION-NUMBER> 
  <NAME>SEG sec</NAME> 
  <ADDRESS>sec 2 ggn</ADDRESS> 
- <INVOICE-ITEMS>
  <DESCRIPTION-OF-GOODS>test data</DESCRIPTION-OF-GOODS> 
  <CETSH-NUMBER>44109092</CETSH-NUMBER> 
  <QUANTITY-CODE>KG</QUANTITY-CODE> 
  <QUANTITY>88.00<;/QUANTITY> 
  <AMOUNT-OF-DUTY-INVOLVED>256.00<;/AMOUNT-OF-DUTY-INVOLVED> 
  </INVOICE-ITEMS>
  </DOCUMENT-DETAIL>
  </DOCUMENT-HEADER>
- <SELF-ASSESSMENT-MEMORANDAM>
  <DATE>08/12/2009</DATE> 
  <PLACE>gurgaon</PLACE> 
  <REMARKS>Return for jul-sep 2009</REMARKS> 
  </SELF-ASSESSMENT-MEMORANDAM>
  </RETURN>
  </ACES>