Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV GRID

Former Member
0 Likes
575

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
541

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

3 REPLIES 3
Read only

Former Member
0 Likes
541

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

Read only

0 Likes
541

i am not putting check box i am using sel_mode.

Read only

Former Member
0 Likes
542

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