Variant description in ME6G

Dear all,
There is one requirement for ME6G - Vendor evaluation in background
When we select the variant when we define background job in ME6G in the "STEP", only the variant name is appearing.
The requirement is when we press F4 for selection of the variant, then alongwith Variant name , detail description of the variant should be shown in the selection window.
Can you please suggest how we can show variant description alongwith vanriant name in the selection window.
Best regards
Sarang

Why don't you skip this and just use the Job wizard.. Wouldn't it be easier?

Similar Messages

  • Workbook Variants description  to be displayed in Login Language

    HI,
    We have a requirement where we have maintianed variants in workbook.If a user login with different Language , the variant technical Name is displayed(as we have maintained description in only English)
    How can we translate the Variant Description?
    Regards,
    Suma H

    Thanks again.
    SELECT TO_CHAR(SYSDATE, 'Day:Dd Month yyyy' ,'NLS_DATE_LANGUAGE=SPANISH') FROM dual
    this is working but i am not able to get some thing like
    16thFeb... that th i m not getting can i get the th equivalent in spanish ( ie de) character appended after day ..
    Regards
    AAK
    Message was edited by:
    460425

  • Unable to see variant description when transported from development box

    Hi Experts,
                      i am unable to see variant description when transported the variant from DEVELOPMENT box to Pre Production box,i have maitained translation as yes for all the transports.
    thanks for your help in advance.
    Regards
    harish

    When you maintain translation, its not added to the transport request automaticly.
    You can add translation manually to the request transport or use the program RS_LXE_RECORD_TORDER.
    Bye.

  • Pulling through the Variant description to the sales order

    Is there a way to change the material description in the sales order to match the Characteristic Value?  Is there an enhancement that may work?  Also, looking for an enhancement that will update the Equipment Master description based on the serial number with the Characteristic Value
    Example:
    Characteristic  XXXX Unit
    Characteristic Value number one :  XXXX   Standard Unit
    Characteristic Value number two:    XXXX  Standard Unit with  Upgrade
    Example:
    Sales Order was for the variant XXXX  Standard Unit with  Upgrade
    I would like to update the Equipment Master with this; so in the event a RMA was created we know which variant is being sent in for repair.
    Material Number: XXXXXX
    Serial Number XXXXXXX
    Description: XXXX  Standard Unit with  Upgrade
    Edited by: Kim Blair on Nov 10, 2011 3:06 PM

    hi Nikhilesh,
    Thanks for your reply, i have tried this but i am not able to save the HU (HU02), while saving i get the following error, "<b>SD doc 5141(this no. is the 1st 4 digits of my SO no.) is not in the database or has been archieved"</b>.
    It asks to run the report 'SDRQCR21', even after running this program i get the same error.
    Regards,
    Surya

  • Variant config pricing condition description not correct

    Hi Gurus!
    I created Sales Order with a variant configuration material, pricing with package items. System pick up the correct
    pricing but pricing Condition Name for all the items are the same, system is taking variant description VK30 instead
    of condition type description in VK11.
    I have a package e.g.
    Material:  Phone Package A
    Condition type:
    - ZZ01 Phone 
    - ZZ02 Charger
    - ZZ03 Battery
    Data entry: Material A001 Nokia phone package
    charcteristics: Phone       PA
                           Charger    A1
                           Battery     T1
    System compute all the description of condition type is the same
    Material:  Phone Package A
    Condition type:
    key: PA-A1-T1
    - ZZ01 Package A for Nokia AAA   10.00
    - ZZ02 Package A for Nokia AAA   30.00
    - ZZ03 Package A for Nokia AAA   50.00
    I want the description of Condition Type not the variant description. Any clue on how to get the correct description of the
    Condition Type?

    Hi Sunny,
    1) With respect to your original question (e.g. "how to have the VTEXT field on the Conditions tab display the Condition Type Description set via the IMG rather than the Variant Description set via txn VK30"). Please know that once you check the "Variant Condition" flag for a condition type, the system has no choice but to present the Variant Description because this behavior is hard-coded.
    Easiest solution would be to activate screen overlay functionality (such as GUIXT) which can present the desired text to the user without affecting underlying code. Another alternative is to ask a developer to make an implicit enhancement that overrides the description just before presentation to the user.
    If neither solution works out and the users insist that you show the condition type description, then variant pricing simply doesn't fit. Hopefully you don't get to this point, but if it happens, then you would have to revert to standard (non-variant) pricing. To start you would need new display-only VBAP fields for each price-relevant characteristic (e.g. ztraining, zcourse_type, zstudent, and maybe zresource). and then custom code to copy values selected in the VC back to the corresponding new line item fields which can be done via a user-exit. Then you would follow the normal process for introducing new price-relevant fields, and redesign your condition types and condition tables to remove all reference to pricing variants. A hassle, but side benefit would be more straight-forward master-data maintenance since the user can directly see and maintain all pricing key fields in VK11/12/13 (rather than having to check variant table(s) to discover how the pricing key fields translate to variant keys) and of course they would always see the condition type description as desired.
    2) Moving on to address your 3rd-August follow-on comment from the other thread (e.g. "However, when I change the input Resource from 01 (Classroom) to 02 (Whiteboard) ... ZA01 is gone"). Is this what you wanted? If yes, then a user who needs a Classroom and Whiteboard and a Projector, would have to create a sales order with three configurable line items - is this the desired outcome?
    Edited by: Laura J. Williams on Sep 23, 2010 1:22 AM

  • To display the selection screen variant name in WAD report output.

    Hello experts,
    I have a requirement which is to display the selection screen variant description in the output of the WAD report.
    I managed halfway, by using the object "Information field", which displays all the values which are selected by the variant.
    Example:I have created a cost center report created using WAD, since I need some graphical displays..
    In the selection screen, I have the characteristic "cost center" as input field. I have created a variant " GM - IT" which will include few cost centers managed by GM. In the output, I want the dispaly to be "Cost center - GM IT". Currently it displays "Cost Center - a,b,c,d" as the values a,b,c,d are the values from the variant name "GM-IT"
    Please let me know if this required any java script. I am not familiar with java / html codes and any help would be much appreciated (and rewarded)
    Thanks in advance
    KS

    Hi,
    Try this.
    If you want to include your variables in your WAD means you have to choose "Force Variable Screen" option to be in enabled condition.
    TO enable this,in WAD select your Template(New Template1) click the WEBITEM , it'll shows all generic properties , here you can enable this "Force variable screen"
    Save and execute your WAD now you can get your variable screen.
    Thanks,
    JituK

  • Function Module that will retrieve the Field Catalogs of a Display Variant

    Hello Experts,
    Are there any function modules that I can use to retrieve the field catalogs (fields to be displayed in ALV report) by passing the display variant name?
    An RFC needs to apply this to determine which field(data) to be passed to XI (calling system) depending on user login.
    Thanks in advance!

    These are the various FM available for Variants (field Layout)
    REUSE_ALV_VARIANT_ALL_MAINTAIN Maintain all display variants for one object
    REUSE_ALV_VARIANT_DEFAULT_GET  Read default display variant (description only, w/o field catalog)
    REUSE_ALV_VARIANT_EXISTENCE    Checks whether a display variant exists
    REUSE_ALV_VARIANT_F4           Display variant selection dialog box
    REUSE_ALV_VARIANT_MAINTAIN     Definition of a display variant outside the list context
    REUSE_ALV_VARIANT_SAVE         Save a display variant
    REUSE_ALV_VARIANT_SELECT       Read a display variant
    Regards,
    Amit

  • Create Dynamic variant for date field

    Hello all,
    I need to have the current month year displayed in my selection screen in format MM.YYYY and the field is of type SPMON (Period to analyze - month).
    and while saving the variant it is showing only 'T' (entries from TVARVC table)  in  "selection variable" field and not showing 'D' (Dynamic selection) for the above field.
    So,please help me in resolving this issue.
    Thanks in advance.

    hi
    good
    go through this code,i hope this ll help you to create the dynamic variant.
    Please find the sample using RS_CREATE_VARIANT (FM).
    It make use of other FM also , just have a look .
    Hope this may help you.
    REPORT ZEXAMPLE.
    DATA: JVARI_DESC LIKE VARID,
    RC LIKE SY-SUBRC,
    VARIANT_TEXT LIKE VARIT-VTEXT,
    JVT LIKE VARIT OCCURS 0 WITH HEADER LINE,
    SELPA LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    PARMS LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    OBJS LIKE VANZ OCCURS 0 WITH HEADER LINE.
    PARAMETERS: P_VAR LIKE RSVAR-VARIANT. "NAME OF VARIANT
    JVARI_DESC-REPORT = SY-REPID.
    JVARI_DESC-VARIANT = P_VAR.
    JVARI_DESC-ENAME = 'EXAMPLES'.
    JVT-REPORT = SY-REPID.
    JVT-VARIANT = P_VAR.
    JVT-LANGU = SY-LANGU.
    JVT-VTEXT = 'FUNCTION EXAMPLES'.
    APPEND JVT.
    CLEAR SELPA.
    SELPA-SIGN = 'I'.
    SELPA-OPTION = 'EQ'.
    SELPA-KIND = 'P'.
    SELPA-SELNAME = 'P_VAR'.
    SELPA-LOW = P_VAR.
    APPEND SELPA.
    CHECK IF VARIANT EXISTS
    CALL FUNCTION 'RS_VARIANT_EXISTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    R_C = RC
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NO_REPORT = 2
    REPORT_NOT_EXISTENT = 3
    REPORT_NOT_SUPPLIED = 4
    OTHERS = 5.
    IF RC = 0 AND SY-SUBRC EQ 0.
    DELETE OLD VARIANT
    CALL FUNCTION 'RS_VARIANT_DELETE'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    FLAG_CONFIRMSCREEN = 'X'
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NOT_EXECUTED = 2
    NO_REPORT = 3
    REPORT_NOT_EXISTENT = 4
    REPORT_NOT_SUPPLIED = 5
    VARIANT_LOCKED = 6
    VARIANT_NOT_EXISTENT = 7
    NO_CORR_INSERT = 8
    VARIANT_PROTECTED = 9
    OTHERS = 10.
    IF SY-SUBRC NE 0.
    WRITE: 'UNABLE TO DELETE VARIANT:', P_VAR ,'STATUS=', SY-SUBRC.
    EXIT.
    ELSE.
    WRITE:/ P_VAR, 'DELETED'.
    ENDIF.
    ELSE.
    WRITE:/ P_VAR, 'DOES NOT EXIST'.
    ENDIF. " ALREADY EXISTS
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    CURR_REPORT = JVARI_DESC-REPORT
    CURR_VARIANT = P_VAR
    VARI_DESC = JVARI_DESC
    TABLES
    VARI_CONTENTS = SELPA
    VARI_TEXT = JVT
    EXCEPTIONS
    ILLEGAL_REPORT_OR_VARIANT = 1
    ILLEGAL_VARIANTNAME = 2
    NOT_AUTHORIZED = 3
    NOT_EXECUTED = 4
    REPORT_NOT_EXISTENT = 5
    REPORT_NOT_SUPPLIED = 6
    VARIANT_EXISTS = 7
    VARIANT_LOCKED = 8
    OTHERS = 9.
    IF SY-SUBRC EQ 0.
    WRITE:/ 'VARIANT', P_VAR, 'CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    ELSE.
    WRITE:/ 'VARIANT', P_VAR, 'NOT CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    EXIT.
    ENDIF.
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    TABLES
    VALUTAB = PARMS
    OBJECTS = OBJS
    EXCEPTIONS
    VARIANT_NON_EXISTENT = 1
    VARIANT_OBSOLETE = 2
    OTHERS = 3.
    IF SY-SUBRC NE 0.
    WRITE : / 'ERROR READING VARIANT CONTENTS.'.
    ELSE.
    CALL FUNCTION 'RS_VARIANT_TEXT'
    EXPORTING
    LANGU = SY-LANGU
    CURR_REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    V_TEXT = VARIANT_TEXT.
    WRITE:/ 'VARIANT DESCRIPTION:', VARIANT_TEXT.
    LOOP AT PARMS.
    CHECK PARMS-LOW NE SPACE OR PARMS-HIGH NE SPACE.
    READ TABLE OBJS WITH KEY NAME = PARMS-SELNAME.
    WRITE : /2 PARMS-SELNAME, OBJS-TEXT,
    45 PARMS-KIND,
    PARMS-SIGN,
    PARMS-OPTION,
    PARMS-LOW,
    PARMS-HIGH.
    NEW-LINE.
    ENDLOOP.
    SKIP.
    ENDIF.
    some other approach....
    This function module selects the Selection Screen contents
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
    curr_report = sy-repid
    TABLES
    selection_table = loc_int_tab
    EXCEPTIONS
    not_found = 1
    no_report = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE i000 WITH 'Error in RS_REFRESH_FROM_SELECTOPTIONS'(029).
    LEAVE LIST-PROCESSING.
    ENDIF.
    Craete the variant VAR1
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    curr_report = sy-repid
    curr_variant = wf_variant
    vari_desc = loc_varid
    TABLES
    vari_contents = loc_int_tab
    vari_text = loc_varit
    EXCEPTIONS
    illegal_report_or_variant = 1
    illegal_variantname = 2
    not_authorized = 3
    not_executed = 4
    report_not_existent = 5
    report_not_supplied = 6
    variant_exists = 7
    variant_locked = 8
    OTHERS = 9.
    IF sy-subrc <> 0.
    MESSAGE i000 WITH 'Error while creating dynamic variant'(028).
    LEAVE LIST-PROCESSING.
    ENDIF.
    reward point if helpful.
    thanks
    mrutyun^

  • Changing Variant Parameters Programmatically

    Hi Guys/Dolls
    I've developed a program that has a user selection date range on it and I have saved this program as a variant. I submit this program has a batch job on a monthly basis but need to change the dates on the variant each month to be the start and end date of the previous month.
    I believe I need to use the following Function Modules; please correct me if I am barking up the wrong tree. Unfortunately I have absolutely no idea how to use them within ABAP. Do I need anything else to change my variant parameters?
    RS_VARIANT_CONTENTS
    RS_CHANGE_CREATED_VARIANT
    Does anybody have a very small snippet of code that will allow me to change the date of the variant.
    Many thanks in advance.
    Raj

    Ok Guys/Dolls
    I've managed to hack a solution and have posted this for reference.
    The code is as follows:-
    FORM change_variant .
      DATA: h_rc LIKE sy-subrc.
      DATA: ival TYPE STANDARD TABLE OF rsparams WITH HEADER LINE.
      DATA: ls_variantdesc LIKE varid.
    *1st check to see that the variant exists.
      CALL FUNCTION 'RS_VARIANT_EXISTS'
        EXPORTING
          report              = sy-repid
          variant             = variant_name
        IMPORTING
          r_c                 = h_rc
        EXCEPTIONS
          not_authorized      = 01
          no_report           = 02
          report_not_existent = 03
          report_not_supplied = 04.
    * If variant exists then obtain the contents of the variants.
      IF h_rc = 0.
        CALL FUNCTION 'RS_VARIANT_CONTENTS'
          EXPORTING
            report                      = sy-repid
            variant                     = variant_name
            move_or_write               = 'W'
    *   NO_IMPORT                   = ' '
    *   EXECUTE_DIRECT              = ' '
    * IMPORTING
    *   SP                          =
          TABLES
    *   L_PARAMS                    =
    *   L_PARAMS_NONV               =
    *   L_SELOP                     =
    *   L_SELOP_NONV                =
            valutab                     = ival
    *   OBJECTS                     =
    *   FREE_SELECTIONS_DESC        =
    *   FREE_SELECTIONS_VALUE       =
    * EXCEPTIONS
    *   VARIANT_NON_EXISTENT        = 1
    *   VARIANT_OBSOLETE            = 2
    *   REPORT_NOT_EXISTENT         = 3
    *   OTHERS                      = 4
        IF sy-subrc = 0.
    *     Change value of the variants to what you want it to be.
          LOOP AT ival WHERE selname EQ 'PNPBEGDA' OR
                             selname EQ 'PNPBEGPS' OR
                             selname EQ 'PNPENDDA' OR
                             selname EQ 'PNPENDPS'.
            ival-low = ''.
            MODIFY ival.
          ENDLOOP.
          LOOP AT ival WHERE selname EQ 'P_CNGDAT'.
            ival-low  = '20000201'.
            ival-high = '20001231'.
            MODIFY ival.
          ENDLOOP.
    *   Now re-save the variant with the appropriate changes.
    *     Clear and re-populate the variant description.
          CLEAR ls_variantdesc.
          ls_variantdesc-aename   = sy-mandt.
          ls_variantdesc-aename   = sy-uname.
          ls_variantdesc-aedat    = sy-datum.
          ls_variantdesc-aetime   = sy-uzeit.
          CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'
            EXPORTING
              curr_report                     = sy-repid
              curr_variant                    = variant_name
              vari_desc                       = ls_variantdesc
    *   ONLY_CONTENTS                   =
            TABLES
              vari_contents                   = ival
    *   VARI_TEXT                       =
    *   VARI_SEL_DESC                   =
    *   OBJECTS                         =
           EXCEPTIONS
             illegal_report_or_variant       = 1
             illegal_variantname             = 2
             not_authorized                  = 3
             not_executed                    = 4
             report_not_existent             = 5
             report_not_supplied             = 6
             variant_doesnt_exist            = 7
             variant_locked                  = 8
             selections_no_match             = 9
             OTHERS                          = 10.
          IF sy-subrc = 0.
            PERFORM set_pnp_default.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " change_variant
    FORM set_pnp_default.
    * The following 2 statement will set Today as the default on the PNP
    * selection and also move the cursor to that field.
    * IMPORTANT NOTE - you must have 'PNPTIMR1' in capitals otherwise it
    * doesn't work.
      pnptimed = 'D'.
      SET CURSOR FIELD 'PNPTIMR1'.
    ENDFORM.                    " set_pnp_default

  • Process chain transport issue: variant

    Hi xperts!
    I've an issue regarding incomplete transports of process chain variants.
    I've maintained the variant description & the recipient list.
    When the request is imported in QAS, I'm missing the details of the variants. QAS-table RSPCVARIANTT is empty regarding type MAIL.
    In addition the recipients 've not been imported too.
    How can I transport the missing settings?
    Pls. give an advice. Txs a lot in advance.
    Hermann

    Hi,
    would suggest you to go by this..
    in the RSPC t-code go to the chain you want to transport and activate each step and sub chain if any...firsy and store it in a temporary request ....and then click on the truck button the top.....it will take you to the transport connection and there you can see obnjects are still in temp TR.
    delee these TR now refresh the window of transport connection and you will see that it's not present in any TR now.
    once done just select the main chain and then again create TR.
    this time you can see it contains all the objects.
    try to keep only necessary objects and delete all the unwanted objects from that.
    Thanks

  • 3.5 to 04s Variant Migration Issues

    We have upgraded our sandbox system from 3.5 SP18 to 7.0 SP15. I ran the two variant migration programs RSR_VARIANT_XPRA and RSR_MIGRATE VARIANTS. Ran the MIGRATE pgm with the the convert ALL option.  Also applied a couple of variant related Notes, one from SP 17 - to get the variant description to display and one from SP16 that added a button on the variable input screen to allow the display of <b>User</b> variants rather than <b>Global</b> variants.
    We're using the Bex Analyzer 3.5 front end and here's what we are seeing -
    All the 3.5 variants were migrated as Global variants rather than User variants, which the program comments seem to indicate is what was intended. Our preference would have been to convert variants as User and then create the much smaller number that we need to be Global - or give us the option. 
    The program did NOT adjust the variant Technical name as it was supposed to e.g. replacing spaces with an underscore character.  So we can load a converted variant, but if we try to modify and save it, it provides error messages about the unconverted technical name being invalid - it doesn't like the spaces that are still in the tech name that it failed to convert.
    There is only a single Save button - which only saves new variants as User variants.  Any way to save it as a Global variant from the 3.5 Bex Analyzer front end?
    Anyone having similar issues or aware of fixes in the works.  Otherwise, I'll need to open Customer Msgs I guess.
    It seems like not enough attention has been given to maintaining BEx Analyzer 3.5 functionality.

    You may wish to check this -
    Note 1003481 - Variant Migration - Migrate all variants
    It is possible to save 3.x variant with characters other than A-Z; 0-9 and '_'.  But this is not allowed in new variant storage for technical name of a variant.  Due to this fact, the migration report automatically attempts to convert all the characters of original 3.x variant, that are not allowed in new variant storage, in to '_'.  But since the variants are always identified by its description in variable screen in NW2004s, this change will be transparent for end-users and will not affect the usage directly.  When there is no language dependent description found for the corresponding 3.x variant, the migration report automatically saves the original 3.x variant name (with special characters) as its description (in current logon language) in new variant storage.
    Hope it Helps
    Chetan
    @CP..

  • Variant in alv

    hi can anyone explain what is this 3 function module
    REUSE_ALV_VARIANT_EXISTENCE
    REUSE_ALV_VARIANT_DEFAULT_GET
    REUSE_ALV_VARIANT_F4
    i have a parameter variant on the selection screen so that user will be able to launch report with a default layout variant
    please give me an example where only this is implemented with list alv

    Hi
    See the doc of each fun module
    REUSE_ALV_VARIANT_DEFAULT_GET
    Read default display variant (description only, w/o field catalog)
    Functionality
    Provides the default variant for the list specified in the structure parameter CS_VARIANT of a program.
    Parameters
    I_SAVE
    CS_VARIANT
    Exceptions
    WRONG_INPUT
    NOT_FOUND
    PROGRAM_ERROR
    REUSE_ALV_VARIANT_EXISTENCE
    Checks whether a display variant exists
    Functionality
    This function module checks the existence in the database of a display variant passed in the interface.
    Parameters
    I_SAVE
    CS_VARIANT
    Exceptions
    WRONG_INPUT
    NOT_FOUND
    PROGRAM_ERROR
    REUSE_ALV_VARIANT_F4
    Display variant selection dialog box
    Functionality
    Possible entries help, if the variant is defined explicitly as an input field on a screen. The selection must be specified by at least partially filling the parameter structure IS_VARIANT.
    Parameters
    IS_VARIANT
    I_TABNAME_HEADER
    I_TABNAME_ITEM
    IT_DEFAULT_FIELDCAT
    I_SAVE
    I_DISPLAY_VIA_GRID
    E_EXIT
    ES_VARIANT
    Exceptions
    NOT_FOUND
    PROGRAM_ERROR
    CS_VARIANT is the structure which have the following fields data
    ABAP Program Name
    Mgt. ID for repeated calls from the same program
    Logical group name
    User name for user-specific storage
    Layout
    Description for layout
    Dependent variant entry vector
    check this with example also...
    *& Report  ZBC_ALV_EXAMPLE                                             *
    This program explains how we can use simple ALV functions to make    *
    reporting easy and looks pretty
    Programmer        : Venkat Reddy           ETA                       *
    Date              : 10/02/04                                         *
    Maintenance Log                                                      *
    Changed By      Date         Transport#   Description                *
    Venkat Reddy    10/02/04     EGD913575    Changed program to avoid   *
    REPORT  ZBC_ALV_EXAMPLE.
                    D-A-T-A  D-E-C-L-A-R-A-T-I-O-N-S                     *
    tables:  sflight.
    **-- TYPE-POOLS Definition
    **Includes the types and constants of a type group. Since the types and
    *constants specified in a type group have global validity, you cannot
    *use the statement within a FORM or FUNCTION.
    type-pools: slis.
    PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT.
    **-- ALV variables
    *****- Field Catalog structure
    data: ls_fieldcat     type slis_fieldcat_alv,    "Field Catalog list
    **--- Field Catalog table
          gt_fieldcat     type slis_t_fieldcat_alv,  "Field Catalog
    **--- Layout ( How you would like to see the output )
          gs_layout       type slis_layout_alv,       "List Layout
    **--  Report name
          g_repid         like sy-repid,
           g_save(1)           type c,
          g_exit(1)           type c,
          g_variant           like disvariant,
          gx_variant          like disvariant.
    **-- Flight Info Internal table
    data: lt_sflight like sflight occurs 0 with header line.
                    C-O-N-S-T-A-N-T-S                                    *
                    S-E-L-E-C-T-I-O-N  S-C-R-E-E-N                       *
    selection-screen begin of block a with frame title text-100.
    select-options: s_carrid  for  sflight-carrid,
                    s_connid  for  sflight-connid,
                    s_fldate  for  sflight-fldate default sy-datum.
    selection-screen end of block a .
                    I-N-I-T-I-A-L-I-Z-A-T-I-O-N                          *
    initialization.
      g_repid = sy-repid.
    **-- Fill ALV field catalog
      perform initialize_fieldcat using gt_fieldcat[].
    ***-- Build Events
    perform build_eventtab using gt_events[].
    **-- Read the default variant
      perform initialize_variant.
                    A-T  S-E-L-E-C-T-I-O-N  S-C-R-E-E-N                  *
    at selection-screen on value-request for p_vari.
    **-- Display all existing variants
      call function 'REUSE_ALV_VARIANT_F4'
           exporting
                is_variant = g_variant
                i_save     = g_save
           importing
                e_exit     = g_exit
                es_variant = gx_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 g_exit = space.
          p_vari = gx_variant-variant.
        endif.
      endif.
                    S-T-A-R-T  O-F  S-E-L-E-C-T-I-O-N                    *
    start-of-selection.
    **-- Read Flight information.
    perform read_flight_info.
    **-- Fill ALV field catalog and display report.
      if not lt_sflight[] is initial.
        perform dislay_alv_report.
      endif.
    ======================================================================
                    FORMS / SUB ROUTINES                                 *
    *======================================================================
    *&      Form  initialize_fieldcat
          text
         -->P_GT_FIELDCAT[]  text
    form initialize_fieldcat using l_fieldcat type slis_t_fieldcat_alv.
      clear ls_fieldcat.
    Air line
      ls_fieldcat-fieldname   = 'CARRID'.
      ls_fieldcat-key         = 'X'.
      ls_fieldcat-col_pos     = 1.
      ls_fieldcat-seltext_s   = 'Airline'.
      ls_fieldcat-seltext_l   = 'Airline'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Flight Number
      ls_fieldcat-fieldname   = 'CONNID'.
      ls_fieldcat-key         = 'X'.
      ls_fieldcat-col_pos     = 2.
      ls_fieldcat-seltext_s   = 'Flight Number'.
      ls_fieldcat-seltext_l   = 'Flight Number'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Flight date
      ls_fieldcat-fieldname   = 'FLDATE'.
      ls_fieldcat-key         = 'X'.
      ls_fieldcat-col_pos     = 3.
      ls_fieldcat-seltext_s   = 'Flight date'.
      ls_fieldcat-seltext_l   = 'Flight date'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Airfare
      ls_fieldcat-fieldname   = 'PRICE'.
      ls_fieldcat-col_pos     = 4.
      ls_fieldcat-do_sum      = 'X'.
      ls_fieldcat-seltext_s   = 'Airfare'.
      ls_fieldcat-seltext_l   = 'Airfare'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Local Currency
      ls_fieldcat-fieldname   = 'CURRENCY'.
      ls_fieldcat-col_pos     = 5.
      ls_fieldcat-seltext_s   = 'Local Currency'.
      ls_fieldcat-seltext_l   = 'Local Currency'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Plane Type
      ls_fieldcat-fieldname   = 'PLANETYPE'.
      ls_fieldcat-col_pos     = 6.
      ls_fieldcat-seltext_s   = 'Plane type'.
      ls_fieldcat-seltext_l   = 'Plane type'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Maximum capacity
      ls_fieldcat-fieldname   = 'SEATSMAX'.
      ls_fieldcat-col_pos     = 7.
      ls_fieldcat-seltext_s   = 'Max. seats'.
      ls_fieldcat-seltext_l   = 'Max. seats'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Occupied seats
      ls_fieldcat-fieldname   = 'SEATSOCC'.
      ls_fieldcat-col_pos     = 8.
      ls_fieldcat-seltext_s   = 'Seats occupied'.
      ls_fieldcat-seltext_l   = 'Seats occupied'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Total
      ls_fieldcat-fieldname   = 'PAYMENTSUM'.
      ls_fieldcat-col_pos     = 9.
      ls_fieldcat-do_sum     = 'X'.
      ls_fieldcat-seltext_s   = 'Total amount'.
      ls_fieldcat-seltext_l   = 'Total amount'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Total
      ls_fieldcat-fieldname   = 'PAYMENTSUM'.
      ls_fieldcat-col_pos     = 9.
      ls_fieldcat-do_sum     = 'X'.
      ls_fieldcat-seltext_s   = 'Total amount'.
      ls_fieldcat-seltext_l   = 'Total amount'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Max. Capacity, Buss. Class
      ls_fieldcat-fieldname   = 'SEATSMAX_B'.
      ls_fieldcat-col_pos     = 10.
      ls_fieldcat-seltext_s   = 'Max.Buss.class cap.'.
      ls_fieldcat-seltext_l   = 'Max.Buss.class cap.'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Max. occupancy, Buss. Class
      ls_fieldcat-fieldname   = 'SEATSOCC_B'.
      ls_fieldcat-col_pos     = 11.
      ls_fieldcat-seltext_s   = 'Max.Bus.CL.occupied'.
      ls_fieldcat-seltext_l   = 'Max.Bus.CL.occupied'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Max. Capacity, First. Class
      ls_fieldcat-fieldname   = 'SEATSMAX_F'.
      ls_fieldcat-col_pos     = 12.
      ls_fieldcat-seltext_s   = 'Max.Buss.class cap.'.
      ls_fieldcat-seltext_l   = 'Max.Buss.class cap.'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    Max. occupancy, First. Class
      ls_fieldcat-fieldname   = 'SEATSOCC_F'.
      ls_fieldcat-col_pos     = 13.
      ls_fieldcat-seltext_s   = 'Max.Bus.CL.occupied'.
      ls_fieldcat-seltext_l   = 'Max.Bus.CL.occupied'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
    ENDFORM.                    " initialize_fieldcat
    *&      Form  read_flight_info
          text
    -->  p1        text
    <--  p2        text
    FORM read_flight_info .
    refresh lt_sflight.
    clear   lt_sflight.
    **-- Read data from SFLIGHT table
      select *
        from SFLIGHT
        into table lt_sflight
        where carrid in s_carrid
         and  connid in s_connid
         and  fldate in s_fldate.
    if sy-subrc <> 0.
       message e208(00) with text-101.
    endif.
    ENDFORM.                    " read_flight_info
    *&      Form  dislay_alv_report
          text
    -->  p1        text
    <--  p2        text
    FORM dislay_alv_report .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM              =  g_repid
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
       I_STRUCTURE_NAME                =  'sflight'
      IS_LAYOUT                      =
       IT_FIELDCAT                     =  gt_fieldcat
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
       I_DEFAULT                      = 'X'
       I_SAVE                         = 'A'
      IS_VARIANT                     = GX_VARIANT
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
      IS_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                       = lt_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.
    ENDFORM.                    " dislay_alv_report
    *&      Form  initialize_variant
          text
    -->  p1        text
    <--  p2        text
    FORM initialize_variant .
    g_save = 'A'.
      clear g_variant.
      g_variant-report = g_repid.
      gx_variant = g_variant.
      call function 'REUSE_ALV_VARIANT_DEFAULT_GET'
           exporting
                i_save     = g_save
           changing
                cs_variant = gx_variant
           exceptions
                not_found  = 2.
      if sy-subrc = 0.
        p_vari = gx_variant-variant.
      endif.
    ENDFORM.                    " initialize_variant
    regards,
    venkat.

  • How to create Dynamic Variant?

    Hi Experts,
    One simple doubt pls.,
    How to create a Dynamic Variant for my_z_selection_screen?
    thanq.

    hi,
    Look at the following Code
    Please find the sample using RS_CREATE_VARIANT (FM).
    It make use of other FM also , just have a look .
    Hope this may help you.
    REPORT ZEXAMPLE.
    DATA: JVARI_DESC LIKE VARID,
    RC LIKE SY-SUBRC,
    VARIANT_TEXT LIKE VARIT-VTEXT,
    JVT LIKE VARIT OCCURS 0 WITH HEADER LINE,
    SELPA LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    PARMS LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    OBJS LIKE VANZ OCCURS 0 WITH HEADER LINE.
    PARAMETERS: P_VAR LIKE RSVAR-VARIANT. "NAME OF VARIANT
    JVARI_DESC-REPORT = SY-REPID.
    JVARI_DESC-VARIANT = P_VAR.
    JVARI_DESC-ENAME = 'EXAMPLES'.
    JVT-REPORT = SY-REPID.
    JVT-VARIANT = P_VAR.
    JVT-LANGU = SY-LANGU.
    JVT-VTEXT = 'FUNCTION EXAMPLES'.
    APPEND JVT.
    CLEAR SELPA.
    SELPA-SIGN = 'I'.
    SELPA-OPTION = 'EQ'.
    SELPA-KIND = 'P'.
    SELPA-SELNAME = 'P_VAR'.
    SELPA-LOW = P_VAR.
    APPEND SELPA.
    CHECK IF VARIANT EXISTS
    CALL FUNCTION 'RS_VARIANT_EXISTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    R_C = RC
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NO_REPORT = 2
    REPORT_NOT_EXISTENT = 3
    REPORT_NOT_SUPPLIED = 4
    OTHERS = 5.
    IF RC = 0 AND SY-SUBRC EQ 0.
    DELETE OLD VARIANT
    CALL FUNCTION 'RS_VARIANT_DELETE'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    FLAG_CONFIRMSCREEN = 'X'
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NOT_EXECUTED = 2
    NO_REPORT = 3
    REPORT_NOT_EXISTENT = 4
    REPORT_NOT_SUPPLIED = 5
    VARIANT_LOCKED = 6
    VARIANT_NOT_EXISTENT = 7
    NO_CORR_INSERT = 8
    VARIANT_PROTECTED = 9
    OTHERS = 10.
    IF SY-SUBRC NE 0.
    WRITE: 'UNABLE TO DELETE VARIANT:', P_VAR ,'STATUS=', SY-SUBRC.
    EXIT.
    ELSE.
    WRITE:/ P_VAR, 'DELETED'.
    ENDIF.
    ELSE.
    WRITE:/ P_VAR, 'DOES NOT EXIST'.
    ENDIF. " ALREADY EXISTS
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    CURR_REPORT = JVARI_DESC-REPORT
    CURR_VARIANT = P_VAR
    VARI_DESC = JVARI_DESC
    TABLES
    VARI_CONTENTS = SELPA
    VARI_TEXT = JVT
    EXCEPTIONS
    ILLEGAL_REPORT_OR_VARIANT = 1
    ILLEGAL_VARIANTNAME = 2
    NOT_AUTHORIZED = 3
    NOT_EXECUTED = 4
    REPORT_NOT_EXISTENT = 5
    REPORT_NOT_SUPPLIED = 6
    VARIANT_EXISTS = 7
    VARIANT_LOCKED = 8
    OTHERS = 9.
    IF SY-SUBRC EQ 0.
    WRITE:/ 'VARIANT', P_VAR, 'CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    ELSE.
    WRITE:/ 'VARIANT', P_VAR, 'NOT CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    EXIT.
    ENDIF.
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    TABLES
    VALUTAB = PARMS
    OBJECTS = OBJS
    EXCEPTIONS
    VARIANT_NON_EXISTENT = 1
    VARIANT_OBSOLETE = 2
    OTHERS = 3.
    IF SY-SUBRC NE 0.
    WRITE : / 'ERROR READING VARIANT CONTENTS.'.
    ELSE.
    CALL FUNCTION 'RS_VARIANT_TEXT'
    EXPORTING
    LANGU = SY-LANGU
    CURR_REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    V_TEXT = VARIANT_TEXT.
    WRITE:/ 'VARIANT DESCRIPTION:', VARIANT_TEXT.
    LOOP AT PARMS.
    CHECK PARMS-LOW NE SPACE OR PARMS-HIGH NE SPACE.
    READ TABLE OBJS WITH KEY NAME = PARMS-SELNAME.
    WRITE : /2 PARMS-SELNAME, OBJS-TEXT,
    45 PARMS-KIND,
    PARMS-SIGN,
    PARMS-OPTION,
    PARMS-LOW,
    PARMS-HIGH.
    NEW-LINE.
    ENDLOOP.
    SKIP.
    ENDIF.
    some other approach....
    This function module selects the Selection Screen contents
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
    curr_report = sy-repid
    TABLES
    selection_table = loc_int_tab
    EXCEPTIONS
    not_found = 1
    no_report = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE i000 WITH 'Error in RS_REFRESH_FROM_SELECTOPTIONS'(029).
    LEAVE LIST-PROCESSING.
    ENDIF.
    Craete the variant VAR1
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    curr_report = sy-repid
    curr_variant = wf_variant
    vari_desc = loc_varid
    TABLES
    vari_contents = loc_int_tab
    vari_text = loc_varit
    EXCEPTIONS
    illegal_report_or_variant = 1
    illegal_variantname = 2
    not_authorized = 3
    not_executed = 4
    report_not_existent = 5
    report_not_supplied = 6
    variant_exists = 7
    variant_locked = 8
    OTHERS = 9.
    IF sy-subrc <> 0.
    MESSAGE i000 WITH 'Error while creating dynamic variant'(028).
    LEAVE LIST-PROCESSING.
    ENDIF.

  • Variant -Variables

    Hi,
    This is Urgent ..please
    I have a requirement like .. I know the VARIABLE name , i need to findout the VARIANT names which are using this VARIABLE.
    Ex: Variable name = LAST_WEEK . Please let me know how to findout the VARIANT names which is using the LAST_WEEK.

    Hi,
    Check the following tables:
    VARI ABAP/4: Variant storage (similar to INDX)
    VARICON Selection variants: Content
    VARICONCI Selection Variants: Content (Cross-Client)
    VARID Variant directory
    VARID_CI Variant Catalog, Cross-Client
    VARIDESC Selection Variants: Description
    VARIDESCCI Selection Variants: Description (Cross-Client)
    VARINUM Internal number assignment for variants
    VARIS Assignment of variant to selection screen
    VARIS_CI Assignment of Variant to Selection Screen
    VARIT Variant texts
    VARIT_CI Variant Texts, Cross-Client
    Also you can check FM RS_VARIANT_*
    Regards,
    Bhaskar

  • ALV Variant Table and Hiding Variants

    Hi
    Where can I find the table where all ALV variants are stored?
    I tried to run a Trace and it brought back LTCX table but there doesn't seem to be any entries in this table?
    Also is there a way I can hide variants based on transaction code?

    check this LTDX,TVARV,VARIS and fm RS_VARIANT_CONTENTS
    table VARID shows information about variant creation and date
    VARIT shows the variant description and the language used

Maybe you are looking for