12-03-2007 12:03 PM
Hi everybody!
I'm doing an ALV (with FM REUSE_ALV_GRID_DISPLAY) that the user should mark just one line and click in a button to starting the process... But today the user can mark more than one line. I don't know how to configure just to mark just one line...
Can you help me???
12-03-2007 12:45 PM
Hi,
Check the number of lines selected and process further only if its equal to 1 else display an error message.
regards,
12-03-2007 12:45 PM
Hi,
Check the number of lines selected and process further only if its equal to 1 else display an error message.
regards,
12-03-2007 12:57 PM
Hi! thanks!
But how i check this? there's a itab with these values????
BR!
12-03-2007 1:16 PM
HI,
you check the number of lines selected by the user
if the user selects more then 1 line you can throw a error message
refresh gt_selected_rows.
call method vl31_grid->get_selected_rows
importing et_index_rows = gt_selected_rows.
*-- more than one line was marked
READ TABLE gt_selected_rows INDEX 2 TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
MESSAGE s755(06).
EXIT.
ENDIF.
*-- nothing marked
READ TABLE gt_selected_rows INDEX 1 INTO wa_selected_rows.
IF sy-subrc <> 0.
MESSAGE s277(me).
Check the above example if the user selects more than one row throws a error message
Regards,
siva chalasani.
<b>Reward points if usefull</b>
12-03-2007 1:24 PM
Hi Siva!
thanks,
But i'm not using an ALV OO, how i can associate my table with the grid???
BR!
12-03-2007 1:38 PM
12-03-2007 2:23 PM
Hi everybody!
That's not the way I thinked to solve the problem, but I think that it doesn't have another way to solve the problem! I will do as you are telling me!
Thank's for the help!
BR