Application Development 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: 

Check_Changed_Data not working

Former Member
0 Kudos

Hi all,

In my BADI i am triggering an ALV grid pop-up to select values with check box. For getting the changed data i am using check_changed_data method. Even after selecting the check boxes in ALV pop i am not able to get the changed data.

program code :

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program    = sy-repid
      i_grid_title          = 'Select MAil ID'
      is_layout             = lt_layout
      it_fieldcat           = t_fieldcat
      i_screen_start_column = 20
      i_screen_start_line   = 5
      i_screen_end_column   = 70
      i_screen_end_line     = 15
      I_SAVE                = 'A'
    TABLES
      t_outtab              = it_ZEMAIL
    EXCEPTIONS
      program_error         = 1
      OTHERS                = 2.
  IF sy-subrc <> 0.

  ENDIF.


data: gd_repid like sy-repid,
        ref_grid type ref to cl_gui_alv_grid.

  if ref_grid is initial.
    call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
      importing
        e_grid = ref_grid.
  endif.
  if not ref_grid is initial.
    call method ref_grid->check_changed_data .
  endif.

while debugging i found that the ref_grid remains initial after the function GET_GLOBALS_FROM_SLVC_FULLSCR.

so call method ref_grid->check_changed_data is not executed.

So how can i solve this problem.

Thanks in advance.

Venkat.

5 REPLIES 5

former_member404244
Active Contributor
0 Kudos

Hi,

u need to use user command

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

i_grid_title = 'Select MAil ID'

i_callback_user_command = 'USER_COMMAND'

is_layout = lt_layout

it_fieldcat = t_fieldcat

i_screen_start_column = 20

i_screen_start_line = 5

i_screen_end_column = 70

i_screen_end_line = 15

I_SAVE = 'A'

TABLES

t_outtab = it_ZEMAIL

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc 0.

ENDIF.

FORM user_command USING lv_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

  • Declaration of local Variables

DATA : lv_ref1 TYPE REF TO cl_gui_alv_grid.

  • Event

WHEN <event>

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

e_grid = lv_ref1.

CALL METHOD lv_ref1->check_changed_data.

Now try this...

Regards,

Nagaraj

0 Kudos

hi Nagaraj,

The problem is, i am using this in BADI = Method. so i cant make use of form user command within the method. Is there any other way to achieve this without forms.

Venkat

0 Kudos

Hi,

Yes in methods we cannot use form endform...One more option you can try is creating a cutsoom functionmodule and writing the code there and then call that FM in the badi method and see.

Regards,

Nagaraj

0 Kudos

hi nagaraj ,

I just changed the my ALV from gird to list. So problem solved.Thanks for your time and consideration.

Reagrds,

Venkat

0 Kudos

Could you please tell me.

I am using cl_gui_custom_container for First display.

for second interactive display purpose what are the rows am i selected in first container

that row only display in second container.

please tell me which process is to their to get the selectes key field data how am i get.