Skip to Content
author's profile photo
Former Member

events

can anybody tell me the syntax for "at selection screen on field"?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 04:15 AM

    hi,

    first u cal the selection-screen like CALL SELECTION-SCREEN "screen number'.

    the

    at selection-screen on <field-name> .

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 04:17 AM

    When you press ENTER or EXECUTE on selection screen, this event gets triggered. This is used to validate fields on selection screen.

    For more details, check link

    http://help.sap.com/saphelp_nw04/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 04:17 AM

    Hi Anil,

    <i>At selection screen on:</i>

    This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program.

    <u>Check this code,</u>

    parameters: p_parm1 type c,

    p_parm2 type c.

    selection-screen begin of block b1.

    parameters: p_datum1 type sy-datum,

    p_datum2 type sy-datum.

    selection-screen end of block b1.

    at selection-screen on block b1.

    if p_datum1 is initial

    and p_datum2 is initial.

    message e001(00) with 'Enter at least one date'.

    endif.

    Thanks,

    Reward If Helpful.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 04:18 AM

    We do validations in at selection screens

    in main program

    AT SELECTION-SCREEN ON p_bukrs.

    *Validation for Company Code

    PERFORM sub_valid_company_code.

    &----


    &----


    *& Form sub_valid_company_code

    &----


    • Validation for Company code

    ----


    FORM sub_valid_company_code.

    DATA lv_bukrs TYPE t001-bukrs.

    • Validation for Company code

    IF NOT p_bukrs IS INITIAL.

    SELECT SINGLE bukrs FROM t001 INTO lv_bukrs

    WHERE bukrs EQ p_bukrs.

    IF sy-subrc NE 0.

    MESSAGE e020 WITH p_bukrs.

    ENDIF.

    ENDIF.

    ENDFORM. " sub_valid_company_code

    if u want more details

    write At selection-screen in SE38 and press F1

    Rewards if useful....................

    Minal

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 04:19 AM

    Syntax : AT SELECTION-SCREEN ON <field> :

    This is one of the PAI event of the

    selection screen which is triggered when the contents of each individual input field are

    passed from the selection screen to the ABAP program. The input field <field> can be

    checked in the corresponding event block. If an error message occurs within this event

    block, the corresponding field is made ready for input again on the selection screen.

    Add comment
    10|10000 characters needed characters exceeded