2006 Nov 14 9:22 PM
Hi,
After generating the ALV report i have to download these records in CSV format that to based on select/Deselect records.
ex: 1000 vijay JKL
1001 Raj JKL
1002 Ram VKL
1005 Raghu KIN
JKL,VKL and KIN all are company code if they select 1000,1002 & 1005 then if they press create button it should create 3 CSV files based on Company code.
Waiting for reply
Thanks in Advance
Sathvik
2006 Nov 14 9:47 PM
Hi,
Even if you using SEL_MODE there must be some field in your internal table to refer the field for selection button..
You must have given some field name in the layout structure BOX_FNAME.
use that field to check the records that are selected..
Thanks,
Naren
Hi,
After generating the ALV report i have to download these records in CSV format that to based on select/Deselect records.
ex: 1000 vijay JKL
1001 Raj JKL
1002 Ram VKL
1005 Raghu KIN
JKL,VKL and KIN all are company code if they select 1000,1002 & 1005 then if they press create button it should create 3 CSV files based on Company code.
Waiting for reply
Thanks in Advance
Sathvik
2006 Nov 14 9:31 PM
Hi,
use the GUI_DOWNLOAD and download the records..If you have the check box field as SELKZ..Try the following.
DATA: ITAB_TEMP LIKE ITAB OCCURS 0 WITH HEADER LINE.
DATA: ITAB_DOWN LIKE ITAB OCCURS 0 WITH HEADER LINE.
DATA: V_COMPANY_CODE TYPE BUKRS.
LOOP AT ITAB WHERE SELKZ = 'X'.
APPEND ITAB TO ITAB_TEMP.
ENDLOOP.
SORT ITAB_TEMP BY COMPANY_CODE.
LOOP AT ITAB_TEMP.
IF ITAB_TEMP-COMPANY_CODE <> V_BUKRS.
CONCATENATE V_FILENAME V_BUKRS INTO V_FILENAME.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING FILENAME = V_FILENAME
...............
REFRESH ITAB_DOWN.
ENDIF.
MOVE ITAB_TEMP TO ITAB_DOWN.
APPEND ITAB_DOWN.
AT LAST.
CONCATENATE V_FILENAME V_BUKRS INTO V_FILENAME.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING FILENAME = V_FILENAME
...............
ENDAT.
V_BUKRS = ITAB_TEMP-BUKRS.
ENDLOOP.
Thanks,
Naren
2006 Nov 14 9:36 PM
2006 Nov 14 9:47 PM
Hi,
Even if you using SEL_MODE there must be some field in your internal table to refer the field for selection button..
You must have given some field name in the layout structure BOX_FNAME.
use that field to check the records that are selected..
Thanks,
Naren
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |