How to have a Layout as Selection in a Report?

Hi All,
I am using "REUSE_ALV_GRID_DISPLAY" to display a ALV Grid. I need to know how could I have Layout Selection Criteria where the user could select the desired Layout and then execute the program. The selected Layout could be stored in "g_layout" and assign to the "IS_LAYOUT" found in the import list of "REUSE_ALV_GRID_DISPLAY".
Thanks,
Kishan

Hi,
1. have a pramter in the selection screen for variant.
PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT.
2.
  G_SAVE = 'A'.
    CLEAR G_VARIANT.
  G_VARIANT-REPORT = G_REPID.
* Get default variant
  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.
* Process on value request
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
       EXPORTING
            IS_VARIANT          = G_VARIANT
            I_SAVE              = G_SAVE
*           it_default_fieldcat =
       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.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            I_BACKGROUND_ID         = 'ALV_BACKGROUND'
            I_CALLBACK_PROGRAM      = G_REPID
            I_STRUCTURE_NAME        = 'SFLIGHT'
            IS_LAYOUT               = GS_LAYOUT
            IT_FIELDCAT             = GT_FIELDCAT[]
*           IT_EXCLUDING            =
            IT_SPECIAL_GROUPS       = GT_SP_GROUP[]
            IT_SORT                 = GT_SORT[]
*           IT_FILTER               =
*           IS_SEL_HIDE             =
*           i_default               = g_default
<b>            I_SAVE                  = G_SAVE
            IS_VARIANT              = G_VARIANT</b>
Regards
vijay

