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

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

  • Can any body tell me how to create a layout variant in the selection

    hi friends i would like to know how to create a layout variant in the selection screen and how to select the variant to display the ouptut using the layout using disvariant.please if possible give me example. thanks in advance.

    hi,
    I shall give you the code. It will definitely work.
    <u><b>Declerations you need to make</b></u>
    data:      WK_VARIANT      LIKE DISVARIANT,
               WX_VARIANT      LIKE DISVARIANT,
               WK_REPID        LIKE SY-REPID,
               WK_VARIANT_SAVE(1) TYPE C,
               WK_EXIT(1) TYPE C.
    <b><u>Things you need to do in the initialization event:</u></b>
    INITIALIZATION.
      PERFORM F_INIT_VARIANT.
      PERFORM F_VARIANT_DEFAULT USING PR_VARI.
    *&      Form  f_init_variant
    FORM F_INIT_VARIANT .
      CLEAR WK_VARIANT.
      WK_REPID = SY-REPID.
      WK_VARIANT-REPORT = WK_REPID.
      WK_VARIANT-USERNAME = SY-UNAME.
      WK_VARIANT_SAVE = 'A'.
    ENDFORM.                    " f_init_variant
    *&      Form  f_variant_default
    FORM F_VARIANT_DEFAULT  USING    P_PR_VARI.
      WX_VARIANT = WK_VARIANT.
      IF NOT P_PR_VARI IS INITIAL.
        WX_VARIANT-VARIANT = P_PR_VARI.
      ENDIF.
      CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
        EXPORTING
          I_SAVE        = WK_VARIANT_SAVE
        CHANGING
          CS_VARIANT    = WX_VARIANT
        EXCEPTIONS
          WRONG_INPUT   = 1
          NOT_FOUND     = 2
          PROGRAM_ERROR = 3
          OTHERS        = 4.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CASE SY-SUBRC.
        WHEN 0.
          P_PR_VARI = WX_VARIANT-VARIANT.
        WHEN 2.
          CLEAR P_PR_VARI.
      ENDCASE.
    ENDFORM.                    " f_variant_default
    <b><u> After this Things you need to do in the At selection screen event:</u></b>
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PR_VARI.
      PERFORM F_VARIANT_F4 USING PR_VARI.
    *&      Form  f_variant_f4
    FORM F_VARIANT_F4  USING    P_PR_VARI.
      CALL FUNCTION 'LVC_VARIANT_F4'
        EXPORTING
          IS_VARIANT    = WK_VARIANT
          I_SAVE        = WK_VARIANT_SAVE
        IMPORTING
          E_EXIT        = WK_EXIT
          ES_VARIANT    = WX_VARIANT
        EXCEPTIONS
          NOT_FOUND     = 1
          PROGRAM_ERROR = 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.
      IF WK_EXIT IS INITIAL.
        WK_VARIANT-VARIANT = WX_VARIANT-VARIANT.
        P_PR_VARI = WX_VARIANT-VARIANT.
      ENDIF.
    ENDFORM.                    " f_variant_f4
    After this finally when you call the output using REUSE_ALV_GRID_DISPLAY YOU NEED TO mention this parameter in the function module
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          <i><u><b>IS_LAYOUT          = WA_LAYOUT</b></u></i>
          <i><u><b>I_SAVE             = 'X'</b></u></i>
          <u><i>I_DEFAULT          = 'X'</i></u>
          <u><b>IS_VARIANT         = WK_VARIANT</b></u>
        TABLES
          T_OUTTAB           = ITAB1
        EXCEPTIONS
          PROGRAM_ERROR      = 1
          OTHERS             = 2.
    Once you do this,,, you can create a layout variant.
    P.S. Mark all helpful answers for points.
    JLN

  • 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

  • How to print the selection screen variant as a report header

    I want to print the variant selected on the selection screen as a report header in the report painter.....Kindly help....The variant selected prior to generating the report painter output must be displayed on the final output screen as the header on the screen...

    Hi
    Here you've to use 'Z_HEADER_FOOTER' function module at TOP-OF-PAGE
    Just pass parameters for report_name                 as repid
                                              show_select_options  as 'Y'
                                              show_parameters       as 'Y'
                                              line_size                       as you wish
                                              action                           as 'X'
    Hope this fulfills your requirement
    Thanks
    Suren

  • Creating a transaction variant doesn't catch the selection screen

    Hi,
    I am trying to create a transaction variant for RERAPP transaction, which calls the report RFRERAPP on selection screen 1000.
    I have used SHD0, specifying the t. code and a name for a transaction variant, then pressed the "Create" button. the selection screen is displayed, I enter the relevant values for the transaction, and press enter. the system prompts me to create some screen variants, but none of them have fields listed, and none of them is for the screen 1000.
    SAP Release 600.
    Any hint on the reason behind this behavior?
    I found another related, unanswered [topic|Transaction Variant for a standard report without transaction code;

    Hi,
    I have faced similar problem..
    Here is the work around.. Might be useful for you..
    1. Create Selection screen variant for report (Modify selection screen 1000 for display/hide in variant maintaince)
    2. Then create "parameter Transaction" with report on Transaction START_REPORT
    D_SREPOVARI-REPORT = <Your Report Name>
    D_SREPOVARI-VARIANT = <Newly created variant>
    Nag
    Edited by: Naga Mohan Kummara on Dec 31, 2009 10:46 AM
    Edited by: Naga Mohan Kummara on Dec 31, 2009 10:49 AM

  • How to get the variant name from the Selection Screen

    Hi Friends,
                       I have a Selection Screen with Variants.In the Report which is classical,i need to get the <b>name</b> of the variant which is used in the selection screen..Can anyone help me in this?

    You can use system variable
    SY-SLSET
    Thanks
    Seshu

  • How to limit the creation of the selection screen variant

    Hi,
    I have a question concerning the selection screen variants. Is it possible to limit the number of variant created by users (in customizing, authorization..)  ?
    If, yes, can you please tell me the procedure to follow.
    thanks for help.

    Cannot be restricted during creation but you can do a program that reads the report's existing variants, delete some, or modify the variant's content, you can put that in the program itself so when executed, apply your validation, or a background job depending on your requirements.
    You can do it with this function modules:
    RS_ALL_VARIANTS_4_1_REPORT
    RS_CHANGE_CREATED_VARIANT
    RS_VARIANT_DELETE
    Hope it helps

  • 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

  • How to disable the selection screen element?

    Hello Colleague,
    I have a report which has a checkbox in the selection screen. Currently I need to create two transaction codes for the report. When Tcode1 is executed, the program will execute in normal way. When Tcode2 is executed, the checkbox should be selected and greyed (not ready to input).
    To implement the requirement, I think I should control the screen in the INITIALIZATION event according to the SY-TCODE.  But when I tried to use LOOP AT SCREEN, I find SCREEN is empty.
    I search a lot of threads. They all introduce the selection control after screen is displayed. 
    Can any expert help me on the problem?
    Thansk & Regards, Yongbo.

    I think you can use Screen Variants T.Code SHD0.

  • How to hide the selection screen of a Logical datebase?

    Dear All,
    I used the logical database PNP in one of my program by maintain the attribute 'Logical Database' of this program.
    Now I want to hide all the selection screen of this PNP during the ABAP runtime environment.
    Who can tell me how I can realize it?
    Thank you!
    Regards,
    Brian Liu

    Hi,
    If you call the logical database using a function module, the selection
    screen is not displayed.
    To call a logical database from another program, use the function module LDB_PROCESS.
    <b>Example code:</b>
    TABLES SPFLI.
    SELECT-OPTIONS S_CARR FOR SPFLI-CARRID.
    TYPE-POOLS: RSDS, RSFS.
    DATA: CALLBACK TYPE TABLE OF LDBCB,
    CALLBACK_WA LIKE LINE OF CALLBACK.
    DATA: SELTAB TYPE TABLE OF RSPARAMS,
    SELTAB_WA LIKE LINE OF SELTAB.
    DATA: TEXPR TYPE RSDS_TEXPR,
    FSEL TYPE RSFS_FIELDS.
    CALLBACK_WA-LDBNODE = 'SPFLI'.
    CALLBACK_WA-GET = 'X'.
    CALLBACK_WA-GET_LATE = 'X'.
    CALLBACK_WA-CB_PROG = SY-REPID.
    CALLBACK_WA-CB_FORM = 'CALLBACK_SPFLI'.
    APPEND CALLBACK_WA TO CALLBACK.
    CLEAR CALLBACK_WA.
    CALLBACK_WA-LDBNODE = 'SFLIGHT'.
    CALLBACK_WA-GET = 'X'.
    CALLBACK_WA-CB_PROG = SY-REPID.
    CALLBACK_WA-CB_FORM = 'CALLBACK_SFLIGHT'.
    APPEND CALLBACK_WA TO CALLBACK.
    SELTAB_WA-KIND = 'S'.
    SELTAB_WA-SELNAME = 'CARRID'.
    LOOP AT S_CARR.
    MOVE-CORRESPONDING S_CARR TO SELTAB_WA.
    APPEND SELTAB_WA TO SELTAB.
    ENDLOOP.
    CALL FUNCTION 'LDB_PROCESS'
    EXPORTING
    LDBNAME = 'F1S'
    VARIANT = ' '
    EXPRESSIONS = TEXPR
    FIELD_SELECTION = FSEL
    TABLES
    CALLBACK = CALLBACK
    SELECTIONS = SELTAB
    EXCEPTIONS
    LDB_NOT_REENTRANT = 1
    LDB_INCORRECT = 2
    LDB_ALREADY_RUNNING = 3
    LDB_ERROR = 4
    LDB_SELECTIONS_ERROR = 5
    LDB_SELECTIONS_NOT_ACCEPTED = 6
    VARIANT_NOT_EXISTENT = 7
    VARIANT_OBSOLETE = 8
    VARIANT_ERROR = 9
    FREE_SELECTIONS_ERROR = 10
    CALLBACK_NO_EVENT = 11
    CALLBACK_NODE_DUPLICATE = 12
    OTHERS = 13.
    IF SY-SUBRC <> 0.
    WRITE: 'Exception with SY-SUBRC', SY-SUBRC.
    ENDIF.
    FORM CALLBACK_SPFLI USING NAME TYPE LDBN-LDBNODE
    WA TYPE SPFLI
    EVT TYPE C
    CHECK TYPE C.
    CASE EVT.
    WHEN 'G'.
    WRITE: / WA-CARRID, WA-CONNID, WA-CITYFROM, WA-CITYTO.
    ULINE.
    WHEN 'L'.
    ULINE.
    ENDCASE.
    ENDFORM.
    FORM CALLBACK_SFLIGHT USING NAME TYPE LDBN-LDBNODE
    WA TYPE SFLIGHT
    EVT TYPE C
    CHECK TYPE C.
    WRITE: / WA-FLDATE, WA-SEATSOCC, WA-SEATSMAX.
    ENDFORM.
    Regards,
    Sumit.
    Message was edited by: sumit kumar
    Message was edited by: sumit kumar

  • 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

  • Layout default option on the selection screen

    I have given a Select Layout box on the Selection screen of my ALV report. How can I pass the default layout value, already set in the report to the box on the selection screen as the default value.

    DATA: RS_VARIANT LIKE DISVARIANT.
    SELECTION-SCREEN : BEGIN OF BLOCK B10 WITH FRAME TITLE TEXT-024.
        PARAMETERS       : PA_VARI  TYPE SLIS_VARI.
    SELECTION-SCREEN : END OF BLOCK B10.
    FORM ALV_VARIANT_F4  CHANGING P_PA_VARI.
      DATA: "RS_VARIANT LIKE DISVARIANT,
             NOF4       TYPE C,
             G_REPID    TYPE SY-REPID.
      MOVE SY-REPID TO G_REPID.
      CLEAR NOF4.
      LOOP AT SCREEN.
        IF SCREEN-NAME    = PA_VARI.
          IF SCREEN-INPUT = 0.
            NOF4 = 'X'.
          ENDIF.
        ENDIF.
      ENDLOOP.
      RS_VARIANT-REPORT   = G_REPID.
      RS_VARIANT-USERNAME = SY-UNAME.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          IS_VARIANT = RS_VARIANT
          I_SAVE     = 'A'
        IMPORTING
          ES_VARIANT = RS_VARIANT
        EXCEPTIONS
          OTHERS     = 1.
      IF SY-SUBRC = 0 AND NOF4 EQ SPACE.
        PA_VARI = RS_VARIANT-VARIANT.
      ENDIF.
    ENDFORM.                    " ALV_VARIANT_F4
    Following code is used to get the Layout selection box on the selection screen.

  • Maintaing a default value for a particular field in the selection screen

    Hi all,
    How to maintain a default value for a particular field in the Selection Screen of a Standard report
    Regards
    Ajay

    >
    ajay babu wrote:
    > Hi all,
    >
    > How to maintain a default value for a particular field in the Selection Screen of a Standard report
    >
    > Regards
    > Ajay
    Create a variant for your standard program and assign this variant to the field 'Start with variant' while creating transaction code for the standard program in the transaction 'SE93'.
    Regards
    Rajesh.

  • Making sy-datum available in the selection screen.

    Hi All,
    This is a query regarding for eg: tcode wpo1. We want to schedule the program in
    background with a variant.
    The variants should have all our field but delivery date as sy-datum which is default in the current program.
    How do we do. I kind of tried a lot of options on the selection screen variant  saving.  Nothing seems to be solving my issue.
    Kindly suggest.
    Rgds,
    Anu.

    Hi ,,
    In the tcode WPO1,
    while saving as variant,in variant attributes,  For the field "Delievry Date " ,
    give the following :
    " Selection Variable = D; Dynamic Date calculation"
    "NAme of Variable = Current date",
    then save it .
    Now you can see only the current date i.e sy-datum even with in the variant when you execute WPO1.
    this will work fine as i faced the same problem.
    revert me back if u find any difficulty
    reward points if you find it helpful.
    regards
    Naveen

Maybe you are looking for