Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Add pushbuttons on the tool bar of selection screen

Hi

I want to add pushbuttons on the selection screen. If i set PF status on at selection-screen output then i have to code for standard buttons also. is there any other way to add pushbuttons.

Regards

Aditya

Tags:
Former Member
Former Member replied

Hi,

You can create up to five pushbuttons in the application toolbar on the selection screen. Function keys are automatically assigned to these pushbuttons. as

SELECTION-SCREEN FUNCTION KEY .

<i> must be between 1 and 5. You must use the FUNCTXT_0<i> components of structure SSCRFIELDS for the individual pushbutton texts. You must declare this structure as an interface work area using the TABLES statement.

Ex..

TABLES SSCRFIELDS.

DATA FLAG.

SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW TITLE TIT.

SELECTION-SCREEN FUNCTION KEY 1.

SELECTION-SCREEN FUNCTION KEY 2.

SELECTION-SCREEN END OF SCREEN 500.

AT SELECTION-SCREEN.

CASE SY-DYNNR.

WHEN '0500'.

IF SSCRFIELDS-UCOMM = 'FC01'.

FLAG = '1'.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

FLAG = '2'.

ENDIF.

ENDCASE.

START-OF-SELECTION.

SSCRFIELDS-FUNCTXT_01 = 'Button 1'.

SSCRFIELDS-FUNCTXT_02 = 'Button 2'.

TIT = 'Buttons'.

CALL SELECTION-SCREEN 500 STARTING AT 10 10

ENDING AT 10 11.

IF FLAG = '1'.

WRITE / 'Button 1 was clicked'.

ELSEIF FLAG = '2'.

WRITE / 'Button 2 was clicked'.

ENDIF.

Edited by: swati gupta on Oct 15, 2008 6:56 AM

Edited by: swati gupta on Oct 15, 2008 6:58 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question