2006 Dec 08 11:58 AM
Hi,
I am calling ALV using 'REUSE_ALV_GRID_DISPLAY'.
I have a field which is a check box.
I need to process only those rows that are checked.
but when the control comes back to my code using USERCOMMAND the internal table is not updated with what i have checked on the screen.
how can i change that data.
thnx in advance
Hi,
I am calling ALV using 'REUSE_ALV_GRID_DISPLAY'.
I have a field which is a check box.
I need to process only those rows that are checked.
but when the control comes back to my code using USERCOMMAND the internal table is not updated with what i have checked on the screen.
how can i change that data.
thnx in advance
2006 Dec 08 12:09 PM
Hi,
Follow below proceedure
1. Say your fieldname in internal table is CHECKBOX
2. Hope you had added that in ur fieldcatalog
3. In ur layout wa_layout-box_fname = 'CHECKBOX'.
4. In the User command subroutine of REUSE_ALV_GRID_DISPLAY add this
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
P_SELFLD TYPE SLIS_SELFIELD.
Case p_ucomm.
When 'UPDATE'.
Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
_GRID = ref1.
call method ref1->check_changed_data
* here u can loop ur internal table
endcase.
ENDFORM.
Please let me know any clarification
2006 Dec 08 12:19 PM
Hi,
i tried ur solution bu the problem is that the ref1 doesn't point to the ALV that is displayed and gives a dump..if ref1 could refer to the ALV then it might solve the problem
2006 Dec 08 12:24 PM
Hi ,
there is no need for the ref to point to ALV , it is just a declaration , We had tried it so many times and it worked for ALV GRID DISPLAY or else
u can use FM REUSE_ALV_GRID_DISPLAY_LVC
2007 Jan 12 9:17 AM
You must set EDT_CLL_CB parameter of gt_gridsettings. you can see a example below :
data : gt_gridsettings type LVC_S_GLAY.
.......
gt_gridsettings-EDT_CLL_CB = 'X'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = lv_repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_GRID_SETTINGS = gt_gridsettings "pay attention to this line
........
i hope it will work
Message was edited by:
Abdurrahim Mazlumoglu
2007 Apr 19 9:57 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |