Assignment of variant to selection screen

hi
   We have some variants in a program out of which only some of them have entries in table VARIS, rest of them are there in VARID. I need to know how the entries in table VARIS appears for a particualr variant.
Appreciate your help.
Thanks.

If I remember the values will be stored in RAW format.. there are couple of FM's which will convert that RAW to undestandable format.

Similar Messages

  • Assign characteristics to report selection screen in COPA

    Hi all,
    it seems there are 2 ways to assign characteristics to a selection screen of a COPA report:
    1. Go to the form, KE35, double click on a column header and assign characteristics here and check the flag for entering variables. It seems I have to do that for all headers?
    2. Goto KE30 - change the report and assign characteristics here and check the flag for entering variables.
    What is the difference between those two ways? Where do I need to assign my characteristics? I seem in the 1 option I'd have to do it for all headers?
    Thanks
    Anne

    Hello
    Create some authourization checks for the user. Try to check with BASIS team.
    Also check if you can default entries for a particular user.
    reg

  • Adding layout variant to selection screen

    Hi all,
             Currently I am working on report program, where I have to allow user to select his own output pattern. i.e layout variant is to be added to selection screen. The report uses object oriented ALV for display purpose. [set_table_for_first_display]
    I made following steps,
    1.     Declared one parameter of type disvariant.
    2.     At selection-screen on value-request I called function REUSE_ALV_VARIANT_F4.
    3.     Passed internal table to method set_table_for_first_display.
    Now I am able to create save new variant, on selection screen I can select the variant that I have created, but output shows the all the fields though
    Only few are selected. Please tell me any modification so as to reflect the changes in output.
    I  am searching for a function which maintains fieldcat according to user defined variant.
    Regards,
    Nilesh kulkarni.

    U have to use REUSE_ALV_VARIANT_EXISTENCE inorder to use the layout u have selected
    After ur code of REUSE_ALV_VARIANT_F4.
    try this way
    AT SELECTION-SCREEN.
       PERFORM PAI_OF_SELECTION_SCREEN.
    G_REPID = SY-REPID.
    G_SAVE = 'A'.
    FORM PAI_OF_SELECTION_SCREEN .
      IF NOT P_LAYOUT IS INITIAL.
        MOVE G_VARIANT TO GX_VARIANT.
        MOVE P_LAYOUT TO GX_VARIANT-VARIANT.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
             EXPORTING
                  I_SAVE     = G_SAVE
             CHANGING
                  CS_VARIANT = GX_VARIANT.
        G_VARIANT = GX_VARIANT.
      ELSE.
        PERFORM VARIANT_INIT.
      ENDIF.
    ENDFORM.                    " PAI_OF_SELECTION_SCREEN
    FORM variant_init .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = G_REPID.
    ENDFORM.                    " variant_init
    Then when u call ALV for display, pass ur display variant, in this case  = g_variant
    Reward if useful
    Cheers
    ~Arun
    Message was edited by:
            Arun Shekhar

  • How to set Variant as selection-screen

    I have a variant i want to set that variant as selection-screen can anyone please tell me how to do that

    Hi Pradeep,
    What is your requirement?
    If you just want to create the variant for the selection screeen, then after entering the values on selection screen just press SAVE button.
    Regards,
    Atish

  • Dinamic variant for selection screen

    Hi,
    I got a requirement where i need  a Dynamic variant for selection screen .There is a date field in the selection screen i want to create  a variant such that when i choose it,it should give the current day date in selection screen.can anyone help me.
    Regards,
    Ravi

    Hi,
    Using Customer Exit code you can give it.
    Create a Customer Exit Variable and write simple code in CMOD. See the usefull Exit code for reports in the following url.
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    WHEN 'ZV_DAT'.
        IF i_step = 1 .
          CLEAR l_s_range.
          l_s_range-low = sy-datum.
          l_s_range-opt = 'EQ'.
          l_s_range-sign = 'I'.
          APPEND l_s_range TO e_t_range.
        ENDIF.
    Thanks
    Reddy

  • How to create variant for selection screen which is in subscreen

    Hi,
    How to create variant for selection screen which is in subscreen in a module pool program?
    it is very urgent.
    Thanks in advance.

    Hi,
    You can create the 'Parameter Transaction' so that whenever you run the particular transaction it will run with the initial value given when the Tcode was created and hence you can skip the initial screen of the module pool program.
    To create Parameter transaction from SE93 you have to choose the last option i.e Parameter Transaction.
    Regards
    Sudheer

  • How to set default variant for selection screen

    Hi,
    I want to make one variant as default for selection screen for one user.
    For eg., take COOIS. For the selection screen, i have 3 variants. But i want one variant to be default. Thsi is not for all users. Thsi is for particular user.
    I am not seeing any way to do this. please help me..
    Thanks
    Srini

    Hi,
    If you are using Z program then you can ask your developer to get Variant name Runtime from Parameter ID.
    This means you decide a Parameter ID name : ZVAR in your Z program and ask your developer to load variant each time your Z program loads.
    Now, second step will be using SU01 transaction you can set value of ZVAR in Parameters tab for the user. This value will be the variant which you created for this user.
    This will solve your problem and you can make n number of variants and assign it to different users.
    Regards,
    Arpit

  • Layout variants in Selection screen

    Hi All,
        I have a requirement where i need to create a functinal key on selection screen'Disp Variant' and i need to provide F4 help when user click on button and when layout is selected the report should show the layout according to selected layout variant.
    I have written following code but it is not workin for me.Please help.
    initialisation.
        wa_functxt-icon_id   =  icon_variants.
        wa_functxt-quickinfo = 'CHOOSE'.
        wa_functxt-icon_text = 'DISP VAR'.
        sscrfields-functxt_01 = wa_functxt.
    wa_functxt of type smp_dyntxt and sscrfields have been declared at top.
    CLEAR: wa_variant2.
      wa_variant2-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = ' '
        CHANGING
          cs_variant = wa_variant2
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc EQ 0.
        PERFORM f_select_alv_variant.
      ENDIF.
    even this is in initialisation.
    form F_SELECT_ALV_VARIANT .
      MOVE sy-repid TO wa_variant1-report.
      CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
        EXPORTING
          i_dialog            = space
          i_user_specific     = 'X'
          i_default           = space
          it_default_fieldcat = i_fieldcat[]
          i_layout            = wa_layout
        IMPORTING
          et_fieldcat         = i_fieldcat[]
        CHANGING
          cs_variant          = wa_variant2
        EXCEPTIONS
          wrong_input         = 1
          fc_not_complete     = 2
          not_found           = 3
          program_error       = 4
          OTHERS              = 5.
      IF sy-subrc EQ 0.
        "Do nothing.
      ENDIF.
    endform.  
    AT SELECTION-SCREEN.
    CASE sscrfields-ucomm.
    *When Display Variant button is clicked
        WHEN c_fc01.
          PERFORM f_f4_for_variant.
        WHEN OTHERS.
      ENDCASE.
    form F_F4_FOR_VARIANT .
      CLEAR: wa_variant1,
             wa_variant2.
      wa_variant1-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = wa_variant1
          i_save     = 'U'
        IMPORTING
          e_exit     = v_variant_exit
          es_variant = wa_variant2.
      PERFORM f_select_alv_variant.
      IF v_variant_exit EQ 'X'..
        PERFORM f_get_default_variant.
      ENDIF.
    endform.
    Thanks in Advance,
    Anjana

    Let's discuss based on something. On that program, I don't have any issue, check it.
    INCLUDE <icon>.
    TABLES sscrfields.
    DATA wa_variant1 TYPE disvariant.
    DATA wa_variant2 TYPE disvariant.
    SELECTION-SCREEN FUNCTION KEY 1.
    PARAMETERS dummy.
    INITIALIZATION.
      DATA wa_functxt TYPE smp_dyntxt.
      wa_functxt-icon_id = icon_variants.
      wa_functxt-quickinfo = 'CHOOSE'.
      wa_functxt-icon_text = 'DISP VAR'.
      sscrfields-functxt_01 = wa_functxt.
      PERFORM f_get_default_variant.
    FORM f_get_default_variant.
      CLEAR: wa_variant2.
      wa_variant2-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = ' '
        CHANGING
          cs_variant = wa_variant2
        EXCEPTIONS
          not_found  = 2.
    ENDFORM.                    "f_get_default_variant
    AT SELECTION-SCREEN.
      PERFORM at_selection_screen.
    *&      Form  at_selection_screen
    *       text
    FORM at_selection_screen.
      CASE sscrfields-ucomm.
    *When Display Variant button is clicked
        WHEN 'FC01'.
          PERFORM f_f4_for_variant.
        WHEN 'ONLI'.
          DATA gt_output TYPE TABLE OF t000 WITH HEADER LINE.
          SELECT * FROM t000 INTO TABLE gt_output.
          DATA lo_table TYPE REF TO cl_salv_table.
          TRY.
              CALL METHOD cl_salv_table=>factory
                IMPORTING
                  r_salv_table = lo_table
                CHANGING
                  t_table      = gt_output[].
            CATCH cx_salv_msg.
          ENDTRY.
          DATA lo_layout TYPE REF TO cl_salv_layout.
          lo_layout = lo_table->get_layout( ).
          lo_layout->set_save_restriction( cl_salv_layout=>restrict_none ).
          DATA ls_layout_key TYPE salv_s_layout_key.
          ls_layout_key-report = sy-repid.
          lo_layout->set_key( ls_layout_key ).
          DATA l_variant TYPE slis_vari.
          l_variant = wa_variant2-variant.
          lo_layout->set_initial_layout( l_variant ).
          DATA lo_functions_list TYPE REF TO cl_salv_functions_list.
          lo_functions_list = lo_table->get_functions( ).
          lo_functions_list->set_all( ).
          lo_table->display( ).
      ENDCASE.
    ENDFORM.                    "at_selection_screen
    FORM f_f4_for_variant .
      CLEAR: wa_variant1, wa_variant2.
      wa_variant1-report = sy-repid.
      DATA v_variant_exit TYPE flag.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = wa_variant1
          i_save     = 'U'
        IMPORTING
          e_exit     = v_variant_exit
          es_variant = wa_variant2.
      IF v_variant_exit EQ 'X'..
        PERFORM f_get_default_variant.
      ENDIF.
    ENDFORM.                    "F_F4_FOR_VARIANT

  • Transaction Variant for Selection Screen

    Hi, experts!
    A question regarding transaction variants: Is it possible to create screen variants and transaction variants via SHD0 for selection screens? I' ve created a customer report with one selection screen including parameters and select options and would like to provide the users with a variant transaction for this.
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported. And trying to create a transaction variant via SHD0 fails because values entered in the selection screen parameters and select options help screens are not saved and presented.
    Any hints are more than welcome!
    Regards,
    Thomas

    You wrote
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
    But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are  transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
    Regards,
    Raymond

  • Variant for selection screen with the Table control entries in another Tab

    Hi Guys,
      The requirement is to create a variant for the two tabs on a selection screen.
      First tab contains the select options and the second contains table control for making entries.
      So will it be possible to create a variant when the user makes entries in the fields in one tab and the table on other tab?

    You wrote
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
    But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are  transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
    Regards,
    Raymond

  • Is it possible to create a variant without selection screen

    Hi,
    I would like to create a variant for a report(Standard report). It does not have selection screen. Could someone tell me is it possible to creste a varaint for it?
    Is it possible to create a variant w/o selection screen? if yes, how?

    If some SELECT-OPTIONS are hidden or NO-DISPLAY, you should be able to create a variant for the report.
    Rob

  • Variants without Selection Screen

    Hi,
    if i have a normal Dynpro Screen, and no selection screen, how can i then use the Variants of SAP? I found some FM like RS_CREATE_VARIANT but this does not work. The coding of these Variant helpers always try to read out the fields from the report. But my report has no fields, because it is a dynpro screen and no selection screen.
    Do you know if i can use variants for dynpros?
    Thanks

    Hi Johnny,
    You can create Transaction Variants using SHD0 transaction.
    Have a look at the below SAP link:-
    [Transaction Variants and Screen Variants  |http://help.sap.com/erp2005_ehp_03/helpdata/EN/5b/7bc3895d1111d295ad0000e82de14a/frameset.htm]
    Also Have a look at the below wiki :-
    [Creating variants for custom screens|Creating variants for custom screens;
    <removed by moderator>
    Regards
    Abhii
    Edited by: Thomas Zloch on Sep 1, 2010 5:56 PM - please leave this to the original poster

  • Loading user defined variants for selection screens

    hi everybody,
    i want to add a feature to my report which automatically loads a variant for a report.just like iw38, where the variant for the main selection-screen is automatically set when you name it like "U_<username>". sadly i couldnt find anything helpful by debugging the report.
    is there a certain function module to load specific screen-variants?
    thanks,
    dsp

    Hi dsp,
    There is a table
    VARID - Variant directory.
    it consists of all the variants according to the user name, date & time.
    You can do something like this,
    data: it_variant type standard table of varid,
          wa_variant type varid.
    Initialization.
    select * into corresponding fields of table it_variant
    from varid
    where report = sy-repid
    and ename = sy-uname.
    sort it_variant descending by edat etime.
    delete adjacent duplicates from it_variant comparing ename.
    loop at it_variant into wa_variant.
    *CLEAR W_VARIANT.
    *W_VARIANT = wa_variant.
    CALL FUNCTION 'RS_SUPPORT_SELECTIONS'
      EXPORTING
        report                     = sy-repid
        variant                    = wa_variant-variant
    EXCEPTIONS
      VARIANT_NOT_EXISTENT       = 1
      VARIANT_OBSOLETE           = 2
      OTHERS                     = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endloop.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Assign default values in selection screen of CM21

    Hi experts,
    Our case is that, in CM21 selection screen, default value to the field "Plant" is appeared. W are sure that it is not because of configuration settings but not able to find why it is appearing by default. Please let us know. Thanks in advance.

    Dear
    Please check this thread which I have posted earlier ; CM21/cm25 sorting of user defined field in table area
    Want a change in lau out in CM21
    Regards
    JH

  • Dynamic date variant in selection screen

    I have a selection option s_date in my program where I want to use the dyanmic variant with.
    it is a date range and for the lower range, I would like to have a static value of 04/01/2010 and for the higher range I want to have last date of the prev month.
    I see last date of the prev month in the drop down (F4) Dynamic table, but selecting that is overwriting the s-date-low instead of s_date-high. How can I use the dynamic variant for this ? Can i create my own custom drop downs for these dates?
    S_DATE      FROM  (_04/01/2010_)  TO (LAST DATE OF PREV MONTH)
    Thanks in advance..

    In variant you can specify dates dynamically.
    When you save a variant, system ask you enter variant name and Meaning. On the same screen you can specify these dynamic values.
    For the parameter/select-option where you want to specify dynamic value, press F4 on 'Selection Variable' column.
    Choose type of variable as 'D' (Dynamic date calculation).
    Press F4 on 'Name of Variable(Input only using F4) column and select 'Current date +/- ??? days' on next screen.
    On input screen enter -1.
    Repeat same for To Date' field.
    Prabhudas

Maybe you are looking for