2012 Oct 10 10:13 PM
Hi guys,
I have converted the internal table into xml format....and the out of xml format is display the data in the horizontal way:
I have use this logic:
CALL TRANSFORMATION ZFQMR_QAL_DATMAP_MES
SOURCE table = it_final
RESULT XML xmlstr.
APPEND xmlstr TO xml_tab.
MOVE '.XLS' TO default_extension.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
FILENAME = 'C:\TEST'
FILETYPE = 'ASC'
*
TABLES
DATA_TAB = xml_tab
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
output of xml:I want the the data to display in the vertical nt horizontal
how can i achieve this?
<Column ss:Span="1" ss:Width="47.25"/><Row ss:Height="60"><Cell ss:StyleID="s151"><Data ss:Type="String">Sample ID</Data></Cell><Cell ss:StyleID="s152"><Data ss:Type="String">Current or Last Inspection Lot for the Sample</Data></Cell></Row><Row><Cell><Data ss:Type="String">000100000000</Data></Cell><Cell><Data ss:Type="String">000000000000</Data></Cell></Row><Row><Cell><Data ss:Type="String">000100000001</Data></Cell><Cell><Data ss:Type="String">000000000000</Data></Cell></Row><Row><Cell><Data ss:Type="String">000100000002</Data></Cell><Cell><Data ss:Type="String">000000000000</Data></Cell></Row><Row><Cell><Data ss:Type="String">000100000003</Data></Cell><Cell><Data ss:Type="String">000000000000</Data></Cell></Row><Row><Cell><Data
Hi guys,
I have converted the internal table into xml format....and the out of xml format is display the data in the horizontal way:
I have use this logic:
CALL TRANSFORMATION ZFQMR_QAL_DATMAP_MES
SOURCE table = it_final
RESULT XML xmlstr.
APPEND xmlstr TO xml_tab.
MOVE '.XLS' TO default_extension.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
FILENAME = 'C:\TEST'
FILETYPE = 'ASC'
*
TABLES
DATA_TAB = xml_tab
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
output of xml:I want the the data to display in the vertical nt horizontal
how can i achieve this?
<Column ss:Span="1" ss:Width="47.25"/><Row ss:Height="60"><Cell ss:StyleID="s151"><Data ss:Type="String">Sample ID</Data></Cell><Cell ss:StyleID="s152"><Data ss:Type="String">Current or Last Inspection Lot for the Sample</Data></Cell></Row><Row><Cell><Data ss:Type="String">000100000000</Data></Cell><Cell><Data ss:Type="String">000000000000</Data></Cell></Row><Row><Cell><Data ss:Type="String">000100000001</Data></Cell><Cell><Data ss:Type="String">000000000000</Data></Cell></Row><Row><Cell><Data ss:Type="String">000100000002</Data></Cell><Cell><Data ss:Type="String">000000000000</Data></Cell></Row><Row><Cell><Data ss:Type="String">000100000003</Data></Cell><Cell><Data ss:Type="String">000000000000</Data></Cell></Row><Row><Cell><Data
2012 Oct 11 8:00 AM
Drag your XML to browser (eg: IE), then you will see the XML in vertical hierarchy format.
Regards,
Xavier
2012 Oct 11 10:22 AM
Hi,
If you are opening the document in notepad, wordpad or word, then this does not take the XML formating and takes as the string of characters. Hence you will see the data in horizontal way.
Try opening the document with IE, or XML tools or Notepad++, you will see the same in the XML format.
Regards,
Hardik Mehta
2012 Oct 11 10:27 AM
Hi,
use this
CALL METHOD document->append_child
EXPORTING
new_child = xml_schema
RECEIVING
rval = rc.
CHECK rc = 0.
* --> creation of the body
LOOP AT elements ASSIGNING <element>.
IF NOT <element> IS INITIAL.
CALL METHOD xml_schema->append_child
EXPORTING
new_child = <element>
RECEIVING
rval = rc.
IF rc NE 0.
EXIT.
ENDIF.
ENDIF.
ENDLOOP.
2012 Oct 12 11:20 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |