At selection-screen on end of

hi to all pls tellabt the event at selection-screen on end of  and at selection-on block
plsa give some sample coding on theese  points will be rewarded

Hi
You are mixing up the things
You need to know separately about At selection-screen and its events
selection-screen : begin of block b1 with frame title text-001.
select-options:s_bukrs for t001-bukrs no intervals no-extension
                                                     obligatory,
               s_vkorg for tvko-vkorg no intervals no-extension,
               s_vtweg for tvtw-vtweg no intervals no-extension,
               s_spart for tspa-spart no intervals no-extension,
               s_werks for t001w-werks no intervals no-extension,
               s_kunag for kna1-kunnr,
               s_vbeln for vbuk-vbeln,
               s_fkart for tvfk-fkart,
               s_fkdat for vbrk-fkdat obligatory.
selection-screen begin of line.
selection-screen comment 1(20) text-008.
selection-screen end   of line.
selection-screen begin of line.
parameters p_cust type c radiobutton group cust.
selection-screen comment 3(20) text-004 for field p_cust.
selection-screen end of line.
selection-screen begin of line.
parameters p_mode type c radiobutton group cust.
selection-screen comment 3(20) text-006 for field p_mode.
selection-screen end of line.
selection-screen begin of line.
parameters p_dens type c radiobutton group cust.
selection-screen comment 3(20) text-007 for field p_dens.
selection-screen end of line.
selection-screen: end of block b1.
And the Events related to Internal table like AT NEW and AT END OF
All this AT NEW, AT FIRST, AT END OF and AT LAST are called control break statements of Internal tables and are used to calculate the TOTALS based on sertain key fields in that internal table
FIrst to use these statements the ITAB has to be sorted by the key fields on whcih you need the SUM of the fields.
Some time you will get * when mopving data from this int table to other table using these commands
so you have to use
READ TABLE ITAB INDEX SY-TABIX in AT..ENDAT..if you are using other fields between them
DATA: sflight_tab TYPE SORTED TABLE OF sflight
                  WITH UNIQUE KEY carrid connid fldate,
      sflight_wa  LIKE LINE OF sflight_tab.
SELECT *
       FROM sflight
       INTO TABLE sflight_tab.
LOOP AT sflight_tab INTO sflight_wa.
  AT NEW connid.
    WRITE: / sflight_wa-carrid,
             sflight_wa-connid.
    ULINE.
  ENDAT.
  WRITE: / sflight_wa-fldate,
           sflight_wa-seatsocc.
  AT END OF connid.
    SUM.
    ULINE.
    WRITE: / 'Sum',
              sflight_wa-seatsocc UNDER sflight_wa-seatsocc.
    SKIP.
  ENDAT.
  AT END OF carrid.
    SUM.
    ULINE.
    WRITE: / 'Carrier Sum',
              sflight_wa-seatsocc UNDER sflight_wa-seatsocc.
    NEW-PAGE.
  ENDAT.
  AT LAST.
    SUM.
    WRITE: / 'Overall Sum',
              sflight_wa-seatsocc UNDER sflight_wa-seatsocc.
  ENDAT.
ENDLOOP.
Reward points for useful Answers
Regards
Anji

