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: 

catching the selected check box value in ALV Grid and process that rows

Former Member
0 Kudos

Hi guru's,

I am displaying the records in ALV grid report. In this report i have check box. I have done enable and disbling some rows. Now i required to catch that check box value and based on check box i have to process for one transaction.

<b>Here my problem is after executing the report i am selecting check box manually . But it is not coming into the user-command. Here i am attaching my small code in this message.</b>

this wht for layout i am adding fileds.

GS_LAYOUT-BOX_FNAME = 'CHECK'.

GS_LAYOUT-NO_ROWMARK = 'X'.

GS_LAYOUT-STYLEFNAME = 'CELLTAB'.

GS_LAYOUT-CWIDTH_OPT = 'X'.

GS_LAYOUT-SEL_MODE = 'A'.

In function module i have filled this info

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

EXPORTING

I_CALLBACK_PROGRAM = W_REPID

I_GRID_TITLE = TEXT-003

I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

IS_LAYOUT_LVC = GS_LAYOUT

IT_FIELDCAT_LVC = GT_FIELDCAT

*IT_SORT_LVC = GT_SORT[]

  • IS_SEL_HIDE = GT_ALV

TABLES

T_OUTTAB = GT_ALV

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

usercommand form

CASE R_UCOMM.

WHEN 'UPDATE'.

LOOP AT GT_ALV WHERE CHECK = 'X'.

WRITE : 'success'.

ENDLOOP.

endcase.

Thanks in advance,

praveen

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

define ur checkbox like

data : chekcbox type c value 'X'. now in debug mode it should work fine... for me it is working fine... long back i used t\in this way ony...

thanks,

maheedhar.t

2 REPLIES 2

Former Member
0 Kudos

hi

define ur checkbox like

data : chekcbox type c value 'X'. now in debug mode it should work fine... for me it is working fine... long back i used t\in this way ony...

thanks,

maheedhar.t

Former Member
0 Kudos

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 t_output where Flag = 'X'.

if t_output-VKUEGRU is initial.

message e000 with text-110.

endif.

endloop.