on 05-12-2006 9:05 AM
i have ztable and i want to download it to *.txt.
1. my colmn is z1,z2,z3,z4
i can change it when i download to z3,z4,z1,z2
2. i have matnr(18) that have only 10 bytes
i can download 10 bytes and the 8 spaces too, i want all the 18.
3.do you have simple source code for this?
Hi liat,
Yeah you can do that. To do that create separate
itab for download like below example.
* TABLE TO STORE THE DOWNLOAD DATA
DATA : BEGIN OF I_DWLD OCCURS 0,
FIELD1(60) TYPE C,
FIELD2(72) TYPE C,
FIELD3(72) TYPE C,
FIELD4(20) TYPE C,
FIELD5(20) TYPE C,
END OF I_DWLD.
What ever format you want to downlaod u populate this
itab and then download it.
I_DWLD-FIELD1 = 'TRANSACTION CODE'.
I_DWLD-FIELD2 = 'PROGRAM NAME'.
I_DWLD-FIELD3 = 'TRANSACTION DESCRIPTION'.
I_DWLD-FIELD4 = 'SOURCE'.
I_DWLD-FIELD5 = 'USAGE'.
APPEND I_DWLD.
CLEAR I_DWLD.
Hope this will help you.
Thanks&Regards,
Siri.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
easiest way is
goto SE16 , give ur tablename , in the menu settings-->user parameter
select ALVGRID display
then display the data and use the export functionality in ALV GRID to download the data
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check at SE16 transaction, there are functions to export data to a text file...
If you need a program to download these data several times, you can in a report, populate data into an internal table and download it using function module GUI_DOWNLOAD
Hop this help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi liat,
1. i have matnr(18) that have only 10 bytes
i can download 10 bytes and the 8 spaces too, i want all the 18.
It will come by default.
2. just copy paste to check it.
report abc.
*----
data : begin of itab occurs 0,
matnr like mara-matnr,
pernr like p0001-pernr,
end of itab.
*----
itab-matnr = '1234567890'.
itab-pernr = '1'.
append itab.
itab-matnr = '55'.
itab-pernr = '2'.
append itab.
*----
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'd:\abc.txt'
TABLES
DATA_TAB = itab
.
regards,
amit m.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.