Similar Messages

  • AT SELECTION-SCREEN ON/END OF FIELD

    Hi all,
         I want to know the exact difference between AT SELECTION-SCREEN ON field and AT SELECTION-SCREEN ON END OF field. Could you give me the answer with an example.
    Sathish.

    Hi,
    Let`s say you have a radio button on your selection screen and you want to perform some action once the user clicks the radio button. You can attain this functionality by using AT SELECTION-SCREEN ON FIELD. This event block is raised before the AT SELECTION-SCREEN event, on action performed on that particular field.
    "AT SELECTION-SCREEN ON END OF field",
    Consider the following example :
    AT SELECTION-SCREEN ON END OF <seltab>
    event is triggered. This event block allows you to check the whole selection table <seltab>. Warning messages are displayed as dialog boxes, not in the status line.
    AT SELECTION-SCREEN ON END OF CARRID.
      LOOP AT MATNR.
        IF MATNR-HIGH NE '   '.
          IF MATNR-LOW IS INITIAL.
            MESSAGE Wxxx(MSG).
          ENDIF.
        ENDIF.
      ENDLOOP.
    Hope the info. is helpful, if so reward points.
    Regards

  • Switchin to selection screen from end-of-selection

    Hi Experts,
        I am creating a report, where I generate an ALV output. From selection screen, I am going to some 4, 5 output screens.
    selection screen -> output screen1 -> output screen2 -> output screen3.
    Can I go to selection screen from output screen 3. In output screen 3 I have pf-status also. When the back button, in the triggered code what I have to write to switch to selection screen.
    Thanks and regards,
    Venkat.

    Hi
    1.Make your selection screen as screen no.100.
    2.selection screen(100) -> output screen1 -> output screen2 -> output screen3.
    3.Make separate pf-status for each screens.
    4.In the PAI of your 3rd screen write
    CASE SY-UCOMM.
      WHEN 'BACK'.
         LEAVE TO SCREEN 100.
    ENDCASE.
    Hope this had helped you.
    Regards
    Hareesh Menon

  • Selection screen problem in module pool

    Hi friends,
    I am working on module pool programming, I need to put select screen on the screen of the module pool porgramming. I used Input/Output field to do that and activated. But I am getting message invalid field format (screen error) can any one tell me why I am not able to run the seletion screen when I am using input/output field, also please let me know how to solve this problem.
    Regards,
    Line

    Hello,
    Think that this is useful for u/
    SELECTION-SCREEN - Defining selection screens
    Variants:
    1a. SELECTION-SCREEN BEGIN OF SCREEN scr.
    1b. SELECTION-SCREEN END   OF SCREEN scr.
    2. SELECTION-SCREEN BEGIN OF SCREEN scr AS SUBSCREEN.
    Effect
    Defines a selection screen with the number scr. scr may be up to 4 digits.
    SELECTION-SCREEN BEGIN OF SCREEN scr.
    Additions:
    (zu SELECTION-SCREEN BEGIN OF SCREEN scr) 1. ... TITLE title
    2. ... AS WINDOW
    Notes
    In reports (type 1 programs), a selection screen with number 1000 is created automatically when you use the SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statments. This selection screen appears when you SUBMIT the report.
    In any type of program (apart from subroutine pools - type S), you can define further selection screens using SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN. You enclose these statements between the SELECTION-SCREEN BEGIN OF SCREEN and SELECTION-SCREEN END OF SCREEN statements.
    You call these screens using the CALL SELECTION-SCREEN statement.
    Screen number 1000 is not allowed (reserved for standard selection screen).
    When you generate the program, all user-defined selection screens are also generated.
    Within a report (type 1 program), all SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statements outside a SELECTION-SCREEN BEGIN/END OF SCREEN block form part of selection screen 100 (standard selection screen)
    Regards,
    LIJO JOHN.

  • Difference between screen and selection screen

    explain the difference between
    call screen
    and
    call selection-screen
    with easy understandable explanation with simple example
    thanks guyz

    Hi,
    <b>CALL SCREEN</b> interrupts the processing of the current screen to call a new screen or a chain of screens, processing of the current screen is resumed directly after the call.
    Call selection-screen
    Similar to <b>CALL SCREEN</b>, except the screen you are calling must be a selection screen defined using<b> SELECTION-SCREEN BEGIN/END OF SCREEN</b> or the standard selection screen of a report.
    It calls the selection screen with in the program.
    If you call a selection screen using <b>CALL SCREEN</b> instead of <b>CALL SELECTION-SCREEN</b>, the initialization necessary for selection screens is not carried out, and the screen will not run properly when displayed.
    EG:<b>
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
      SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
                                          NO INTERVALS.
        SELECT-OPTIONS SEL1 FOR SY-SUBRC.
        PARAMETERS     PAR1 LIKE SPFLI-CARRID.
        SELECTION-SCREEN COMMENT /10(20) TEXT-COM.
      SELECTION-SCREEN END OF BLOCK BL1.
    SELECTION-SCREEN END OF SCREEN 123.
    CALL SELECTION-SCREEN 123 STARTING AT 20 5.
    IF SY-SUBRC = 0.
    ELSE.
    ENDIF.</b>
    rewards if useful,
    regards,
    nazeer

  • Call Selection Screen

    Hi,
    can any one give me good links for
    All variants of at selection screen..
    some thing on call selection screen
    Thx,
    Shashi

    ·     AT SELECTION-SCREEN
    You should only perform very expensive checks with AT SELECTION-SCREEN if the program is then started. Here, you can read the system field SSCRFIELDS-UCOMM (provided a statement TABLES SSCRFIELDS exists). If the field has one of the values 'ONLI' (= Execute) or 'PRIN' (= Execute and Print), the report is then started, i.e. the selection screen is closed and the processing continues with START-OF-SELECTION.
         Additions:
    ·     ... ON psel
    Effect
    This event is assigned to the selection screen fields corresponding to the report parameter or selection criterion psel.
    If the report starts an error dialog at this point, precisely these fields become ready for input.
    ·     ... ON END OF sel
              For each selection criterion sel on the selection screen, you can call a further screen by pressing a pushbutton. On this screen, you can enter any number of single values and ranges for the selection criterion sel..
    When this screen has been processed (i.e. at the end of PAI for this screen), the event AT SELECTION-SCREEN ON END OF sel is executed.
    At this point, all the values entered are available in the internal table sel.
    ·     ... ON VALUE-REQUEST FOR psel_low_high
    Effect
    In this addition, the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH, where sel is the name of a selection criterion. The effect of this is twofold:
    1.     The possible entries pushbutton for F4 appears beside the appropriate field.
    2.     When the user activates this pushbutton or presses F4 for the field, the event is executed. You can thus implement a self-programmed possible entries routine for the input/output fields of the selection screen. If the program contains such an event and the user presses F4, the system processes this rather than displaying the check table or the fixed values of the Dictionary field.
    ·     ... ON HELP-REQUEST FOR psel_low_high
    Effect
    As with the addition ON VALUE-REQUEST the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH, where sel is the name of a selection criterion. When the user presses F1 on the relevant field, the subsequent processing block is executed. You can thus implement a self-programmed help for the input/output fields of the selection screen. If the program contains such an event and the user presses F1, the system processes this rather than displaying the documentation of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field.
    ·     ... ON RADIOBUTTON GROUP radi
    Effect
    This event is assigned to the radio button groups on the selection screen defined by PARAMETERS par RADIOBUTTON GROUP radi.  If the report starts at an error  dialog at this point ,precisely these fields of the radio button group
    radi become ready for input again.
    ·     ... ON BLOCK block
    Effect
    This event is assigned to the blocks on the selection screen defined by SELECTION-SCREEN BEGIN/END OF BLOCK block. If the report starts at an error
    dialog at this point, precisely these fields of the block block become ready for input again.
         The events assigned to the radio button groups are executed according to the first parameter of the radio button group.
    The events assigned to the blocks are executed "from the inside to the outside".
    ·     ... OUTPUT
    Effect
    This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION. Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified  values. Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the inout/output attributes of selection screen fields. 
    ·     ... ON EXIT-COMMAND
    Effect
    This event is executed at the exit command of the selection screen - that is, at Back, Cancel, or End,events executed after the screen is sent that do not cause the system to check the input and execute the PAI.
    plz reward if useful
    vivek

  • At Selection-screen Events!

    Hi!
      Pls tell me the order of selection screen events in sequence
    Pls give some sample program for validation of selection screen i/p without using search helps.
      Thanks

    Hi Rahul
    Basic form
    AT SELECTION-SCREEN.
    Additions
    1. ... ON psel
    2. ... ON END OF sel
    3. ... ON VALUE-REQUEST FOR psel_low_high .
    4. ... ON HELP-REQUEST FOR psel_low_high
    5. ... ON RADIOBUTTON GROUP radi
    6. ... ON BLOCK block
    7. ... OUTPUT
    Effect
    This event only makes sense in reports, i.e. in programs set to type 1 in the attributes. Type 1 programs are started via a logical database and always have a selection screen where the user can specify the database selections.
    The event is processed when the selection screen has been processed (at the end of PAI ).
    If an error message ( MESSAGE Emnr ) is sent during the event, all fields on the selection screen become ready for input.
    After further user input, AT SELECTION-SCREEN is executed again.
    Note
    You should only perform very expensive checks with AT SELECTION-SCREEN if the program is then started (not every time the user presses ENTER). Here, you can read the system field SSCRFIELDS-UCOMM (provided a statement TABLES SSCRFIELDS exists). If the field has one of the values 'ONLI' (= Execute) or 'PRIN' (= Execute and Print), the report is then started, i.e. the selection screen is closed and the processing continues with START-OF-SELECTION . Remember that the selection screen (and thus also AT SELECTION-SCREE N ) is also processed in variant maintenance and with SUBMIT VIA JOB . You can determine which of these applies by calling the function module RS_SUBMIT_INFO .
    Addition 1
    ... ON psel
    Effect
    This event is assigned to the selection screen fields corresponding to the report parameter or selection criterion psel .
    If the report starts an error dialog at this point, precisely these fields become ready for input.
    Addition 2
    ... ON END OF sel
    Effect
    For each selection criterion sel on the selection screen, you can call a further screen by pressing a pushbutton. On this screen, you can enter any number of single values and ranges for the selection criterion sel .
    When this screen has been processed (i.e. at the end of PAI for this screen), the event AT SELECTION-SCREEN ON END OF sel is executed.
    At this point, all the values entered are available in the internal table sel .
    Addition 3
    ... ON VALUE-REQUEST FOR psel_low_high
    Effect
    With this addition, the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH , where sel is the name of a selection criterion. The effect of this is twofold:
    The pushbutton for F4 (Possible entries) appears beside the appropriate field.
    When the user selects this pushbutton or presses F4 for the field, the event is executed. You can thus implement a self-programmed possible entries routine for the input/output fields of the selection screen. If the program contains such an event and the user presses F4 , the system processes this rather than displaying the check table or the fixed values of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field. You can, for example, use the CALL SCREEN statement to display a selection list of possible values. The contents of the field psel_low_high at the end of this processing block are copied to the appropriate input/output field.
    This addition is only allowed with report-specific parameters (PARAMETERS ) or selection options (SELECT-OPTIONS ). For database-specific parameters or selection options, you can achieve the same effect by using the addition VALUE-REQUEST FOR ... with the key word PARAMETERS or SELECT-OPTIONS in the include DBxyzSEL (where xyz = name of logical database). In this case, you must program the value help in the database program SAPDBxyz .
    Addition 4
    ... ON HELP-REQUEST FOR psel_low_high
    Effect
    As with the addition ON VALUE-REQUEST the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH , where sel is the name of a selection criterion. When the user presses F1 on the relevant field, the subsequent processing block is executed. You can thus implement a self-programmed help for the input/output fields of the selection screen. If the program contains such an event and the user presses F1 , the system processes this rather than displaying the documentation of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field.
    This addition is only allowed with report-specific parameters (PARAMETERS ) or selection options (SELECT-OPTIONS ). For database-specific parameters or selection options, you can achieve the same effect by using the addition HELP-REQUEST FOR ... with the key word PARAMETERS or SELECT-OPTIONS in the include DBxyzSEL (where xyz = name of logical database). In this case, you must program the help in the database program SAPDBxyz .
    Addition 5
    ... ON RADIOBUTTON GROUP radi
    <u><b>Effect</b></u>
    This event is assigned to the radio button groups on the selection screen defined by PARAMETERS par RADIOBUTTON GROUP radi .
    If the report starts an error dialog at this point, precisely these fields of the radio button group radi become ready for input again.
    <b>
    Addition 6</b>
    ... ON BLOCK block
    Effect
    <b><i>This event is assigned to the blocks on the selection screen defined by SELECTION-SCREEN BEGIN/END OF BLOCK block .
    If the report starts an error dialog at this point, precisely these fields of the block block become ready for input again.</i></b>
    <u><b>Note</b></u>
    In which sequence are the events AT SELECTION-SCREEN ON psel ... , AT SELECTION-SCREEN ON RADIOBUTTON GROUP ... , AT SELECTION-SCREEN ON BLOCK ... , AT SELECTION-SCREEN processed?
    <i>The AT SELECTION-SCREEN ON psel ... events assigned to the parameters or selection options are executed in the sequence they are declared in the program, i.e. in the sequence they appear on the selection screen.
    The events assigned to the radio button groups are executed according to the first parameter of the radio button group.
    The events assigned to the blocks are executed "from the inside to the outside".</i>
    <b>Example</b>
    SELECT-OPTIONS SEL0 FOR SY-TVAR0.
    SELECTION-SCREEN BEGIN OF BLOCK BL0.
    SELECT-OPTIONS SEL1 FOR SY-TVAR1.
    SELECTION-SCREEN BEGIN OF BLOCK BL1.
    PARAMETERS P0 RADIOBUTTON GROUP RADI.
    PARAMETERS P1 RADIOBUTTON GROUP RADI.
    SELECTION-SCREEN BEGIN OF BLOCK BL2.
    PARAMETERS P3.
    SELECTION-SCREEN END   OF BLOCK BL2.
    SELECT-OPTIONS SEL2 FOR SY-TVAR2.
    SELECTION-SCREEN END   OF BLOCK BL1.
    SELECTION-SCREEN END   OF BLOCK BL0.
    <b>Sequence:</b>
    AT SELECTION-SCREEN ON...
    SEL0
    SEL1
    RADIOBUTTON GROUP RADI
    P3
    BLOCK BL2
    SEL2
    BLOCK BL1
    BLOCK BL0
    AT SELECTION-SCREEN is executed at the very end.
    <b>Addition 7</b>
    ... OUTPUT
    <u>Effect</u>
    <b>This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION . Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
    Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.</b>
    <u><b>Example</b></u>
    <b>Output all fields of the
    SELECT-OPTION NAME
    highlighted:</b>
    SELECT-OPTIONS NAME FOR SY-REPID MODIF ID XYZ.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
         CHECK SCREEN-GROUP1 = 'XYZ'.
         SCREEN-INTENSIFIED = '1'.
         MODIFY SCREEN.
      ENDLOOP.
    <i><b>The addition MODIF ID XYZ to the key word SELECT-OPTIONS assigns all fields of the selection option NAME to a group you can read in the field SCREEN-GROUP1 . At PBO of the selection screen, all these fields are then set to highlighted.
    </b></i>
    check these links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm
    Reward all helpfull answers
    Regards
    Pavan

  • WHAT IS ACTUALLY SELECTION SCREEN

    WHEN DOES ACTUALLY SELECTION SREEN WILL BE EXECUTED ACCORDING TO PRIORITY.

    Hai Raghu
    Go through the following Document
    SELECTION-SCREEN
    Variants
    1. SELECTION-SCREEN BEGIN OF LINE.
    2. SELECTION-SCREEN END OF LINE.
    3. SELECTION-SCREEN SKIP n.
    4. SELECTION-SCREEN ULINE.
    5. SELECTION-SCREEN POSITION pos.
    6. SELECTION-SCREEN COMMENT fmt name.
    7. SELECTION-SCREEN PUSHBUTTON fmt name USER-COMMAND ucom.
    8. SELECTION-SCREEN BEGIN OF BLOCK block.
    9. SELECTION-SCREEN END OF BLOCK block.
    10. SELECTION-SCREEN FUNCTION KEY n.
    11. SELECTION-SCREEN BEGIN OF VERSION ver TEXT-xxx.
    12. SELECTION-SCREEN END OF VERSION ver.
    13. SELECTION-SCREEN EXCLUDE ... .
    14. SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE dbtab.
    15. SELECTION-SCREEN FIELD SELECTION FOR TABLE dbtab.
    <b>Effect
    The key word SELECTION-SCREEN only makes sense in reports, i.e. programs specified as type "1" in the attributes. You use it to design the selection screen in the program or logical database access routine.
    The selection screen is normally generated from the SELECT-OPTIONS and PARAMETERS statements in the report and logical database access routine. Each of these objects occupies a separate line on the selection screen.
    SELECTION-SCREEN allows you to form blocks, combine several parameters and comments together on one line, generate pushbuttons on the screen or activate them in the application toolbar, as well as insert blank lines, underscore lines and comments.
    Like SELECT-OPTIONS and PARAMETERS , you can use SELECTION-SCREEN statements in reports and in the include program DBldbSEL of the logical database ldb assigned to the report in the attributes. Some variants are defined only for logical databases and can therefore only be used in the include program DBldbSEL .</b>
    Variant 1
    SELECTION-SCREEN BEGIN OF LINE.
    Variant 2
    SELECTION-SCREEN END OF LINE.
    Effect
    Allows you to combine several parameters and comments specified between the SELECTION-SCREEN BEGIN OF LINE and SELECTION-SCREEN END OF LINE statements and output them on one line. As a result, there is no automatic new line for each PARAMETER and no selection texts are displayed.
    Example
    SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT 1(10) TEXT-001.
      PARAMETERS: P1(3), P2(5), P3(1).
    SELECTION-SCREEN END OF LINE.
    Selection screen:
    Comment ___ _____ _
    Note
    You cannot order SELECT-OPTIONS between SELECTION-SCREEN BEGIN OF LINE and SELECTION-SCREEN END OF LINE because several objects are generated on the selection screen for a SELECT-OPTION (e.g. fields for the lower and upper limits of ranges).
    Variant 3
    SELECTION-SCREEN SKIP n.
    Additions
    1. ... FOR TABLE dbtab
    2. ... ID id
    Effect
    Generates n blank lines (see also SKIP ).
    You must specify a value for n between 1 and 9. If you want to output just one blank line, you can omit n .
    Addition 1
    ... FOR TABLE dbtab
    Effect
    This addition is allowed only in the database include program DBldbSEL . It is, in fact, a requirement. If you use SELECTION-SCREEN SKIP in DBldbSEL , you must assign the statement to a table (or to a field - see the variant COMMENT .
    This assignment is necessary in order to restrict the SELECTION-SCREEN statements for a report selection screen to those relevant for the tables used in the report, i.e. those which refer to a table used in the report. Any SELECTION-SCREEN statement assigned to a table not used in the report with the addition FOR TABLE dbtab are ignored when the report selection screen is generated.
    Note
    A table dbtab of the logical database ldb is considered as "used in the report" if it is either declared in a TABLES statement or its position in the database hierarchy lies somewhere between the root and a table dbtab_2 declared in the report.
    Example
    Hierarchy of logical database ldb :
    SPFLI
      SAPLANE
      SFLIGHT
                    |
      SBOOK
    In the report:
    TABLES SFLIGHT.
    Tables considered as "used" include  SFLIGHT  (since it is
    declared directly), as well as  SAPLANE  and  SPFLI  (since
    they lie on the path from the hierarchy root " SPFLI " to the
    declared table  SFLIGHT ). The table  SBOOK  is not
    considered  as used, i.e. all the  SELECTION-SCREEN  statements
    qualified with the addition " FOR TABLE SBOOK " in  DBldbSEL
    are ignored.
    Addition 2
    ... ID id
    Effect
    This addition is allowed only in the database include program DBldbSEL . It is used to identify a SELECTION-SCREEN object (in this case blank lines) via an ID which can be up to 3 characters long. This ID is then specified in SELECTION-SCREEN EXCLUDE IDS id in order to exclude the object from a selection screen version.
    Variant 4
    SELECTION-SCREEN ULINE.
    Additions
    1. ... fmt
    2. ... FOR TABLE dbtab
    3. ... MODIF ID mod
    4. ... ID id
    Effect
    Generates an underline (see also ULINE ).
    Addition 1
    ... fmt
    Effect
    Format specification with the form /pos(len) , pos(len) or (len) . The slash ( / ) generates a new line and is therefore not allowed between BEGIN OF LINE and END OF LINE . The effect of the statement is to underscore the current line starting from the position pos for the length len . The variant (len) (without position specification) is allowed only between BEGIN OF LINE and END OF LINE . In this case, the current position in the line is used. See also WRITE .
    You can specify the position pos as a number (in this case, it is relative to the frame if the statement comes between SELECTION-SCREEN BEGIN OF BLOCK ... WITH FRAME ... and SELECTION-SCREEN END OF BLOCK ... ). Also allowed are the symbolic positions POS_LOW and POS_HIGH . These are the positions at which the input fields of the SELECT-OPTI ONS are output ( POS_LOW is also the position of PARAMETERS .
    Note
    Format specifications which do not generate a new line can produce overlapping objects on the selection screen. Therefore, you should be particularly careful with position and length specifications.
    Example
    SELECTION-SCREEN ULINE /1(10).
    SELECTION-SCREEN ULINE POS_LOW(10).
    SELECTION-SCREEN ULINE POS_HIGH(10).
    This generates three underscore blocks, each with a length of 10, on one line.
    Addition 2
    ... FOR TABLE dbtab
    Effect
    See variant 3 ( SELECTION-SCREEN SKIP ).
    Addition 3
    ... MODIF ID mod
    Effect
    The specified modification group ( SCREEN-GROUP1 ) is assigned to the underscore. You can use this under AT SELECTION-SCREEN in the report or in the PAI routine of the database program SAPDBldb to modify the screen.
    Note
    The name of the modification group must be specified without quotation marks. It can be up to three characters long.
    Addition 4
    ... ID id
    Effect
    See variant 3 ( SELECTION-SCREEN SKIP )
    Variant 5
    SELECTION-SCREEN POSITION pos.
    Addition
    ... FOR TABLE dbtab
    Effect
    Outputs the parameter starting from the position pos .
    This variant is allowed only between SELECTION-SCREEN BEGIN OF LINE< /> and SELECTION-SCREEN END OF LINE .
    As with the addition ULINE , you can specify the position as fixed (if necessary relative to the frame) or symbolically in the form POS_LOW or POS_HIGH .
    Addition
    ... FOR TABLE dbtab
    Effect
    See variant 3 ( SELECTION-SCREEN SKIP )
    Variant 6
    SELECTION-SCREEN COMMENT fmt name.
    Additions
    1. ... FOR TABLE dbtab
    2. ... FOR FIELD f
    3. ... MODIF ID mod
    4. ... ID id
    Effect
    Generates a comment on the selection screen. For the name name , there are two options:
    name takes the form TEXT-xxx where xxx is a three-character name for a text symbol. In this case, the contents of the text symbol are displayed at runtime, i.e. the text cannot be changed dynamically. name is another eight-character name. Here, you create a field with the name name in the length specified in the format fmt< /> and it is then generated as an output field on the selection screen. The contents of these comments must therefore be set at runtime (e.g. at INITIALIZATION or - in the case of comments in the database include program DBldbSEL - in the routine INIT of the database program SAPDBldb . They can also be changed when the selection screen is being processed.
    Note
    The field name is generated automatically and so cannot be defined with DATA .
    With comments, you must always specify a format fmt (see variant ULINE ).
    Note
    You must program a new line yourself via the format fmt .
    Addition 1
    ... FOR TABLE dbtab
    Note
    See variation 3 (SELECTION-SCREEN SKIP).
    Addition 2
    ... FOR FIELD f
    Effect
    Since the comment is assigned to a parameteror a select-option , the help display shows the documentation of the reference field if this parameter or selection option.
    In addition, the comment is suppressed if the reference object was set to 'invisible' via a selection variant.
    Note
    In database access routines, the comment is generated whenever the reference field is output. Therefore, you should not use the addition FOR TABLE with this variant.
    Example
    SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT 10(20) TEXT-001
                       FOR FIELD PARM.
      SELECTION-SCREEN POSITION POS_LOW.
      PARAMETERS PARM LIKE SAPLANE-PLANETYPE.
    SELECTION-SCREEN END OF LINE.
    This code displays a 20-byte long comment followed by the parameter at the normal position ( POS_LOW ) on the same line. If the user presses F1 for both objects, the documentation of SAPLANE-PLANETYPE is displayed.
    Addition 3
    ... MODIF ID mod
    Effect
    See variant 4 ( SELECTION-SCREEN ULINE )
    Addition 4
    ... ID id
    Effect
    See variant 3 ( SELECTION-SCREEN SKIP )
    Variant 7
    SELECTION-SCREEN PUSHBUTTON fmt name USER-COMMAND ucom.
    Additions
    1. ... FOR TABLE dbtab
    2. ... MODIF ID mod
    3. ... ID id
    Effect
    Generates a pushbutton on the selection screen. Also specified is the user command ucom (without quotation marks) which can be up to 4 characters long. This is generated when the user presses the button. Apart from this, the syntax is largely similar to that of SELECTION-SCREEN COMMENT :
    For the name name , there are two options:
    name takes the form TEXT-xxx where xxx is a three-character name for a text symbol. In this case, the contents of the text symbol are displayed at runtime, i.e. the text cannot be changed dynamically. name is another eight-character name. Here, you create a field with the name name in the length specified in the format fmt< /> and it is then generated as an output field on the selection screen. The contents of these comments must therefore be set at runtime (e.g. at INITIALIZATION or - in the case of comments in the database include program DBldbSEL - in the routine INIT of the database program SAPDBldb . They can also be changed when the selection screen is being processed.
    Note
    The field name is generated automatically and so cannot be defined with DATA .
    With pushbuttons, you must always specify a format fmt (see variant ULINE ).
    Note
    You must program a new line yourself via the format fmt .
    The best way to respond to the user pressing the pushbutton is in the event AT SELECTION-SCREEN or - in the case of pushbuttons in the database include program DBldbSEL - in the routine PAI (with FNAME = '*' and MARK = SPACE ) in the database program SAPDBldb . Here, the field SSCRFIELDS-UCOMM contains the user command ucom (the table SSCRFIELDS must be declared with the TABLES statement).
    Addition 1
    ... FOR TABLE dbtab
    Effect
    See variant 3 ( SELECTION-SCREEN SKIP )
    Addition 2
    ... MODIF ID mod
    Effect
    See variant 4 ( SELECTION-SCREEN ULINE )
    Addition 3
    ... ID id
    Effect
    See variant 3 ( SELECTION-SCREEN SKIP )
    Example
    TABLES SSCRFIELDS.
    SELECTION-SCREEN PUSHBUTTON /10(20) CHARLY USER-COMMAND ABCD.
    INITIALIZATION.
      MOVE 'My text' TO CHARLY.
    AT SELECTION-SCREEN.
      IF SSCRFIELDS-UCOMM = 'ABCD'.
      ENDIF.
    The selection screen displays a pushbutton with the text 'My text' . With AT SELECTION-SCREEN , the field SSCRFIELDS-UCOMM contains ABCD after the user has pressed the button.
    Variant 8
    SELECTION-SCREEN BEGIN OF BLOCK block.
    Additions
    1. ... WITH FRAME
    2. ... TITLE title
    3. ... NO INTERVALS
    Effect
    Starts a logical block on the selection screen. If you use the addition WITH FRAME , a frame is generated around the block. The addition TITLE title is allowed only in conjunction with WITH FRAME .
    For the title title ,there are two options (see also the variants COMMENT and PUSHBUTTON ):
    title takes the form TEXT-xxx where xxx is a three-character name for a text symbol. In this case, the contents of the text symbol are displayed at runtime, i.e. the text cannot be changed dynamically. title is another eight-character name. Here, you create a field with the name title in the length specified in the format fmt< /> and it is then generated as an output field on the selection screen. The contents of these comments must therefore be set at runtime (e.g. at INITIALIZATION or - in the case of comments in the database include program DBldbSEL - in the routine INIT of the database program SAPDBldb . They can also be changed when the selection screen is being processed.
    Note
    The field title is generated automatically and so cannot be defined with DATA .
    At runtime, the event AT SELECTION-SCREEN ON BLOCK block is executed for every block in the PAI module of the selection screen (with database- specific blocks, the PAI module in the program SAPDBldb is also executed with the parameters FNAME = BLOCK_block and MARK = SPACE ). If this produces an error message, just the fields of this block are ready for input.
    You can nest blocks. The maximum nesting depth for blocks with frames is 5.
    Addition 3
    ... NO INTERVALS
    Effect
    Displays all SELECT-OPTIONS within the block in simplified form without a 'to' field on the selection screen (like the addition " NO INTERVALS " with SELECT-OPTIONS ). If the block has a frame, this is correspondingly small.
    Note
    In the case of blocks without frames, the attribute " NO INTERVALS " is not inherited by subordinate blocks. However, all subordinate blocks of blocks with frames inherit this attribute because the generated frame is smaller and there is no space for the 'to' field.
    Variant 9
    SELECTION-SCREEN END OF BLOCK block.
    Effect
    Closes the block opened by SELECTION-SCREEN BEGIN OF BLOCK block . If the block has a frame, the frame is closed here. Blocks opened in the include program DBldbSEL must also be closed there.
    Note
    Blocks defined in the database include program DBldbSEL must also be close there. As with SELECTION-SCREEN BEGIN OF LINE and SELECTION-SCREEN END OF LINE , you cannot use the addition FOR TABLE with blocks. Instead, the objects in the blocks (selection options , parameters , comments, underscores ...) are omitted if the table to which they belong is not used in the report (see note under variant SELECTION-SCREEN SKIP ). Empty blocks (possibly with frames) are also omitted.
    Example
    TABLES SAPLANE.
    SELECTION-SCREEN BEGIN OF BLOCK CHARLY
                     WITH FRAME TITLE TEXT-001.
      PARAMETERS PARM(5).
      SELECT-OPTIONS SEL FOR SAPLANE-PLANETYPE.
    SELECTION-SCREEN END   OF BLOCK CHARLY.
    (Let TEXT-001 contain 'Block Charly' ).
    Selection screen:
    Block Charly--
    PARM _____
    | SEL ________ bis ________ |
    Variant 10
    SELECTION-SCREEN FUNCTION KEY n.
    Additions
    1. ... FOR TABLE dbtab
    2. ... ID id
    Effect
    With this variant, you can activate up to 5 function keys in the application toolbar on the selection screen ( n is one of the numbers 1 to 5).
    At runtime, the text must be placed in the Dictionary field SSCRFIELDS-FUNCTXT_01 or ... SSCRFIELDS-FUNCTXT_05 .
    The function code placed in the field SSCRFIELDS-UCOMM is 'FC01' or ... 'FC05' . You can read this function code under AT SELECTION-SCREEN or in the PAI module of the database access program SAPDBldb .
    Addition 1
    ... FOR TABLE dbtab
    Effect
    See variant 3 ( SELECTION-SCREEN SKIP )
    Addition 2
    ... ID id
    Effect
    See variant 3 ( SELECTION-SCREEN SKIP )
    Example
    TABLES SSCRFIELDS.
    SELECTION-SCREEN FUNCTION KEY 1.
    INITIALIZATION.
      MOVE 'My text' TO SSCRFIELDS-FUNCTXT_01.
    AT SELECTION-SCREEN.
      IF SSCRFIELDS-UCOMM = 'FC01'.
      ENDIF.
    The selection screen displays a pushbutton with the text 'My text' . With AT SELECTION-SCREEN , the field SSCRFIELDS-UCOMM contains FC01 after the user has pressed the button.
    Variant 11
    SELECTION-SCREEN BEGIN OF VERSION ver TEXT-xxx.
    Variant 12
    SELECTION-SCREEN END OF VERSION ver.
    Variant 13
    SELECTION-SCREEN EXCLUDE ... .
    Effect
    Defines a selection screen version (with a three-character name ver ). These variants are only allowed in the database include program DBldbSEL . Between BEGIN OF VERSION and END OF VERSION , you can exclude selection screen objects for the version ver , i.e. remove them from the selection screen with SELECTION-SCREEN EXCLUDE. .
    For a report, you activate a selection screen by making an entry in the attributes. If the database access program SAPDBldb itself has a selection screen version in the attributen, this applies for all reports which use this logical database and have attributes where no separate selection screen version is declared.
    The text symbol TEXT -xxx is used merely to facilitate selection of a selection screen version via F4 help when maintaining the attributes.
    Additions
    (to SELECTION-SCREEN EXCLUDE )
    1. ... PARAMETERS par
    2. ... SELECT-OPTIONS sel
    3. ... RADIOBUTTON GROUPS radi
    4. ... BLOCKS block
    5. ... IDS id
    Effect
    Excludes selection screen objects between SELECTION-SCREEN BEGIN and END OF VERSION . This allows you to exclude individual parameters or selection options , radiobutton groups , blocks defined by SELECTION-SCREEN BEGIN/END OF BLOCK and other objects such as comments and underscores specified by the addition ID id .
    Note
    The database program SAPDBldb can get the active version for the current report with the function module RS_SELSCREEN_VERSION .
    Example
    PARAMETERS PAR_1 LIKE dbfield_1 FOR TABLE dbtab_1.
    SELECT-OPTIONS SEL_1 FOR dbfield_01.
    SELECT-OPTIONS SEL_2 FOR dbfield_02.
    SELECT-OPTIONS SEL_3 FOR dbfield_03.
    SELECTION-SCREEN COMMENT /10(20) TEXT-100 FOR TABLE dbtab_1 ID 001.
    SELECTION-SCREEN COMMENT /8(30) TEXT-200 FOR TABLE dbtab_2 ID 002.
    PARAMETERS PAR_2 LIKE dbfield_1 FOR TABLE dbtab_2.
    PARAMETERS PAR_3 LIKE dbfield_1 FOR TABLE dbtab_2.
    SELECTION-SCREEN BEGIN OF VERSION ABC TEXT-008.
    SELECTION-SCREEN EXCLUDE PARAMETERS: PAR_1, PAR_3.
    SELECTION-SCREEN EXCLUDE SELECT-OPTIONS: SEL_2.
    SELECTION-SCREEN EXCLUDE IDS: 001.
    SELECTION-SCREEN END OF VERSION ABC.
    If the report attributes (or the attributes of the database program SAPDBldb ) contain the selection screen version ABC , the parameters PAR_1 and PAR_3 , the selection option SEL_2 and the comment with the text number 100 ( ID 001 ) are not displayed on the selection screen. When you maintain the attributes, the text symbol 008 of SAPDBldb is displayed if you press F4 on the field 'Selection screen version'.
    Variant 14
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE dbtab.
    Addition
    ... ID id
    Effect
    This variant is allowed only in the database include program DBldbSEL . It informs you for which logical database tables additional selections are supported. If one of these tables is active in the report (i.e. it is declared under TABLES or lies somewhere on the path from the root of the database hierarchy to a table declared with TABLES ), a psuhbutton called 'Dynamic selections' appears on the selection screen. On pressing this button, the user branches to a dialog Taste where it is possible to enter selections for the fields of the relevant tables in the logical database. You can define the field list in two different ways:
    Via a selection view defined for the purpose:
    You can maintain selection views within the logical database maintenance transaction. They consist of a set of fields from logical database tables which are divided into groups. It is also possible to preselect fields. Customers can overlay these selection views with their own (i.e. in this case, the system searches first for the customer selection view and only accesses the SAP selektion view if no customer-specific view exists).
    If a preselection has already been made in the selection view, the user immediately sees the selection screen for the preselected fields and can enter selections. Otherwise, a fields must be selected first.
    Via all fields of all tables
    In this case, the user must first choose the tables and then select the fields for which additional selections are to be made before branching to the selection screen to enter the dynamic selections.
    The database access programm SAPDBldb then receives the WHERE clauses generated from the user entries in the form of a complex data object DYN_SEL .
    Addition
    ... ID id
    Effect
    Similar to the addition 2 ( SKIP ). This allows you to exclude tables from the possibility of dynamic selection via the selection screen versions.
    Note
    The exact definition of the object DYN_SEL is stored in the TYPE-POOL RSDS and is as follows:
    TYPES: BEGIN OF RSDS_WHERE,
             TABLENAME LIKE RSDSTABS-PRIM_TAB,
             WHERE_TAB LIKE RSDSWHERE OCCURS 5,
           END OF RSDS_WHERE.
    TYPES: BEGIN OF RSDS_TYPE,
             CLAUSES TYPE RSDS_WHERE OCCURS 5,
             TEXPR   TYPE RSDS_TEXPR,
             TRANGE  TYPE RSDS_TRANGE,
           END   OF RSDS_TYPE.
    DATA DYN_SEL TYPE RSDS_TYPE.
    The object DYN_SEL thus contains a component ( CLAUSES ) which is an internal table. Each line of this internal table contains a table name ( TABLENAME ) and another table ( WHERE_TAB ) which contains the WHERE clauses for the table ( TABLENAME ).
    You can find the structure of the other components in the type pool RSDS .
    TEXPR contains the selections in a format which allows storage and can be used for the "freely callable" function modules when entering dynamic selections ( FREE_SELECTIONS_INIT , FREE_SELECTIONS_DIALOG ). TRANGE contains the selections in the form of RANGES tables which can be used with the IN operator in SELECT , CHECK and IF .
    Note
    Neither the TYPE-POOL RSDS nor the declaration of DYN_SEL must appear in the database program. Both are automatically included by the system.
    In the database program SAPDBldb , an access to a table XXXX could look something like below:
    FORM PUT_XXXX.
      DATA L_DS_CLAUSES TYPE RSDS_WHERE.
      MOVE 'XXXX' TO L_DS_CLAUSES-TABLENAME.
      READ TABLE DYN_SEL-CLAUSES WITH KEY L_DS_CLAUSES-TABLENAME
                                 INTO L_DS_CLAUSES.
      SELECT * FROM XXXX
               WHERE field1 IN ...
               AND   field2 ....
               AND (L_DS_CLAUSES-WHERE_TAB).
          PUT XXXX.
      ENDSELECT.
    ENDFORM.
    Note
    If the table L_DS_CLAUSES-WHERE_TAB is empty, i.e. if no dynamic selections are entered for the table XXXX , the addition ... AND (L_DS_CLAUSES-WHERE_TAB) is ignored during the SELECT .
    Variant 15
    SELECTION-SCREEN FIELD SELECTION FOR TABLE dbtab.
    Addition
    ... ID id
    Effect
    This variant is allowed only in the database include program DBldbSEL . It informs you for which logical database tables field selection is supported.
    For these tables, you can fill just those database fields which the report actually needs. In the report, you determine these fields with GET dbtab FIELDS f1 ... fn or GET dbtab LATE FIELDS f1 ... fn (the field list is then supplemented by the key fields of the table dbtab ).
    By restricting to the really necessary field, you considerably improve performance. The database access program SAPDBldb receives the desired fields for the dynamic field selection in the form of an internal table SELECT_FIELDS .
    Note
    The exact definition of the object SELECT_FIELDS is stored in the TYPE-POOL RSFS and looks something like below:
    TYPES: BEGIN OF RSFS_TAB_FIELDS,
             TABLENAME LIKE RSDSTABS-PRIM_TAB,
             FIELDS LIKE RSFS_STRUC OCCURS 10,
           END OF RSFS_TAB_FIELDS.
    TYPES: RSFS_FIELDS TYPE RSFS_TAB_FIELDS OCCURS 10.
    DATA SELECT_FIELDS TYPE RSFS_FIELDS.
    SELECT_FIELDS is thus an internal table. Each line of this internal table contains a table name ( TABLENAME ) and another internal table ( FIELDS ) which contains the desired fields of the table ( TABLENAME ).
    Note
    Neither the TYPE-POOL RSFS nor the declaration of SELECT_FIELDS has to appear in the database program. Both are automatically included by the system. Unlike the objects connected with the addition DYNAMIC SELECTIONS , SELECT_FIELDS is also available in the report.
    In the database program SAPDBldb , an access to a table XXXX could look something like below:
    FORM PUT_XXXX.
      DATA L_TAB_FIELDS TYPE RSFS_TAB_FIELDS.
      MOVE 'XXXX' TO L_TAB_FIELDS-TABLENAME.
      READ TABLE SELECT_FIELDS WITH KEY L_TAB_FIELDS-TABLENAME
                               INTO L_TAB_FIELDS.
      SELECT (L_TAB_FIELDS-FIELDS)
                 INTO CORRESPONDING FIELDS OF XXXX
                 FROM XXXX
             WHERE field1 IN ...
             AND   field2 ....
          PUT XXXX.
      ENDSELECT.
    ENDFORM.
    Note
    If the table L_TAB_FIEDLS is empty, i.e. if no dynamic selections are entered for the table XXXX , SELECT (L_TAB_FIELDS) ... works like SELECT * ... , i.e. all fields of the table XXXX are filled.
    The internal table SELECT_FIELDS already contains values when the routine INIT is executed in the database program or when the INITIALIZATION processing is executed in the report. It can be manipulated by the appropriate program if it is absolutely necessary to fill another field for the logical database.
    Regards
    Sreeni

  • ESS - Creating a Front End Selection Screen, that accesses SAP T-code

    Hi,
    We have an ESS Portal in our company.
    I have been given the following request:
    For a specific transaction, create a selection screen in the portal that would be a modified version of the selection screen that exists in the SAP system.
    From this front-end in the selection screen, the specific transaction within the SAP system would be accessed.
    How is this done? What do I need to know about the overall process?
    Please help.
    Thanks,
    John

    Just to clarify,
    Create the transaction and selection screen in the SAP system.
    Then ask the Portal team to create an iView for this transaction.
    What if I need to say get the Internal SAP employee number from the user's sign on information?
    Thanks,
    John

  • Change selection screen in LDB (KDF logical database - NOT HR)

    Hi All,
    Iu2019d like to use KDF logical database to keep the dynamic selections since user wants to use it but I need to change the selection screen itself. The existing variants for KDF donu2019t meet the user requirements. Some fields I need to hide some add. Like I want to u201Cremoveu201D the field u2018Posting periodu2019 (MONAT) (which is available in dynamic selection screen) and put it on the u201Cmainu201D selection screen.
    Do I need to create my own logical database or there is a way around?
    Could someone give me a practical advice or sample of solution?
    Thanks a lot.

    Thanks Himanshu,
    I did as you suggested but problem is that it does not allow me to hide the whole block.
    I have 3 filelds actually on block KD_0 I need to hide (its from selection screen of KDF logical database.)
      SELECT-OPTIONS: KD_LIFNR FOR LFA1-LIFNR MATCHCODE OBJECT KRED.
      SELECT-OPTIONS: KD_BUKRS    FOR  LFB1-BUKRS.
    SELECTION-SCREEN END OF BLOCK KD_0.
    PARAMETERS KD_INDEX AS SEARCH PATTERN FOR TABLE LFA1.
    What I did is below.  I used sp instead of  u201C=u201D since it has many screen for field KD_LIFNR(for frame, text etc).
    And when I did just for KD_LIFNR it was hidden but when I did the same for KD_BUKRS it was not hidden . The field has stars u201C*********u201D in it.
    Same happen with KD_INDEX. The name of the field is hidden but field not and it filled with ********. Do you have any ideas what it can be?
    I debugged it to catch all screen names but no luck
      loop at screen.
        if screen-name cp 'KD_LIFNR' or
        screen-name cp 'KD_BUKRS' or
        screen-name cp 'KD_INDEX' or
        screen-name = '%B000003_BLOCK_1000' or       
        screen-name = 'SSCRTEXTS-FRAME_TEXT' or
        screen-name = 'SSCRTEXTS-MCID_TEXT' or
        screen-name = 'SSCRTEXTS-STRNG_TEXT' or
        screen-name = 'SSCRFIELDS-SEARCH_BTN' or
        screen-name =  '%B025008_BLOCK_1000' or
        screen-name =  '%F021010_1000' or
        screen-name =  'ALCUR' or
        screen-name =  '%F022012_1000' or
        screen-name =  'EXCDT' or
        screen-name = 'SSCRFIELDS-UCOMM'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.

  • Unable to save the ALV layout variant and display of selection screen on F4

    Hi All,
    The end user wants to directly select the layout variant (SLIS_VARI). I have used the following code to display the layout variant on selection screen. But, I am unable to save the variant on ALV. Whenever I am trying to select the layout variants (by doing F4 on selection screen) its displaying "No Layout found".
    Following is the code for displaying layout variant:
    PARAMETERS: p_var TYPE slis_vari.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var.
      PERFORM f4_variant CHANGING p_var.
    FORM f4_variant  CHANGING c_variant TYPE slis_vari.
      DATA: ls_variant TYPE disvariant,
                l_exit     TYPE char1.
      ls_variant-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = ls_variant
          i_save     = 'A'
        IMPORTING
          e_exit     = l_exit
          es_variant = ls_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF l_exit EQ space.
          c_variant = ls_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f4_variant
    and following is the code for displaying the ALV:
    FORM edition_alv.
      ws_variant2 = ls_variant.
    * Call ALV editor in list mode
      IF p_list = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program      = ws_extract1-report
            i_callback_user_command = ws_user_command
            is_layout               = ws_layout
            it_fieldcat             = wt_fieldcat
            it_sort                 = wt_sort
            i_save                  = 'A'
            is_variant              = ws_variant2
            it_events               = wt_events[]
          TABLES
            t_outtab                = wt_edition.
    * Call ALV editor in grid mode
      ELSE.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program      = ws_extract1-report
            i_callback_user_command = ws_user_command
            it_fieldcat             = wt_fieldcat
            it_sort                 = wt_sort
            i_save                  = 'A'
            is_variant              = ws_variant2
            it_events               = wt_events[]
          TABLES
            t_outtab                = wt_edition.
      ENDIF.
    ENDFORM.  
    I am not sure whats going wrong, but I am unable to save variants.
    Please help.
    Thanks,
    Vishal.

    The F4 will display you the existing layouts only. So you need to save the layout first & then execute the report again & check if you are getting F4 values for that field.
    The Layout needs to get stored with variant.
    Regards,
    Mahesh

  • Need help to disable input selection-screen - very urgent

    Hi SAP experts,
    I have a requirement where in I need to disable ( Grey out ) the input fileds on the selection screen .
    My problem is as I am using ABAP query I am not able to use any events ( AT SELECTION-SCREEN OUTPUT ).
    My selection screen looks like this
    MATERIAL NUMBER ( SELECT-OPTIONS)
    MATERIAL TYPE ( PARAMETERS )
    Now I want to add one more check box below the above fields on the selection-screen.When I click on the check-box,the MATERIAL NUMBER  must be greyed out and MATERIAL TYPE should remain the same.
    Please let me know the coding for the same. All answers would be rewarded.
    Thanks in Advance,
    Suresh.

    Hi,
    Check out these codes.
    1.
    TABLES : mara, makt.
    parameter: p_matnr type mara-matnr,
               p_maktx type makt-maktx.
    at selection-screen output.
    select single maktx
    from makt
    into p_maktx
    where matnr = p_matnr
    and spras = 'EN'.
    loop at screen.
      if screen-name = 'P_MAKTX'.
        screen-input = 0.
        modify screen.
      endif.
    endloop.
    2.
    TABLES : mara, makt.
    TYPES:BEGIN OF tp_maktx,
          maktx TYPE makt-maktx,
          END OF tp_maktx.
    DATA:t_maktx TYPE STANDARD TABLE OF tp_maktx,
         wa_maktx TYPE tp_maktx.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    SELECT-OPTIONS: s_maktx FOR makt-maktx.
    INITIALIZATION.
      REFRESH s_maktx[].
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'S_MAKTX-LOW' or screen-name = 'S_MAKTX-HIGH'.
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
      REFRESH s_maktx[].
      if s_matnr[] is not initial.
      SELECT maktx FROM makt
      INTO TABLE t_maktx
      WHERE matnr IN s_matnr
      AND spras = 'EN'.
      endif.
      LOOP AT t_maktx INTO wa_maktx.
        s_maktx-low = wa_maktx-maktx.
        APPEND s_maktx.
        CLEAR:wa_maktx.
      ENDLOOP.
    3.
    TABLES : mara, makt.
    parameter p_cb1 type c as checkbox.
    parameter p_cb2 type c as checkbox.
    parameter p_cb3 type c as checkbox.
    initialization.
    loop at screen.
    if screen-name = 'P_CB3'.
    screen-invisible = 1.
    modify screen.
    endif.
    endloop.
    at selection-screen output.
    *loop at screen.
    *if screen-name = 'P_CB3'.
    *screen-invisible = 1.
    *modify screen.
    *endif.
    *endloop.
    loop at screen.
    if p_cb1 = 'X'.
      if screen-name = 'P_CB2'.
      screen-invisible = 1.
      modify screen.
      endif.
      if screen-name = 'P_CB3'.
      screen-invisible = 0.
      modify screen.
      endif.
    endif.
    if p_cb2 = 'X'.
      if screen-name = 'P_CB3'.
      screen-invisible = 1.
      modify screen.
      endif.
      if screen-name = 'P_CB1'.
      screen-invisible = 0.
      modify screen.
      endif.
    endif.
    if p_cb3 = 'X'.
      if screen-name = 'P_CB1'.
      screen-invisible = 1.
      modify screen.
      endif.
      if screen-name = 'P_CB2'.
      screen-invisible = 0.
      modify screen.
      endif.
    endif.
    endloop.
    Reward if helpful..
    Regards.

  • How to write text  on the selection screen of a  report

    Hi all,
    I need to write some user defined text on the selection screen of an ALV GRID Report.
    Please suggest me how can i do this
    Thanks
    Ajay.

    SELECTION-SCREEN BEGIN OF LINE .
    SELECTION-SCREEN COMMENT 12(31) text-024.<-----Goto text elements and add text.
    PARAMETERS:P_FILEN LIKE RLGRAP-FILENAME .
    SELECTION-SCREEN END OF LINE

  • Selection Screen Bug :: Drop Down List.

    Hi
    I have created the following ABAP Report. I am new at this and I have just hit an issue. I have two drop down boxes linked to transactions. Now when I select a report from Drop Down 1 and click it it goes to the transaction. Now if I also have a selection in Drop Down 2 it actually runs both transactions.
    How can i fix this?
    Thanks
    Adeel
    REPORT TEST.
    *TYPE POOLS DECLARATIONS
    TYPE-POOLS: vrm.
    TABLES: sscrfields.
    *SELECTION SCREEN FIELDS
    *DATA: c(20) TYPE c.
    ***********SELECTION-SCREENS**********************
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-tt1.
    PARAMETERS: one(20) AS LISTBOX VISIBLE LENGTH 40.
    PARAMETERS: two(20) AS LISTBOX VISIBLE LENGTH 40.
    * ADD Afer 40 to show text "DEFAULT 'PLEASE SELECT'"
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK blk1.
    *********DROP DOWN SELECTION WITH DESCP******************
    AT SELECTION-SCREEN OUTPUT.
    PERFORM ONE.
    PERFORM TWO.
    *&      Form  ONE
    *       text
    FORM one.
      DATA: name  TYPE vrm_id,
          list  TYPE vrm_values,
          value LIKE LINE OF list.
      name = 'ONE'.
      value-key = '1 ::'.
      value-text = 'Stock Report'.
      APPEND value TO list.
      CLEAR value.
      value-key = '2 ::'.
      value-text = 'Open Sales Order Report'.
      APPEND value TO list.
      CLEAR value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "ONE
    *&      Form  TWO
    *       text
    FORM two.
      DATA: name  TYPE vrm_id,
          list  TYPE vrm_values,
          value LIKE LINE OF list.
      name = 'TWO'.
      value-key = '1 ::'.
      value-text = 'AS Stock Report'.
      APPEND value TO list.
      CLEAR value.
      value-key = '2 ::'.
      value-text = 'AS Open Sales Order Report'.
      APPEND value TO list.
      clear value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "TWO
    ***********LINKS TO ABOVE SELECTION**********************
    START-OF-SELECTION.
    IF ONE = '&IC1'.
      CASE one.
        WHEN '1 ::'.
          CALL TRANSACTION 'MB5L' AND SKIP FIRST SCREEN.
        WHEN '2 ::'.
          CALL TRANSACTION 'ZSOD'.
      ENDCASE.
    ENDIF.
    IF TWO = '&IC1'.
      CASE two.
        WHEN '1 ::'.
          CALL TRANSACTION 'MB52' AND SKIP FIRST SCREEN.
        WHEN '2 ::'.
          CALL TRANSACTION 'ZSOD'.
      ENDCASE.
    ENDIF.

    Hi Now try this one,.
    *TYPE POOLS DECLARATIONS
    TYPE-POOLS: vrm.
    TABLES: sscrfields.
    *SELECTION SCREEN FIELDS *
    DATA: c(20) TYPE c.
    **********SELECTION-SCREENS*********************
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-tt1.
    PARAMETERS: one(20) AS LISTBOX VISIBLE LENGTH 40.
    PARAMETERS: two(20) AS LISTBOX VISIBLE LENGTH 40.
    ADD Afer 40 to show text "DEFAULT 'PLEASE SELECT'"
    SELECTION-SCREEN SKIP. SELECTION-SCREEN END OF BLOCK blk1.
    ********DROP DOWN SELECTION WITH DESCP*****************
    AT SELECTION-SCREEN OUTPUT.
      PERFORM one.
      PERFORM two.
    *& Form ONE
    text ----------------------------------------------------------------------
    FORM one.
      DATA: name TYPE vrm_id,
            list TYPE vrm_values,
            value LIKE LINE OF list.
      name = 'ONE'.
      value-key = '1'.
      value-text = 'Stock Report'.
      APPEND value TO list.
      CLEAR value.
      value-key = '2'.
      value-text = 'Open Sales Order Report'.
      APPEND value TO list.
      CLEAR value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM. "ONE
    *& Form TWO
    text ----------------------------------------------------------------------
    FORM two.
      DATA: name TYPE vrm_id,
            list TYPE vrm_values,
            value LIKE LINE OF list.
      name = 'TWO'.
      value-key = '1'.
      value-text = 'AS Stock Report'.
      APPEND value TO list.
      CLEAR value.
      value-key = '2'.
      value-text = 'AS Open Sales Order Report'.
      APPEND value TO list.
      CLEAR value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.      "TWO
    **********LINKS TO ABOVE SELECTION*********************
    START-OF-SELECTION.
      CASE one.
        WHEN '1'.
          CALL TRANSACTION 'MB5L'AND SKIP FIRST SCREEN.
        WHEN '2'.
          CALL TRANSACTION 'MM01'.
      ENDCASE.
      CASE two.
        WHEN '1'.
          CALL TRANSACTION 'MB52' AND SKIP FIRST SCREEN.
        WHEN '2'.
          CALL TRANSACTION 'MM01'.
      ENDCASE.
    Give the 1:: as 1 and 2:: as 2 it will work...
    Regards,
    Bharani
    Edited by: SeethaRamaiah Bharani on Dec 18, 2009 8:10 PM

  • From ALV output list to selection screen

    Hi,
    I created one ALV report.
    After executing the program, it displays an ALV list.
    When I click on the back/exit/cancel buttons on the screen, it should take me to the selection screen.
    But that is not happening. it is taking to one screen which shows the report heading. IF i click back/cancel/exit buttons in this screen, it is taking me to the selection screen.
    I checked the program for any write statement, but therre are no write statements.
    Even i tried to remove the end-of-selection event in the program. but not working.
    Can any one help me on this how to overcome this issue.
    Thank you.
    Kumar

    hi check this example...
    REPORT zalv_sel_screen .TABLES: mara.DATA: BEGIN OF i_alv OCCURS 0,
          matnr TYPE mara-matnr,
          mtart TYPE mara-mtart,
          matkl TYPE mara-matkl,
          groes TYPE mara-groes,
          maktx TYPE makt-maktx,
          END OF i_alv.DATA: alv_container  TYPE REF TO cl_gui_docking_container.
    DATA: alv_grid       TYPE REF TO cl_gui_alv_grid.
    DATA: layout    TYPE lvc_s_layo.
    DATA: fieldcat  TYPE lvc_t_fcat.PARAMETERS: p_check.INITIALIZATION.  PERFORM get_data.AT SELECTION-SCREEN OUTPUT.  DATA: variant TYPE  disvariant.
      DATA: repid TYPE sy-repid.  repid = sy-repid.  variant-report = sy-repid.
      variant-username = sy-uname.  layout-zebra = 'X'.
      layout-edit_mode = 'X'.  CHECK alv_container IS INITIAL.  CREATE OBJECT alv_container
                  EXPORTING repid     = repid
                            dynnr     = sy-dynnr
                            side      = alv_container->dock_at_left
                            extension = 1500.  CREATE OBJECT alv_grid
             EXPORTING
                   i_parent          =  alv_container.*  ALV Specific. Data selection.
    Populate Field Catalog
      PERFORM get_fieldcatalog.  CALL METHOD alv_grid->set_table_for_first_display
        EXPORTING
          is_layout        = layout
          is_variant       = variant
          i_save           = 'U'
          i_structure_name = 'I_ALV'
        CHANGING
          it_outtab        = i_alv[]
          it_fieldcatalog  = fieldcat[].
    START-OF-SELECTION.
    FORM GET_DATA
    FORM get_data.  SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
            FROM mara
              INNER JOIN makt
                ON maramatnr = maktmatnr
                       UP TO 100 ROWS
                   WHERE makt~spras = sy-langu.  SORT i_alv ASCENDING BY matnr.ENDFORM.                    "get_data***************************************************************
         Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM get_fieldcatalog.  DATA: ls_fcat TYPE lvc_s_fcat.
      REFRESH: fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Number'.
      ls_fcat-fieldname  = 'MATNR'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '18'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '1'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Type'.
      ls_fcat-fieldname  = 'MTART'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '10'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '2'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Group'.
      ls_fcat-fieldname  = 'MATKL'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '12'.
      ls_fcat-col_pos    = '3'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Size'.
      ls_fcat-fieldname  = 'GROES'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '30'.  ls_fcat-col_pos    = '4'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Description'.
      ls_fcat-fieldname  = 'MAKTX'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '40'.  ls_fcat-col_pos    = '5'.
      APPEND ls_fcat TO fieldcat.ENDFORM.                    "get_fieldcatalog
    regards,
    venkat

Maybe you are looking for

  • HP Designjet 130nr driver.

    Hey! Where are we supposed to get the driver for my HP Designjet 130nr!? HP doesn't have one as the new OS X is supposed to have the drivers already built in. But nooooooooo it is not in the driver set. Now I have a printer that is unrecognized. Any

  • SAP ECC 60 IDES installation - start instance issue

    Hi,    SAP installation when starting the instance fails with the following error. I couldn't find more information. Are there any other logs/traces associated with it?OR have any one seen this error in the past. I searched oss notes and forums, but

  • Where is my Roboform toolbar?

    my Roboform toolbar disappeared using version 20 of firefox. just updated to version 22 and still no roboform toolbar showing in View toolbars... but of course it works fine in Internet Explorer, which I don't want to use -- so fix it please.

  • Eprint does not work with 5510 D

    I have tried several email addresses to associate with my 5510 D  but the e-print feature does not work with any of them

  • Magic Mouse won't work in Windows 7 anymore

    Hey there, I've got an iMac running OS X 10.6.8 and Windows 7 via Boot Camp. I just updated a bunch of the Apple stuff on Windows -- iTunes, Quicktime, "boot camp" (I assume that meant drivers and such), and whatnot. Now my Magic Mouse won't work in