2013 Oct 10 6:52 AM
Hi Experts,
I am using GUI_DOWNLOAD function to create a CSV file with data .
But, I am not able to create column headings for the data.
I am importing the data to an internal table using select query.
Then I converting this data to csv format using SAP_CONVERT_TO_TEX_FORMAT.
Then I am using GUI_DOWNLOAD to generate the file.
I want to import column headings also into this file.
Please help me !
Regards,
Narsingh
2013 Oct 10 7:20 AM
Dear Narsigh subudhi,
Just use the new ITAB the one you already have it. Append your fields name before downloading the file and then append lines of your old itab into new itab.
clear: your old itab.
and use it in download you will get the required results.
CLEAR: WA_DATA.
CONCATENATE 'LIFNR' 'NAME1' 'AUGBL' 'XBLNR'
'BELNR' 'BUDAT' 'BLDAT' 'WRBTR' 'WAERS'
'ZTERM' 'TEXT1' 'VALUT' 'CYCLE' 'BEGDA'
'AGEIN' 'EBELN' 'BUKRS' 'GJAHR' INTO WA_DATA-field SEPARATED BY ','.
APPEND WA_DATA TO I_DATA1.
APPEND LINES OF I_DATA[] TO I_DATA1[].
Hi Experts,
I am using GUI_DOWNLOAD function to create a CSV file with data .
But, I am not able to create column headings for the data.
I am importing the data to an internal table using select query.
Then I converting this data to csv format using SAP_CONVERT_TO_TEX_FORMAT.
Then I am using GUI_DOWNLOAD to generate the file.
I want to import column headings also into this file.
Please help me !
Regards,
Narsingh
2013 Oct 10 7:08 AM
2013 Oct 10 7:26 AM
Giri, I think these link won't work with CSV file format. Correct me if i am wrong.
2013 Oct 10 7:20 AM
Dear Narsigh subudhi,
Just use the new ITAB the one you already have it. Append your fields name before downloading the file and then append lines of your old itab into new itab.
clear: your old itab.
and use it in download you will get the required results.
CLEAR: WA_DATA.
CONCATENATE 'LIFNR' 'NAME1' 'AUGBL' 'XBLNR'
'BELNR' 'BUDAT' 'BLDAT' 'WRBTR' 'WAERS'
'ZTERM' 'TEXT1' 'VALUT' 'CYCLE' 'BEGDA'
'AGEIN' 'EBELN' 'BUKRS' 'GJAHR' INTO WA_DATA-field SEPARATED BY ','.
APPEND WA_DATA TO I_DATA1.
APPEND LINES OF I_DATA[] TO I_DATA1[].
2013 Oct 10 10:12 AM
2013 Oct 10 7:36 AM
Hi K Narsingh
Before downloading the data from internal table. You have to concatenate the required Header separated by ";". Then append the data from the internal table.
Hope it helps you.
Regards,
Krishna Chaitanya.
2013 Oct 10 10:52 AM
Hi Narsingh,
Yeah is given one way you got Column Heading and another way if you using "GUI_DOWNLOAD" use "FieldNames " Tabular Parameter .
Out Put : data with column heading's .
Note : It is For '.Xls' Format but Concept is Same for Capturing Column Heading .
Check below link..
How to Download Leading With Zeros from SAP to Excel Sheet using GUI_Download Function Module - A...
Regard's
Smruti
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |