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 Grid - function'REUSE_ALV_GRID_DISPLAY'

Former Member
0 Likes
2,235

Hello,

I use 'REUSE_ALV_GRID_DISPLAY' to display a grid after getting parameters from a selection screen, and it displays everything fine, how do get the screen to respond to standard tick ( green circle with a tick ) in my code?

I know 'REUSE_ALV_GRID_DISPLAY' has i_callback_user_command = 'USER_COMMAND'

But this does not recognise the tick box.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,792

If the TICK has a user command, then it will respond.

You can to that in the USER COMMAND subroutine.

You can probably try sy-ucomm = 'ENTR'.

Regards,

Ravi

9 REPLIES 9
Read only

Former Member
0 Likes
1,793

If the TICK has a user command, then it will respond.

You can to that in the USER COMMAND subroutine.

You can probably try sy-ucomm = 'ENTR'.

Regards,

Ravi

Read only

0 Likes
1,792

How do I set the user command, there is not a screen to do this, the function generates the screen, and I use select options on the first screen?

Thanks

Read only

0 Likes
1,792

Hi Vijay,

almost there, the bit about the ok code, I can't see in your reply, it seems to have truncated, where do I set the OK_CODE?

Thanks

Read only

0 Likes
1,792

hi,

.

Go to SE41 give the Program name SAPLKKBL

and status as STANDARD

now click Copy status (CTRL+F6), now give your Program name , and PF-status and copy it. now save it and activate the pf-satus which you have copied.and add OKCODE TO ENTER BUTTON (GREEN TICK BUTTON) <b>in the FUNCTION KEYS PART you can see the Green Tick button</b> . and use it in your PF-status form.

pass that status using the parameter call back status option.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = g_repid
<b>i_callback_pf_status_set = 'STATUS'</b>
 i_callback_user_command = 'USER_COMMAND'
....

FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
*- Pf status 
 SET PF-STATUS 'STATUS' excluding p_extab.
 "this is i copied it from standard program
ENDFORM.                 " STATUS

Hope now this is clear..

Regards

vijay

Read only

0 Likes
1,792
Read only

0 Likes
1,792

Hi,

what I have is below?

Standard Toolbar

OKCODE &F03 &F15 &F12 &RNT %SC %SC+ P-- P- P+ P++ &ELP

Reserved function keys

F4 <..> Possible entries

Shift-F10 <..> Context menu

Recommended function key settings

F2 &IC1 Choose

F9 <..> Select

Shift-F2 <..> Delete

Shift-F4 <..> Save without check

Shift-F5 <..> Other <object>

Read only

0 Likes
1,792

Hi,

The First one in Standard tool bar is the One which responds for ENTER(the key borad button).

You can Give anything in OKCODE the same thing you have to check in the user_command form.

Standard Toolbar

<b>ENTR</b> &F03 &F15 &F12 &RNT %SC %SC+ P-- P- P+ P++ &ELP

i hope you gave OKCODE for ENTER,if that is the case then you have to handle the same in user_command form.


case ucomm.
when 'OKCODE'.

"do some thing here..
endcase.

Regards

vijay

Read only

Former Member
0 Likes
1,792

hi,

you have to set the pf-status for the green tick button.

say function code for it as 'ENTR'.

now in user_command

handle that..

case r_ucomm.

when 'ENTR'.

ENDCASE.

regards

vijay

Read only

Former Member
0 Likes
1,792

Hi,

steps..

1.

Go to SE41 give the Program name SAPLKKBL

and status as STANDARD

now click Copy status (CTRL+F6), now give your Program name , and PF-status and copy it. now save it and activate the pf-satus which you have copied.and add OKCODE TO ENTER BUTTON (GREEN TICK BUTTON) to it. and use it in your PF-status form.

pass that status using the parameter call back status option.

2. use this..

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = g_repid
i_callback_pf_status_set = 'STATUS'
 i_callback_user_command = 'USER_COMMAND'

3.

FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
*- Pf status 
 SET PF-STATUS 'STATUS' excluding p_extab.
 "this is i copied it from standard program
ENDFORM.                 " STATUS

4.

FORM USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
 
  case r_ucomm.
 
    when 'ENTR'.

    when 'BUTTON'.
"do what ever you want here..
   endcase.
ENDFORM.                    "USER_COMMAND

REGARDS

VIJAY

Message was edited by: Vijay Babu Dudla