Similar Messages

  • How to add Change Layout, savelayout, select layout Button to ALV Toolba

    How to add Change Layout, savelayout, select layout Button to ALV Toolbar?
    Moderator message: please (re)search yourself before asking.
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    locked by: Thomas Zloch on Sep 10, 2010 10:57 AM

    Variant
    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant          = gs_variant
                i_save              = c_save
              it_default_fieldcat =
           IMPORTING
                e_exit              = gf_exit
                es_variant          = gs_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 gf_exit = space.
          cf_varia = gs_variant-variant.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save        = c_save
        CHANGING
          cs_variant    = gs_variant
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
      IF sy-subrc NE 0.
        cf_subrc = sy-subrc.
      ENDIF.
    Change Layout, savelayout, select layout Button  pass the value which is in BOLD
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                =  gd_repid
         i_callback_user_command           =  'U_COMMAND'
         i_callback_top_of_page            = 'TOP-OF-PAGE'
                         is_layout                    =  fld_lay
           it_fieldcat                  =  fieldcatalog[]
                       IT_EXCLUDING                  =
                       IT_SPECIAL_GROUPS             =
                       IT_SORT                        =  it_sort[]
         i_default                      = 'X'
         i_save                         = 'A'
         is_variant                     = gs_variant
         it_events                      =  it_event[]
        TABLES
          t_outtab                      =    it_sales
                     EXCEPTIONS
                       PROGRAM_ERROR                     = 1
                       OTHERS                            = 2
    Annasaheb

  • How we can assign the customised selection screen to report category

    hai
    gurus
    how we can assign the customised selection screen to report category

    Hi Naresh,
    You can do like this.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME.
    SELECT-OPTIONS: S_FKART FOR VBRK-FKART.
    SELECT-OPTIONS: S_FKDAT FOR VBRK-FKDAT OBLIGATORY.
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
    SELECT-OPTIONS: S_AUART FOR VBAK-AUART.
    SELECTION-SCREEN END OF BLOCK SELECTION.
    SELECTION-SCREEN END OF BLOCK B1.
    if you give me brief i can help you out more.
    Thank you .
    Regards
    Ram

  • How to have dynamic thumb folder selection?

    I am creating a HTML gallery. I want to have a specific folder structure for each album. Now strugling with setting the directory for the thumbnail and photo folder in galleryinfo.lrweb:
    The user can enter the albumfoldername, which by default is set on albumName:
    ["nonCSS.albumFolderName"] = "albumName",
    Manually this works:
    ["photoSizes.photos.directory"] = "albumName",
    But how to get the foldername entered by the user assigned or even the default value above? Tried several options but without luck. Best option would be (I think):
    ["photoSizes.photos.directory"] =function() return nonCSS.albumFolderName end,
    Does somebody now how to get it working?
    Jan-Willem

    Andy,
    What I want, but currently is not possible is to publish albums which are part of a photo gallery. Missing part is possibility to define layout for an index file and defining where the generated images should be stored. Index file will look like:
    To have a logical structure for maintenance etc. I want to have the following folder structure:
    |
    +- Albums
         |
         +- <albumFoldername 1>
         |        |
         |        +- photos
         |        +- thumbnails
         |        +- resources
         |        +- stylesheets
         +- <albumFoldername 2>
                  |
                  +- photos
                  +- thumbnails
                  +- resources
                  +- stylesheets
    May also be possible that first level is the year or a subject based folder. As indicated in previous messages it works to get index.html and the detail photo pages in the folder <albumFoldername>, but not for the images itself (i.e. photos and thumbnails).
    The workflow would be:
    1. Select photos/album to export
    2. Modify the settings in the web plugin (i.e. entering the album name and albumFolderName to use
    3. Generate the webpage
    4. Copy the relevant files to my photo website (HTML & ASP pages on my Windows Home Server).
    5. Manually adjust the index file
    What I would like to have in Lightroom user interface is:
    a. a tree like the keywords for defining the photo gallery including sub albums
    b. select the albums to export
    c. at same time generate the index file as defined in a lua HTML page
    But for the time being controlling the destination for the photos would already help.
    Jan-Willem

  • How to create Variables(User Input Selections) in WEBI Report

    Hi Team,
                  My requirement is to create a WEBI Report on top of BEx query,I have created a Universe and WEBI Report on this Universe but my doubt is How to create Variables for the User to select.The Input selection should be
    User Iputs(All are drop downs)
    Distribution Channel :       ->drop down,user can select one
    Division:                          -> drop down,user can select one
    Department:
    Season:
    Collection:
    Date Format              Valid From:                                 Fiscal Week:
    When the user gives the above selections the output should be displayed as
    Material No   Description     Markdown Week     Reason code1(under this)        Reason code2(under this)   like that for all the
                                                                                valid from         Amount              Valid from          Amount            Reason code.
    I have designed the basic layout of the Report but wanted to know how to design like this,Please help me out in this Format.
    Thanks & Regards,
    Somu

    Hi, depending on the way you set this up (it is not entirely clear if you are talking bex variables or report drop down filters), use the following;
    For BEX variables, the choice will be in the
    UserResponse("prompt message")
    this you can display in the message format you want.
    For drop down filters the choice will be in the DrillFilters(), this one will show all selections in one string.
    However, if you want to format this to a certain message, you need to use the Formula
    DrillFilters([object from drill bar])
    This will give you the result of just that one selection. If the user did not select (yet), the value will be "".
    Hope this helps,
    Marianne

  • How to display multiple prompt values selected, in the report

    Hi,
    I have a LOV : SELECT DISTINCT CO.V_MOVEMENT.ORIGIN_BRANCH_CODE FROM CO.V_MOVEMENT ORDER BY 1
    and a parameter associated with it which is multiple selection enabled. The parameter name is P_BRANCH.
    When I am displaying P_BRANCH at the top of my report (RTF), it's showing only one value whereas I need to display all the selected value as Comma Separated.
    Please help.
    Thanks & Regards,
    Antara

    The other option to fetch all the selected values to the report (RTF) is to create a dataset for the field and in the template create a repeating group for each value.
    Eg:
    1) The SQL is : ( In SQL Server, where :P_S_ORIGIN_BRANCH_CODE is Prompt )
    SELECT DISTINCT
    :P_S_ORIGIN_BRANCH_CODE as P_BRANCH
    2) XML is :
    <DATA_DS>
    <G_1>
    <P_BRANCH>RTM</P_BRANCH>
    </G_1>
    <G_1>
    <P_BRANCH>ABC</P_BRANCH>
    </G_1>
    </DATA_DS>
    3) In report we can display the values as below:
    RTM,
    ABC
    But The Required Output in RTF is : (Values seperated by ",")
    RTM, ABC
    Your help would be highly appreciated.
    Thanks & Regards,
    Antara
    Edited by: user450412 on Oct 10, 2011 4:11 PM

  • How can I pick what is selected in a report and form appication

    I have the need to pick what is selected , say the primary key from what is selected in the first form.
    Thanks,
    Doug

    Doug,
    Look on the second page for an ID item. This is what is typically set when going from a report to a form. You should be able to use that item to filter your report on the second page.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • How to do sum of rows selected in Html_db report

    I want to display sum of rows (based on the values selected in in a particular col)in html_db report

    Hi Tyler;
    Can you please take a look at my post?
    Possible Bug in 1.6 Report Totals?
    I am having some problem with Totals in a report.

  • How can I set a permanent default language for Firefox's spellcheck feature, so that I don't have to keep manually selecting the spellcheck language I want?

    I have a few languages installed, and Firefox's spellcheck seems to decide which language to use ''at random''. So I have to keep manually selecting the language I want. 99% of the time I want English. So how can I set English as a permanent default language, and leave the manual selection for those infrequent occasions when I want another language spellchecked?

    Firefox should store the last used dictionary in the spellchecker.dictionary pref that you can check on the about:config page.
    *http://kb.mozillazine.org/about:config
    If you do not keep changes after a restart then see:
    *http://kb.mozillazine.org/Preferences_not_saved
    *https://support.mozilla.org/kb/Preferences+are+not+saved
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode

  • How to convert an excel file where customers have partial access for selecting items.

    Please Advise,
    I have created an excel file with columns that calculates price and quantity. I need to know how my customers can access the file without seeing all my calculations, etc. and just select the number of items. I need to keep my excel formula info confidential and at the same time having the customers the ability to select the items.
    This excel file will be placed on my web site and linked where customers have access to it. They make their selections and emailed back for processing.with their selected items. If the excel file is converted into a pdf file, Then placed and linked for customer access how can customers have partial access and select in certain columns and have excel fuction for calculations?
    Thanks,
    Dan

    [discussion moved to Creating, Editing & Exporting PDFs forum]

  • When I select a title in the iTunes Store and click on Play in iTunes I am sent to the download page for iTunes 10 which I have already. The selected title cannot be found anywhere in my iTunes. How can I get the title in iTunes with possibility to buy it

    When I select a title in the iTunes Store and click on Play in iTunes I am sent to the download page for iTunes 10 which I have already. The selected title cannot be found anywhere in my iTunes. How can I get the title in iTunes with possibility to buy it?

    The issue is that your credit or debit card credentials must be associated with the same country where you reside in order to purchase iTunes content.
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location. You can use the iTunes Store in all countries of which you’re a resident, but you’ll either need a separate iTunes Store account for each one, or you’ll need to continually be switching the billing information on your single account. Generally, it’s simpler just to set up an alternative account for these situations, although it’s worth nothing that features like iTunes in the CLoud and iTunes Match are designed to work best when using a single iTunes Store account, as you can only switch accounts with these services every 90 days."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article

  • How to have a selection screen in the smartform

    Hi,
    <i><b>How to have a selection screen in the smartform. <u>Could anybody share with the example of driver program and the smart forms</u> . Please send me ASAP</b></i>
    Thanks
    Shiva shekar

    Hi,
    Refer to this
    http://www.****************/Tutorials/Smartforms/SFMain.htm
    Thanks,
    Anitha

  • HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID?

    HI.
    HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID????
    GABRY =)

    You need to use
    data : grid1  type ref to cl_gui_alv_grid.
      call method grid1->get_selected_rows
        importing
          et_index_rows = i_sel_alvrows[].

  • How to put Layouts in selection screen for ALV

    Dear All,
    I have developed an ALV report . The users will create many layouts and save it. The requirement is that:
    In the selection screen , they need to get the list of saved layouts and select one from that so that they need not have to select layout after running the report.
    That means .. they want to select the layout before running the report.
    Hope that you understood my problem and will help me out...
    Thanking you,
    Shankar

    Hi,
    PARAMETERS P_LAYOUT LIKE DISVARIANT-VARIANT.
    INITIALIZATION.
    *Get Default display variant
    PERFORM F100_DISPLAY_DEFAULT_VARIANTS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAYOUT.
    *Value Help for Layouts
    PERFORM F1001_VALUE_REQUEST.
    *&      Form  F100_DISPLAY_DEFAULT_VARIANTS
         Initializing ALV Values                                        *
    FORM f100_display_default_variants.
      w_variant-report   = sy-repid.
      w_variant-handle   = c_handle.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save        = c_a
           CHANGING
                cs_variant    = w_variant
           EXCEPTIONS
                wrong_input   = 1
                not_found     = 2
                program_error = 3
                OTHERS        = 4.
      IF sy-subrc EQ 0.
        p_layout = w_variant-variant.
      ENDIF.
    ENDFORM.
    *&      Form  F1001_VALUE_REQUEST
          Get the values for the layout.
    form F1001_VALUE_REQUEST.
      DATA:  lv_exit        TYPE c,
             lw_variant    LIKE w_variant.
      w_variant-report   = sy-repid.
      w_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant    = w_variant
                i_save        = c_a
           IMPORTING
                e_exit        = lv_exit
                es_variant    = lw_variant
           EXCEPTIONS
                not_found     = 1
                program_error = 2
                OTHERS        = 3.
      IF sy-subrc IS INITIAL.
        IF lv_exit IS INITIAL.
          p_layout = lw_variant-variant.
        ENDIF.
      ELSE.
        MESSAGE i029."No layouts found
      ENDIF.
    endform.                    " F1001_VALUE_REQUEST
    Hope this helps.
    Regards,
    J.Jayanthi

  • How to have "new folder" command automatically select "untitled folder"?

    How to have "new folder" command highlight name change?
    On a couple of my Macs, when I give a "new folder" command, the "untitled folder" name is immediately selected/highlighted for immediate entry of the new name for the folder.
    On other Macs I have, when I give a "new folder" command, I must then manually select the "untitled folder" name before I can type in the new name.
    Does anyone know how to set my Finder so that when I give a "new folder" command it will be immediately highlighted/selected for entry of the new name?
    I'm using the latest OS-X on all of my Macs.

    ZDHart wrote:
    How to have "new folder" command highlight name change?
    On a couple of my Macs, when I give a "new folder" command, the "untitled folder" name is immediately selected/highlighted for immediate entry of the new name for the folder.
    On other Macs I have, when I give a "new folder" command, I must then manually select the "untitled folder" name before I can type in the new name.
    Does anyone know how to set my Finder so that when I give a "new folder" command it will be immediately highlighted/selected for entry of the new name?
    I'm using the latest OS-X on all of my Macs.
    Welcome to Apple Discussions:
    All my Macs select the name in the untitled folder for immediate renaming.
    Exactly what happens when your Mac does not allow immediate renaming? The only way this happens is if the folder loses focus, which can happen if another app is running and takes focus, or if you click the mouse somewhere.

Maybe you are looking for