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

how to give EXECUTE functionality to a custom button.

Former Member
0 Likes
1,606

hello everyone,

i have a custom pushbutton on my selection-screen. I want it to function as execute button or F8.

how do i go for it.

please help me.

thanks in advance.

1 ACCEPTED SOLUTION
Read only

dani_mn
Active Contributor
0 Likes
1,197
REPORT Z_TEST2 .

TABLES : SSCRFIELDS.

PARAMETERS : P LIKE MARA-MATNR .
PARAMETERS : P1 LIKE MARC-WERKS MODIF ID p1.

SELECTION-SCREEN: PUSHBUTTON /2(10) PB1 USER-COMMAND A.

INITIALIZATION.
  MOVE 'EXECUTE' TO PB1.

AT SELECTION-SCREEN.
  if sy-ucomm = 'A'.
    sscrfields-ucomm = 'ONLI'.
  ENDIF.

start-of-selection.
  write:/ 'done'.

hello everyone,

i have a custom pushbutton on my selection-screen. I want it to function as execute button or F8.

how do i go for it.

please help me.

thanks in advance.

6 REPLIES 6
Read only

Former Member
0 Likes
1,197

hi Ganesh,


if sy-ucomm = 'EXEC' or 'ONLI' .
 " do something
endif.

Regards,

Santosh

Read only

dani_mn
Active Contributor
0 Likes
1,198
REPORT Z_TEST2 .

TABLES : SSCRFIELDS.

PARAMETERS : P LIKE MARA-MATNR .
PARAMETERS : P1 LIKE MARC-WERKS MODIF ID p1.

SELECTION-SCREEN: PUSHBUTTON /2(10) PB1 USER-COMMAND A.

INITIALIZATION.
  MOVE 'EXECUTE' TO PB1.

AT SELECTION-SCREEN.
  if sy-ucomm = 'A'.
    sscrfields-ucomm = 'ONLI'.
  ENDIF.

start-of-selection.
  write:/ 'done'.
Read only

Former Member
0 Likes
1,197

Assign ok_code(function code) "WB_EXEC" to that button....

Read only

Former Member
0 Likes
1,197

hi,

sy-ucomm shud be 'ONLI' for Execute button

Read only

Former Member
0 Likes
1,197

hi,

sy-ucomm should be "ONLI" and even 'PRIN' also works.

santhosh

Read only

Former Member
0 Likes
1,197

use this FM <b>RS_SET_SELSCREEN_STATUS</b> and disable the execute button and create ur own button on application toolbar and write the code