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 data change

Former Member
0 Likes
741

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

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

5 REPLIES 5
Read only

Former Member
0 Likes
705
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
Read only

Former Member
0 Likes
705

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

Read only

0 Likes
705

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

Read only

Former Member
0 Likes
705

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

Read only

Former Member
0 Likes
705

hi ,

try to push save button after filling checkboxs.