Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Some of the times I felt difficult to design a selection screen, with put a mark of impression on the user...

   This small piece of code can be of great help to design and understand the  selection screen as per the requirement.

   Just paste the code in SE38 & check for output.

Error rendering macro 'code': Invalid value specified for parameter 'lang'
REPORT  YKC_SELECTION_SCREEN_DESIGN.
TABLES: TRDIR,TSTC.
*================*
*Selection Screen
*================*
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME TITLE A1TITLE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (32) A1LINE1 FOR FIELD P_DATEF.
PARAMETERS :     P_DATEF LIKE SY-DATUM DEFAULT SPACE OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (32) A1LINE2 FOR FIELD P_DATET.
PARAMETERS :     P_DATET LIKE SY-DATUM DEFAULT SY-DATUM OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE B1TITLE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (30) B1LINE1 FOR FIELD P_SUMM.
PARAMETERS :     P_SUMM  RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (30) B1LINE2 FOR FIELD P_DETL.
PARAMETERS :     P_DETL  RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK OPTION WITH FRAME TITLE C1TITLE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (28) C1LINE1 FOR FIELD P_PROG.
PARAMETERS P_PROG RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (28) C1LINE2 FOR FIELD P_TRAN.
PARAMETERS P_TRAN RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK OPTION.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK DEST WITH FRAME TITLE E1TITLE.
PARAMETERS :     DEST LIKE RFCDISPLAY-RFCDEST DEFAULT 'NONE'.
SELECTION-SCREEN END OF BLOCK DEST.
SELECTION-SCREEN BEGIN OF BLOCK OPTIONAL WITH FRAME TITLE D1TITLE.
SELECT-OPTIONS : S_PROG   FOR TRDIR-NAME.              "Programs
SELECT-OPTIONS : S_TCODE  FOR TSTC-TCODE.              "Transaction Code
SELECTION-SCREEN END OF BLOCK OPTIONAL.
SELECTION-SCREEN END OF BLOCK SELECTION.
INITIALIZATION.
  PERFORM SELECTION_SCREEN_TEXT.
*&---------------------------------------------------------------------*
*&      Form  selection_screen_text
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM SELECTION_SCREEN_TEXT.
  A1TITLE = 'Enter Dates for Analysis'.
  A1LINE1 = 'Analysis Start Date?'.
  A1LINE2 = 'Analysis End Date?'.
  B1TITLE = 'Summary or Detail Report'.
  B1LINE1 = 'Summary Report'.
  B1LINE2 = 'Detail Report'.
  C1TITLE = 'Analyze Programs or Transactions'.
  C1LINE1 = 'Usage of Standard Programs'.
  C1LINE2 = 'Usage of Standard Transactions'.
  D1TITLE =
 'Optional: Enter Standard Transaction Codes and Programs for Analysis'.
  E1TITLE = 'RFC Destination'.
ENDFORM.                    " selection_screen_text

 

 

 

3 Comments

  1. Guest

    Hi Krishna 

    May i know y this selection-screen skip is used.

    Thanks

    Siva

  2. SELECTION-SCREEN SKIP gives one new line between two selection screen.

  3. Hi Krishna,
    Thank you very much for the detailed information.
    but when I use perform and form for selection-screen title and texts it is not picking up. so, when I used as per SAP's Help with the option "INITIALIZATION" it's working fine,
    Please correct yourself in your document.
    http://help.sap.com/abapdocu_702/en/abapselection-screen_block.htm#!ABAP_ADDITION_1@1@

    Example from SAP HELP:

    SELECTION-SCREEN BEGIN OF BLOCK rad1 
                              WITH FRAME TITLE title. 
    PARAMETERS: r1 RADIOBUTTON GROUP gr1, 
                r2 RADIOBUTTON GROUP gr1, 
                r3 RADIOBUTTON GROUP gr1. 
    SELECTION-SCREEN END OF BLOCK rad1. 

    INITIALIZATION. 
      title = 'Selection'.