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: 

Regarding checkboxes in ALV Output & updating table

Former Member
0 Kudos

Hi Friends:

I've made a report whose ALV output is as below:

name skill rating handler reviewer

gp script 8

abc workflow 6

handler & reviewer are 2 checkboxes.User will click on the checkbox & make one person as handler & other person as reviewer .After clicking the checkbox, when the user will click on 'save' button, the data needs to be saved in a ztable.I've done all the coding, but the problem is that after clicking the 'save' button, its not recognizing in the internal table that the checkbox is clicked.Its showing the old internal table in the debugging mode.If it can recognize somehow, I can update my ztable.Please help me urgently.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Gaurav,

DO like this.


    WHEN 'UPDATE'.

      DATA REF1 TYPE REF TO CL_GUI_ALV_GRID.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
           IMPORTING
                E_GRID = REF1.
      CALL METHOD REF1->CHECK_CHANGED_DATA.

      LOOP AT G_T_OUTTAB WHERE CHECK = 'X'.
" Update the Ztable
EnDLOOP:

Regards,

VAsanth

5 REPLIES 5

Former Member
0 Kudos

Hi,

Refer tthis e.g.:


   loop at ls_outtab-celltab into ls_celltab.
        if ls_celltab-fieldname eq 'CHECKBOX'.
* §B4.Switch the style to dis- or enable a cell for input
         if ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
          ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
         else.
          ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
         endif.
         modify ls_outtab-celltab from ls_celltab.
        endif.
      endloop.
      modify gt_outtab from ls_outtab index es_row_no-row_id.

    call method sender->refresh_table_display.

From ex: BCALV_EDIT_05

Jogdand M B

Former Member
0 Kudos

Hello Gaurav,

DO like this.


    WHEN 'UPDATE'.

      DATA REF1 TYPE REF TO CL_GUI_ALV_GRID.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
           IMPORTING
                E_GRID = REF1.
      CALL METHOD REF1->CHECK_CHANGED_DATA.

      LOOP AT G_T_OUTTAB WHERE CHECK = 'X'.
" Update the Ztable
EnDLOOP:

Regards,

VAsanth

0 Kudos

Hi Vasanth:

Just wanted to say that u r great.It again solved my problem.U r really excellent.

could u please give me ur mail-id, if in case I'll be stuck next time..or any other way I can reach to u quickly through SDN.....

do u generally answer in the ABAP Object Forum.....

gaurav.abap@gmail.com

0 Kudos

Hello Gaurav,

All my details are available in Business card.

Regards,

Vasanth

vasanth.m@in.bosch.com

0 Kudos

Thanks buddy.........u r the best...