Skip to Content

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

Selection Screen

Hi All,

I need to create selection screen with one check box in the middle of the frame i created and two buttons execute and cancle on the next line to the checkbox in the frame.

means in the single frame i need to create first one checkbox in the centre of the box and then on the next line two push button with icon of execute and cancle in the frame.

please provide the code for it.

usefull code will be rewarded.

Thanks,

Tags:
replied

Hi,

try this short example and insert your own logic.

*

TABLES: SSCRFIELDS. "Felder auf Selektionsbildern

*

TYPE-POOLS: ICON.

*

*> define selection screen

************************************************************************

*

SELECTION-SCREEN: BEGIN OF BLOCK A01 WITH FRAME TITLE A01.

*

SELECTION-SCREEN: SKIP 4.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN: COMMENT 15(30) T_CHBOX.

PARAMETERS: P_CHBOX AS CHECKBOX.

SELECTION-SCREEN: END OF LINE.

SELECTION-SCREEN: SKIP 4.

*

SELECTION-SCREEN: END OF BLOCK A01.

*

SELECTION-SCREEN: BEGIN OF BLOCK A02 WITH FRAME TITLE A02.

*

SELECTION-SCREEN: SKIP.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN: PUSHBUTTON 30(30) START USER-COMMAND START

VISIBLE LENGTH 15.

SELECTION-SCREEN: END OF LINE.

*

SELECTION-SCREEN: SKIP.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN: PUSHBUTTON 30(30) CANCEL USER-COMMAND CANCEL

VISIBLE LENGTH 15.

SELECTION-SCREEN: END OF LINE.

*

SELECTION-SCREEN: END OF BLOCK A02.

*

************************************************************************

*

AT SELECTION-SCREEN.

*

CASE SSCRFIELDS-UCOMM.

WHEN 'START'.

MESSAGE I010 WITH 'Funktionstaste START gedruckt'.

WHEN 'CANCEL'.

MESSAGE I010 WITH 'Funktionstaste CANCEL gedruckt'.

ENDCASE.

*

************************************************************************

*

INITIALIZATION.

  • Button in Dynpro

CALL FUNCTION 'ICON_CREATE'

EXPORTING

NAME = ICON_EXECUTE_OBJECT

TEXT = 'Start'

INFO = 'Report ausführen'

IMPORTING

RESULT = START

EXCEPTIONS

OTHERS = 0.

*

CALL FUNCTION 'ICON_CREATE'

EXPORTING

NAME = ICON_CANCEL

TEXT = 'Cancel'

INFO = 'Report abbrechen'

IMPORTING

RESULT = CANCEL

EXCEPTIONS

OTHERS = 0.

*

A01 = 'Checkbox'.

A02 = 'Buttons'.

T_CHBOX = 'Checkbox'.

*

************************************************************************

*

START-OF-SELECTION.

*

WRITE: / 'OK'.

*

END-OF-SELECTION.

*

************************************************************************

*

Regards, Dieter

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