Skip to Content
author's profile photo
Former Member

reports

diff b/w at selection-screen n at selecton-screen on fields?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • author's profile photo
    Former Member
    Posted on Aug 23, 2007 at 05:45 AM

    Hi,

    AT SELECTION-SCREEN event is triggered in the PAI of the selection screen once the ABAP runtime environment has passed all of the input data from the selection screen to the ABAP program. If an error message occurs in this processing block, the selection screen is redisplayed with all of its fields ready for input. This allows you to check input values for consistency.

    Example

    REPORT demo_at_selection_screen .

    NODES spfli.

    AT SELECTION-SCREEN.

    IF carrid-low IS INITIAL

    OR airp_fr-low IS INITIAL

    OR airp_to-low IS INITIAL.

    MESSAGE e888(sabapdocu) WITH text-001.

    ENDIF.

    In the PAI event of the selection screen, the event

    AT SELECTION-SCREEN ON field

    event is triggered. 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.

    Example

    REPORT event_demo.

    NODES spfli.

    AT SELECTION-SCREEN ON city_fr.

    IF carrid-low EQ 'AA' AND city_fr NE 'NEW YORK'.

    MESSAGE e010(hb).

    ENDIF.

    If the user enters “AA” in the first input field, but not NEW YORK for the departure city, an error message is displayed in the status line until the user enters the correct city.

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

    http://help.sap.com/saphelp_nw2004s/helpdata/en/79/34a237d9b511d1950e0000e8353423/content.htm

    Regards,

    Priyanka.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 23, 2007 at 05:45 AM

    &----


    *& Report ZCLASSICAL_SAM1

    *&

    &----


    *&

    *&

    &----


    REPORT ZCLASSICAL_SAM1.

    *----steps for EXECUTABLE PROGRAM

    *----1)declare tables which are used in program for data extraction.

    TABLES:

    *----2)declare any variable which are required in program.

    DATA .

    *----3)declaration of internal tables.

    DATA:

    *----4)provide selection-screen logic if required.

    select-options: ."for complex selection

    parameters: " for single value input fields

    *----5)declaration of events.

    INITIALIZATION. "used for providing intial values to the fields

    AT SELECTION-SCREEN OUTPUT. " used for changing screen fields dynamically

    AT SELECTION-SCREEN. ' for perfom validations on screen input fields.

    START-OF-SELECTION. "used for select queries and output statements.

    END-OF-SELECTION. " this also used for output statements

    TOP-OF-PAGE. " used for providing page heading

    END-OF-SELECTION." used for providing page footer.

    GET

    GET LATE " these events are used only if our program reading data from

    LOGICA DATABASE.

    *----If we are going to genatate secondary list, we use events like..

    AT LINE-SELECTION. " triggered only if we press F2 function key or

    *----DOUBLE CLIKING on list.

    AT USER-COMMAND " triggered only if selecteing menu option and user

    defined buttons

    *----


    *----if program of type module-pool, follow these steps.

    *----


    *----1)declare tables which are used in program for data extraction.

    TABLES:

    *----2)declare any variable which are required in program.

    DATA:

    *----3)declaration of internal tables.

    DATA:

    *----4)screen flow logic.

    *----here we use

    PBO

    PAI

    POV

    POH

    *----these events based on your requirement.

    regards,

    rewards point.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 23, 2007 at 05:46 AM

    Hi,

    AT SELECTION-SCREEN is like any normal PAI module.

    AT SELECTION-SCREEN ON fld is like a PAI module called on FIELD like this,

    FIELD fld MODULE pai_mod.

    Regards,

    Sesh

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 23, 2007 at 05:47 AM

    Hi

    at selection-screen is used for validating all fields in selection screen,

    at selection-scree on field is for single field

    and u can write as many at selection-scree on field but u can write only one at selection-screen in a program

    reward points to all helpful answers

    kiran.M

    Add comment
    10|10000 characters needed characters exceeded