Skip to Content
author's profile photo Former Member
Former Member

selection

can we write a program with out start-of-selection as well as end-of-selection.Exactly what is purpose of both the events and the difference between them.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 02:26 PM

    Hi,

    try this:

    and this:

    http://help.sap.com

    Regards, Dieter

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 02:31 PM

    hi ,

    the following thread says that end of selection is optional

    END-OF-SELECTION

    <b>START-OF-SELECTION</b>

    This event occurs after the selection screen has been processed and before data is read using the logical database. You can use it to prepare for reading data and creating the list by, for example, setting values for internal fields and writing introductory notes on the output list.

    In an executable program, any non-declarative statements that occur between the REPORT or PROGRAMstatement and the first processing block are also processed in the START-OF-SELECTION block. See also Defining Event Blocks.

    The following executable program is connected to the logical database F1S.

    REPORT demo_program_start_of_selectio.

    NODES spfli.

    ...

    AT SELECTION-SCREEN.

    ...

    START-OF-SELECTION.

    WRITE: / 'List of Flights' COLOR COL_HEADING,

    / 'Created by', SY-USERID, 'on', sy-datum.

    ULINE.

    GET spfli.

    <b>END-OF-SELECTION</b>

    This is the last of the events called by the runtime environment to occur. It is triggered after all of the data has been read from the logical database, and before the list processor is started. You can use the corresponding event block to process and format all data that the program has stored in sequential datasets, such as internal tables or extracts, during the various GET events.

    The following executable program is connected to the logical database F1S.

    REPORT demo_program_end_of_selection.

    NODES spfli.

    DATA: spfli_tab TYPE SORTED TABLE OF spfli

    WITH UNIQUE KEY cityfrom cityto carrid connid,

    spfli_line TYPE spfli.

    START-OF-SELECTION.

    WRITE 'Demo program for END-OF-SELECTION'.

    SKIP.

    GET spfli FIELDS carrid connid cityfrom cityto.

    MOVE-CORRESPONDING spfli TO spfli_line.

    INSERT spfli_line INTO TABLE spfli_tab.

    END-OF-SELECTION.

    LOOP AT spfli_tab INTO spfli_line.

    WRITE: / spfli_line-cityfrom,

    spfli_line-cityto,

    spfli_line-carrid,

    spfli_line-connid.

    ENDLOOP.

    This program fills a sorted table with data from the logical database in the GET spfli event

    <b>Reward points if useful</b>

    regards,

    pavan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.