Variant in ALV selection screen

Hi friends,
     How to protect a variant in ALV selection screen from changing or deleting by other users.
Thanks,
Rajesh

Rajesh,
You still need someone to be able to change the variant, right? That is what exactly PROTECT VARIANT does.
If you select the field Protect variant, the variant can only be changed by the person who created it or last changed it.                         
Regards,
Ravi
Note :Please mark the helpful answers  and close the thread if the quesiton is answered

Similar Messages

  • Show the drop down list of variant on the selection screen in ALV reports

    Hi,
    i have a alv report when i execute this display will come and then i click display layout it save as a variant on the selection screen and when i go back to selection screen and press f4 on the display variant its show the drop down list of varient.
    can u send me some code for this functionality...its very urgent.
    thanks!
    Vipin

    Hi,
    try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
    START HERE
    PARAMETERS: pa_vari TYPE disvariant-variant.
    INITIALIZATION.
      g_repid = sy-repid.
      CLEAR e_variant.
      e_variant-report   = sy-cprog.
      e_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = 'A'
        CHANGING
          cs_variant = e_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        pa_vari = e_variant-variant.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
      PERFORM alv_variant_f4 CHANGING pa_vari.
    *&      Form  ALV_VARIANT_F4
    FORM alv_variant_f4 CHANGING pa_vari.
      DATA: l_exit(1) TYPE c.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant       = e_variant
          i_tabname_header = 'ANYTHING'
          i_save           = 'A'
        IMPORTING
          e_exit           = l_exit
          es_variant       = e_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 = space.
          pa_vari = e_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                               " ALV_VARIANT_F4
    END
    Hope iy helps!
    Alfonso

  • Variants on tabbed selection screen for ALV reports

    Scenario: We use a tabbed selection screen for an ALV report. We create a variant, make a selection field on the second tab mandatory & save it without a value. When we run the report with the saved variant it does not check that the required field on the second tab is populated before it executes.
    Question: How can I code such a check?
    Edited by: Alridge Tom on Jul 4, 2008 3:43 PM

    Hi,
    try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
    START HERE
    PARAMETERS: pa_vari TYPE disvariant-variant.
    INITIALIZATION.
      g_repid = sy-repid.
      CLEAR e_variant.
      e_variant-report   = sy-cprog.
      e_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = 'A'
        CHANGING
          cs_variant = e_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        pa_vari = e_variant-variant.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
      PERFORM alv_variant_f4 CHANGING pa_vari.
    *&      Form  ALV_VARIANT_F4
    FORM alv_variant_f4 CHANGING pa_vari.
      DATA: l_exit(1) TYPE c.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant       = e_variant
          i_tabname_header = 'ANYTHING'
          i_save           = 'A'
        IMPORTING
          e_exit           = l_exit
          es_variant       = e_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 = space.
          pa_vari = e_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                               " ALV_VARIANT_F4
    END
    Hope iy helps!
    Alfonso

  • How to create a variant for  a selection screen  button

    hi ,
          i have  created a selection screen for a normal report .   
    In the selection screen  there is one button after the selct option for company code. when user enters some company code and  presses the button the user i call a able contraol in which user gives some additional values for the comapny code.
    how  do i create variant.  when i create  varaint  for the slection screen  it does  not take into account the  other screen i called .
    so every time user has to click that button and enter some values and execute. please suggest  some way.
    THANKX IN ADAVANCE:)

    Hi,
          Inorder to create a variant for selection screen report, you need to enter valid data on the screen and click on the SAVE button which is available in the Menu.
          And regarding the button you were asking about after select option, it is not created manually it comes automatically,, you can remove this by mentioning no-extension after the select-option. You can get clear information of this if you do F1 help on select-option.
    My advice to you, make effect use of F1 help.
    Edited by: Madhuri on Sep 23, 2008 4:46 PM

  • Screen Text in ALV selection screen

    A user has asked me to add some text at the bottom of a selection screen in an ALV report program. In se80 I double clicked the screen (1000) and then went into the layout and added a text field with some text in it. The system then requested a transport and added a LIMU DYNP screen object to it. The only other object in the transport is the Report Source Code.
    When I run the transport to another system the new text fields disappear from the screen object although double clicking the screen object in the transport shows they are there.
    Any ideas why they disappear??

    I have tried selection-screen comment but there appears to be a limit to the size of the text string (83) and this is not long enough for our purpose as the next needs to go right accross the page. Thanks for replying.

  • Check box in ALV selection screen

    Hi to all
              I like to know how to create a checkbox in the input screen of an ALV.

    What do you mean by ALV check box selection screen?
    ALV and selection screen check box( you are mixing two cases in your Question).
    You need use the Function moduel in the user command to get the updated data.
    in fieldcatalog you have to use INPUT = 'X' and EDIT = 'X' for the columns which ever you want edit.
    GET_GLOBALS_FROM_SLVC_FULLSCR
    follow the sample code.
    REPORT ZTEST_ALV_CHECK MESSAGE-ID ZZ .
    TYPE-POOLS: SLIS.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    L_LAYOUT TYPE SLIS_LAYOUT_ALV,
    X_EVENTS TYPE SLIS_ALV_EVENT,
    IT_EVENTS TYPE SLIS_T_EVENT.
    DATA: BEGIN OF ITAB OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    CHK(1),
    color(4),
    END OF ITAB.
    SELECT VBELN
    POSNR
    FROM VBAP
    UP TO 20 ROWS
    INTO TABLE ITAB.
    X_FIELDCAT-FIELDNAME = 'CHK'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 1.
    X_FIELDCAT-INPUT = 'X'.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-CHECKBOX = 'X'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-SELTEXT_L = 'VBELN'.
    X_FIELDCAT-HOTSPOT = 'X'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 2.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-SELTEXT_L = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 3.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_LAYOUT-info_fieldname = 'COLOR'.
    *L_LAYOUT-ZEBRA = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = L_LAYOUT
    I_CALLBACK_PF_STATUS_SET = 'STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    IT_FIELDCAT = IT_FIELDCAT
    TABLES
    T_OUTTAB = ITAB
    EXCEPTIONS
    PROGRAM_ERROR = 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.
    *& Form STATUS
    text
    -->P_EXTAB text
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
    Pf status
    SET PF-STATUS 'STATUS'.
    ENDFORM. " STATUS
    *& Form USER_COMMAND
    text
    -->R_UCOMM text
    -->RS_SELFIELD text
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    DATA: GD_REPID LIKE SY-REPID, "Exists
    REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
    IF REF_GRID IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    E_GRID = REF_GRID.
    ENDIF.
    IF NOT REF_GRID IS INITIAL.
    CALL METHOD REF_GRID->CHECK_CHANGED_DATA .
    ENDIF.
    loop at itab where chk = 'X'.
    itab-color = 'C300'.
    modify itab index sy-tabix transporting color.
    endloop.
    RS_SELFIELD-refresh = 'X'.
    break-point.
    ENDFORM. "USER_COMMAND
    Regards
    Vijay Babu Dudla

  • To create a variant for a selection screen having invisible fields

    Hello All
    I am facing a peculiar problem. I have a screen for the program RSEIDOCB in which the following fields are hidden:
                    TAOUTPR FOR EDIDC-STATUS NO-DISPLAY,
                    STAINPR  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTRS FOR EDIDC-STATUS NO-DISPLAY,
                    STAINTA  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTES FOR EDIDC-STATUS NO-DISPLAY,
                    STAINTD  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTST FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTDT FOR EDIDC-STATUS NO-DISPLAY,
                    STAINBK  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTEI FOR EDIDC-STATUS NO-DISPLAY,
                    STAINEI  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTEX FOR EDIDC-STATUS NO-DISPLAY,
                    STAINEA  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTDS FOR EDIDC-STATUS NO-DISPLAY,
                    STAINDS  FOR EDIDC-STATUS NO-DISPLAY.
    I want to create a variant for the above program having values for the fields. These fields are basically for specifying the various status of the idocs. I am unable to do to so at the moment. Please help me out. Suitable points will be provided.
    Regards
    Ankit

    Hi Ankit
    Follow these steps..
    1. in SE38 enter Program name 'RSEIDOCB'.
    2. Click on variants button
    3. enter variant name click on create
    4. in selection screen enter default values
    5. Click on attributes
    4. Enter meaning
    5. Press Shft + F4
    6. Bottom of Screen will popup invisible fields
    7. go down to screen
    8. select field and click on selection variables button
       (you to have to tick selection variable check box)
    9. here click on down arrow button very next to field
    10.you can choose values from list and assign to field.
    then save variant.
    Message was edited by:
            Perez C

  • Dynamic variant calling multiple selection screens

    Hi all,
    The concerned issue is that i am trying to execute a report( which on execution throws a selection screen) from a program using 'submit' statement passing a variant. along with it iam creating a dynamic varinat using FM RS_CREATE_VARIANT, the variant is being made, but on execution , the program throws an error meassage " invalid variant called'.
    This is because the varinat is calling multiple  screens , although only one screen number is passed in teh FM,( screen no 0170).
    Please tell me the possible solution fr this .
    Cheers,
    Thanks in advance.

    Hi,
    first try to pass only the static variant with the submit statement and c whether its working properly.
    and than check for dynamic variant..
    c the difference and let me know what happens ??
    thanks
    ravi aswani

  • Variants for AT SELECTION-SCREEN..

    how many variants r there for AT SELECTION-SCREEN event???
    like AT SELECTION-SCREEN OUTPUT
          AT SELECTION SCREEN ON FIELD
    howmany r thr??
    and can any1 explain the usage of these completely wid examples??
    regards
    ziden

    Hi,
    Sorry. I think You wanted the events.
    At Selection-screen output. This will firs, just before all the fields are displayed on the screen. For eg: you have something like:
    selecttion-screen: begin of blk1.
    parameters: p_name(20).
    select-options: s_bukrs for t001-bukrs.
    selection-screen: end of blk1.
    at selection-screen output.
    if sy-uname = 'ABS'.
      p_name = 'MANAGER'.
    If you have specified a select-options and you want to validate it, use
    at selection-screen on s_bukrs-low.
      select single bukrs into s_bukrs-low from t001.
    Similarly, there is at selection-screen on value request for (fld-name).
    at selection-screen on help request for (fld_name).
    regards
    Subramanian

  • ALV selection screen

    Hi,
    Iam new to A.L.V and have few queries.please tell me the coding for the below.
    At selection screen:
    Process the following validations for selection screen fields and display the appropriate error messages.
    1.     Validate  the Date From (SAP Transaction Date ) against VEKP –Created-On Date .
    2.     Validate  the Date From (SAP Transaction Date ) against VEKP –Created-On Date .
    3.     Validate the Plant From (Transaction Source Location ) against VEKP – Shipping Point.
    4.     Validate the Plant To (Transaction Destination Location ) against VEKP – Shipping Point.
    5.     Validate the Pallet ID against VEKP – Handling Unit.
    6.      If Date From field is blank, display an appropriate error message.
    7.     If Plant From field is blank, display an appropriate error message.
    Kindly send me the coding for this.
    Regards,
    Tanya

    Hi,
    the code is  :
    *For VEKP-Created-on-date :
    AT SELECTION-SCREEN ON s_erdat.
      IF NOT s_erdat[] IS INITIAL.
        SELECT erdat FROM VEKP    INTO VEKP-ERDAT
                      WHERE ERDAT IN s_erdat.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE 'Enter a valid created date' Type E.
        ENDIF.
    Else ( for question 6& 7)
    MESSAGE 'Enter a date in the Date From field' Type E.
      ENDIF.
    from 1 to 2, the above was the code.. and from 3 to 5 - the else paart is not requried..

  • Variants on the selection screen?

    How can we provide the select-options for Variants in the code which will
    1)Take the values of Variants for the standard programs in the printout/data medium tab of F110 payment transaction.
    2)BDC will take the values into the F110 transaction and populate automatically.
    NOTE:Number of the standard programs will change with the payment method entered.

    This object S_ALV_LAYOgoverns the way ALV layouts are saved.
    For more info see the OSS Note 601803.
    Hope This Helps
    Anand Raj

  • Alv selection screen issue.

    Hi,
       In my requirement i want to disable the screen field based on condition.
    in input screen..
    posting date------------select option
    period------------------paramter
    if user enters posting date means want to validate period or throw error message.(not allowed to enter period) and vice versa.
    am having no radio button.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 EQ 'ASD'.
    IF mbudat IS not INITIAL.
    SCREEN-INPUT = '1'.
    ELSE.
    SCREEN-INPUT = '0'.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    but it is not working.................Any one can suggest????/

    Please don't repost the same question after having the previous rejected by a moderator.
    This is relatively basic ABAP - please search and/or use help.sap.com.
    <Thread locked>

  • Regarding ALV selection screen

    hi all,
    my issue:
    i have an alv report which has almost 10 paramters based on which the internal table will be populated. the two parameters are mandatory .. 4 are select options and 4 are radiobuttons. i think this will lead to a lot of select queries.
    i was wondering if there is any way we can minimize the no. of select query.
    also would like to know if ranges table can work in such a scenario.
    9 fields are from table pLAF and two are from MARA and MKAL respectively
    please advice.
    thanks in advance
    Srinivas

    Hi,
    For select-options,You dont have to check whether that field is initial or not.So For 4 select-options, u can use one select query.2 parameter field is also mandatory so you dont have to check those 2 field is intial or not.U got to put 4 if condition for 4 radio buttons.
    Eg:
    If rd_1 = 'X'.
    select field1 field1 from <table1> into table where field1 = p_param1
            and field2 = p_param2
    and field3 in s_selop1
    and field4 in s_selop2
    and field5 in s_selop3
    and field6 in s_selop4.
    elseif rd_2 = 'X'.
    select field1 field1 from <table2> into table where field1 = p_param1
            and field2 = p_param2
    and field3 in s_selop1
    and field4 in s_selop2
    and field5 in s_selop3
    and field6 in s_selop4.
    elseif rd_3 = 'X'.
    select field1 field1 from <table3> into table where field1 = p_param1
            and field2 = p_param2
    and field3 in s_selop1
    and field4 in s_selop2
    and field5 in s_selop3
    and field6 in s_selop4.
    elseif rd_4 = 'X'.
    select field1 field1 from <table4> into table where field1 = p_param1
            and field2 = p_param2
    and field3 in s_selop1
    and field4 in s_selop2
    and field5 in s_selop3
    and field6 in s_selop4.
    endif.

  • Change Layout in Selection Screen for OO ALV-Grid

    Hello everyone,
    I got a problem regarding layouts for objectoriented ALV Grid. I want to make it possible that user can take the layout for ALV he wants to on the selection screen. So far thats no problem and it works. But there are some little problems which I do not know how to fix them. But first the facts:
    (1) I got my parameter for layout
    PARAMETER: p_vari  TYPE disvariant-variant.
    (2) I fill my global layout structure in initialization
    INITIALIZATION.
    * Variante vorbelegen
       gs_variant-username = sy-uname.
       gs_variant-report   = sy-repid.
    * Layout holen
       CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
         EXPORTING
           i_save        = 'A'
         CHANGING
           cs_variant    = gs_variant
         EXCEPTIONS
           wrong_input   = 1
           not_found     = 2
           program_error = 3
           OTHERS        = 4.
       IF sy-subrc = 0.
         p_vari = gs_variant-variant.
       ENDIF.
    (3) I got my handling for F4-value help on variant parameter
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
       CALL FUNCTION 'LVC_VARIANT_F4'
         EXPORTING
           is_variant    = gs_variant
           i_save        = 'A'
         IMPORTING
           es_variant    = gs_variant
         EXCEPTIONS
           not_found     = 1
           program_error = 2
           OTHERS        = 3.
       IF sy-subrc <> 0.
         MESSAGE text-m01 TYPE 'S'.
       ELSE.
         p_vari = gs_variant-variant.
       ENDIF.
    (4) I give back my parameters content into the variant structure at start of selection
    START-OF-SELECTION.
       gs_variant-username = sy-uname.
       gs_variant-report   = sy-repid.
       gs_variant-variant  = p_vari.
    This works all fine but I got some problems when using default variants/layouts. For example I got a default variant only for me. When starting the selection screen it works fine that the default layout was written. It is displayed automatically in the variant parameter. But I want that if i I empty the content (blank it out) from my variant parameter, that report should start with "normal" layout how it was written in the report and NOT with default layout.
    When I clear the gs_variant it works like I want it, but then the alv layout button looks like (without functions for layout), because I do not have the reference to my report.
    So what to do? :-)
    Regards
    Michael

    Wow that was fast, works great, thanks :-)
    I did not use this parameter in set table method but now I fill it dynamically.
    Ok next problem, one step harder ;-)
    Now I have one selection screen for one ALV-Grid, but four radio buttons which control with which data the ALV gets filled (four different fieldcats, data tables and so on). Each Grid got an own HANDLE so that the layouts can be separated in four categories.
    Now I want that by changing the radio button the individual standard layout for the chosen alv grid is getting filled.
    This works fine when using it in selection screen output.
    AT SELECTION-SCREEN OUTPUT.
       CLEAR gs_variant.
    * Layout-Handles individuell für Klausel-Radiobuttons setzen
       IF     p_py IS NOT INITIAL.
         gs_variant-username = sy-uname.
         gs_variant-report   = sy-repid.
         gs_variant-handle   = 'KLPY'.
       ELSEIF p_rh IS NOT INITIAL.
         gs_variant-username = sy-uname.
         gs_variant-report   = sy-repid.
         gs_variant-handle   = 'KLRH'.
       ELSEIF p_aj IS NOT INITIAL.
         gs_variant-username = sy-uname.
         gs_variant-report   = sy-repid.
         gs_variant-handle   = 'KLAJ'.
       ELSEIF p_sr IS NOT INITIAL.
         gs_variant-username = sy-uname.
         gs_variant-report   = sy-repid.
         gs_variant-handle   = 'KLSR'.
       ENDIF.
    * Layout holen
       CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
         EXPORTING
           i_save        = 'A'
         CHANGING
           cs_variant    = gs_variant
         EXCEPTIONS
           wrong_input   = 1
           not_found     = 2
           program_error = 3
           OTHERS        = 4.
       IF sy-subrc = 0.
         p_vari = gs_variant-variant.
       ELSE.
         CLEAR p_vari.
       ENDIF.
    But unfortunately selection screen output is getting passed by EACH changing in the selection screen. This means when I try to clear the default layout in my parameter field, it gets refilled automatically with default layout. If I do a condition around the filling (only if not initial) the default value filling does not work fine in every case, e.g. when clearing the parameters field and then change the radiobutton -> then it does not get filled automatically.

  • ALV Layout on selection screen?

    Is it possible to offer the ALV Layouts on the selection screen? And how can i pass such a variant to the reuse-FM?

    Hi,
    Yes u can do it.Check this sample code
    Variant for ALV display
    SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE text-000.
    <b>PARAMETERS: p_varnt LIKE disvariant-variant.</b>
    DATA:      w_save(1) TYPE c,
                w_default(1) TYPE c,
                i_variant LIKE disvariant,
                i_variant1 LIKE disvariant.
    INITIALIZATION.
      i_variant-report = w_repid.
      i_variant1 = i_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save     = w_save
           CHANGING
                cs_variant = i_variant1
           EXCEPTIONS
                not_found  = 2.
      IF sy-subrc = 0.
        p_varnt = i_variant1-variant.
      ENDIF.
    Process on value request (list of possible variants)
    <b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varnt.</b>
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant          = i_variant
                i_save              = w_save
              it_default_fieldcat =
           IMPORTING
                e_exit              = w_exit
                es_variant          = i_variant1
           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 w_exit = space.
          p_varnt = i_variant1-variant.
        ENDIF.
      ENDIF.
    <b>AT SELECTION-SCREEN.</b>
       IF NOT p_varnt IS INITIAL.
        MOVE i_variant TO i_variant1.
        MOVE p_varnt TO i_variant1-variant.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
             EXPORTING
                  i_save     = w_save
             CHANGING
                  cs_variant = i_variant1.
        i_variant = i_variant1.
      ELSE.
        PERFORM variant_init.
      ENDIF.
    START_OF_SELECTION.
    Call ABAP/4 List Viewer
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            I_INTERFACE_CHECK           = ' '
               i_callback_program          =  w_repid
            I_CALLBACK_PF_STATUS_SET    = ' '
            I_CALLBACK_USER_COMMAND     = ' '
            I_CALLBACK_TOP_OF_PAGE      = ' '
            I_CALLBACK_HTML_TOP_OF_PAGE = ' '
            I_CALLBACK_HTML_END_OF_LIST = ' '
               i_structure_name            = 'SFLIGHT'
               i_background_id         = 'ALV_BACKGROUND'
            I_GRID_TITLE                =
            I_GRID_SETTINGS             =
               is_layout                   = i_layout
               it_fieldcat                 = i_fieldcat[]
            IT_EXCLUDING                =
               it_special_groups           = i_sp_group[]
               it_sort                     = i_sort[]
            IT_FILTER                   =
            IS_SEL_HIDE                 =
            I_DEFAULT                   = 'X'
               i_save                      = w_save
              <b> is_variant                  = i_variant</b>
               it_events                   = i_events[]
            IT_EVENT_EXIT               =
               is_print                    = i_print
            IS_REPREP_ID                =
            I_SCREEN_START_COLUMN       = 0
            I_SCREEN_START_LINE         = 0
            I_SCREEN_END_COLUMN         = 0
            I_SCREEN_END_LINE           = 0
       IMPORTING
            E_EXIT_CAUSED_BY_CALLER     =
            ES_EXIT_CAUSED_BY_USER      =
           TABLES
                t_outtab                    = i_sflight
          EXCEPTIONS
              program_error               = 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.
    Hope u understood.
    Thanks&Regards,
    Ruthra.

Maybe you are looking for

  • ALBPM Enterprise SA 5.7 MP3 and Weblogic Express 9.2

    We are using ALBPM Enterprise SA 5.7 MP3 and Weblogic Express 9.2. We have the following questions: 1) Why, after assigning a Parametric Role to an user, we have to restart the portal in Weblogic before the user can log back into the system? When we

  • PSA Source System Update Utility

    Hi,   We recently upgraded our Sand box system to EPH1 SPS5. The PSA Deletion Process type now includes a 'Source System' field. Since our system was refreshed from Production prior to upgrade, the Source System Field in the PSA Deletion Process Type

  • Will Photoshop 13 support camera raw for Nikon D 810?

    Will Photoshop Elements 13 support camera raw for Nikon D810?

  • I lost all my emails

    I tried to move the emails from one file onto a file on my desk top using Export. Now ALL email folders are empty, and when I go to the desk top file and try to reverse it, nothing happens. Where did all my email go and how can I reinstate it where i

  • Will photoshop elements 7 operate on Windows 7 or 8?

    Will photoshop elements 7 operate on Windows 7 and windows 8?