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

Funnction code (sy-ucomm) of selection screen (window) button

Former Member
0 Likes
1,567

Hi fellow abapers

I'm calling a selection-screen from one selection-screen (both defined using statement:selection-screen). The called screen is of type WINDOW (called using CALL SELECTION_SCREEN STARTING AT..).

The called screen(window) has 5 buttons (Execute,Check,Variant load,Save,Cancel).

my requirement is

(a) is there any way to exclude buttons from the screen.

(b) how to get the function code (sy-comm) of the clicked button in the above screen.( when i debugged it hasn't returned any value to SY-UCOMM, because of this ,even if i click cancel button it executes a part of coding-- i need to avoid this ).

plz hlp

rewards sure.

Regards

Prabumanoharan

Hi fellow abapers

I'm calling a selection-screen from one selection-screen (both defined using statement:selection-screen). The called screen is of type WINDOW (called using CALL SELECTION_SCREEN STARTING AT..).

The called screen(window) has 5 buttons (Execute,Check,Variant load,Save,Cancel).

my requirement is

(a) is there any way to exclude buttons from the screen.

(b) how to get the function code (sy-comm) of the clicked button in the above screen.( when i debugged it hasn't returned any value to SY-UCOMM, because of this ,even if i click cancel button it executes a part of coding-- i need to avoid this ).

plz hlp

rewards sure.

Regards

Prabumanoharan

4 REPLIES 4
Read only

Former Member
0 Likes
746

Hi,

You can write a PAI module for this.For excluding some buttons,you set the PF status and write

SET PF-STATUS <status name> excluding TAB.

Read only

Former Member
0 Likes
746

Hi!

1) You can exclude buttons of your pf-status using:

SET PF-STATUS '0200_1_008' EXCLUDING extab2.

Where extab2 TYPE SLIS_T_EXTAB.

And you can populate it:

CLEAR ls_extab.

ls_extab-fcode = 'IMPR4'.

APPEND ls_extab TO extab2.

2) You can personalize your status with transaction se41. You can indicate the name of the sy-ucomm. If you want eliminate the cancel action, you can eliminate it from the status.

Bye!

Read only

peter_ruiz2
Active Contributor
0 Likes
746

hi prabu,

using CALL SELECTION-SCREEN returns only 2 values.

sy-subrc = 0.

if the user clicks on the continue button

sy-subrc = 4.

if the user clicks on the cancel button.

regards,

Peter

Read only

Former Member
0 Likes
746

closing the thread