How can we use the saved alv grid layout in a report?

I have a requirement where I go to se16n transaction and select a few fields of a table and extract the data of the table. Again I re-arrange the columns in the report and save it as a variant along with this new layout. Now how to call this variant in a report wherein I want only the re arranged positions of the column(fields) of the field catalog? Is there any function module available?

hi,
you can have selection screen field : "parameters : p_disvar like disvariant-variant."  and at event selection scree you can call the below function and select the variant create for the report.
"at selection-screen on value-request for p_disvar.
  call function 'REUSE_ALV_VARIANT_F4'
       exporting
            is_variant          = g_variant
          I_TABNAME_HEADER    =
          I_TABNAME_ITEM      =
          IT_DEFAULT_FIELDCAT =
            i_save              = g_variant_save
       importing
            e_exit              = h_exit
            es_variant          = gx_variant
        exceptions
            not_found           = 1
            program_error       = 2
            others              = 3.
  if sy-subrc is initial and h_exit is initial.
    g_variant-variant = gx_variant-variant.
    p_disvar          = gx_variant-variant.
  else.
    message id sy-msgid type 'S'
                 number sy-msgno
                 with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
Atul

Similar Messages

  • How can i use "GT_SORT"  in alv  ?

    hello  ,
    i need to sort alv report by some fields  .
    i use   :
    GT_SORT-FIELDNAME = 'FRGGR'.
    GT_SORT-TABNAME = 'G_TABNAME_ITEM'.
    GT_SORT-SPOS = 1.
    GT_SORT-UP = 'X'.
    GT_SORT-SUBTOT = 'X'.
    GT_SORT-GROUP = '*'.
    APPEND GT_SORT.
    the alv is "REUSE_ALV_HIERSEQ_LIST_DISPLAY"
    but i don't see the change  , what i doing wronge ?

    Hi dakota,
    what are the results of the forum search you di before posting the question?
    Regards,
    Clemens
    Expert Forums
    Forum Search
    Use the form below to search the forum content. You can choose to search all content or restrict it to certain forums or dates. Also, you can filter the results by a username or user ID.
    Search Forum Content
    Search Terms:        Search Tips
    Category or Forum:      
    Date Range:      
    Results Per Page:      
    Welcome, Clemens Li      Help
    Your Control Panel      Your Control Panel
    Your Reward Points      Your Reward Points
    Your Questions      Your Questions
    Search Results » Messages: 339 - Search Terms: GT_SORT      Sort by:
    Pages: 23 1 2 3 4 5 6 7 8 9 10
       1. Re: how can i use "GT_SORT" in alv ?
          Posted on: Jul 15, 2007 3:50 PM, by user: Kiran Sure(skk) -- Relevance: 100% -- Show all results within this thread
          Hi, GT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE, GT_SORT-FIELDNAME = 'UOM'. GT_SORT-TABNAME = '1'. GT_SORT-SPOS = 1. GT_SORT-UP = 'X'. GT_SORT-SUBTOT = 'X'.
    Reward points ...   2. Re: "Totals" option in Hierarchical List
          Posted on: Feb 7, 2006 8:40 PM, by user: John Jakabcsin -- Relevance: 17% -- Show all results within this thread
          Vicky, The SORT table is the device that allows the ALV tree to paint in it's hierarchial fashion. Your source might look like this: FORM set_sorting TABLES gt_sort STRUCTURE lvc_s_sort. g ...
       3. Re: Regarding ALV Report
          Posted on: Mar 14, 2007 7:36 AM, by user: Azeem Mohammed -- Relevance: 15% -- Show all results within this thread
          GT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE, GT_SORT-FIELDNAME = 'UOM'. GT_SORT-TABNAME = '1'. GT_SORT-SPOS = 1. GT_SORT-UP = 'X'. GT_SORT-SUBTOT = 'X'. Then in FCAT use parameter do ...
       4. Re: ALV display
          Posted on: Aug 31, 2006 1:33 AM, by user: Kishore Maddu -- Relevance: 10% -- Show all results within this thread
          in your example you can see passing sorting table GT_SORT to reuse_....grid function module... just copy that program to one z program and commet and gt_sort parameter and then check... please ...
       5. Re: How to remove horizontal lines in ALV_LIST
          Posted on: Feb 15, 2006 12:48 PM, by user: Hymavathi Oruganti -- Relevance: 10% -- Show all results within this thread
          just check whether in gt_sort if u have mentioned gs_sort-group = 'UL'
       6. Re: Problem Saving ALV Report
          Posted on: Feb 7, 2007 4:12 PM, by user: Clemens Li -- Relevance: 10% -- Show all results within this thread
          Hi Anwarul, parameter it_sort = gt_sort[] will overrirde the sort in the variant. Regards, Clemens ...
       7. Re: Subtotals in ALV
          Posted on: Dec 13, 2006 6:15 PM, by user: krk -- Relevance: 10% -- Show all results within this thread
          Hi You have gs-sort and gt_sort. Make sure which one you are passing and declare the type as for that FM LIST_Display. ...
       8. Re: ALG Grid Same values not grouped!
          Posted on: Mar 17, 2006 11:23 AM, by user: Kumar Prashanth -- Relevance: 9% -- Show all results within this thread
          set_table_for_first_display EXPORTING i_save = gv_save is_layout = gv_layout is_print = gv_print is_variant = gv_variant CH ...
       9. Re: Total amount in ALV report
          Posted on: Dec 12, 2005 9:41 PM, by user: Phani Kiran Nudurupati -- Relevance: 9% -- Show all results within this thread
          Hi Naren, Pass it this way in the structure. DATA: GT_SORT TYPE SLIS_T_SORTINFO_ALV, DATA: GS_SORT TYPE SLIS_SORTINFO_ALV. CLEAR GS_SORT. GS_SORT-FIELDNAME = 'EBELN'. "This should be the fie ...
      10. Re: ALV Subtotal
          Posted on: May 2, 2007 11:29 PM, by user: Alchemi -- Relevance: 8% -- Show all results within this thread
          I have this in one include program GT_SORT_OFFSET TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE, can i email u the code? ...
      11. Re: ALV Tree Problem
          Posted on: Mar 20, 2007 6:49 PM, by user: Christian CHOULET -- Relevance: 8% -- Show all results within this thread
          Hello aRs, Yes i'm sure KOSTL is available in WT_TEST. The problem is that when i another element in GT_SORT, this error appears... Thanks anyway ...
      12. Re: subtotal calculation in ALV
          Posted on: Nov 14, 2006 5:35 PM, by user: Narendran Muthukumaran -- Relevance: 8% -- Show all results within this thread
          Hi, 1) Create a sort internal table for you to do sub totaling based on the field change..In this example..I have created a sort internal table and it will sum for every change in the field VBELN. ...
      13. Re: ALV grid sort
          Posted on: Oct 4, 2006 1:22 PM, by user: sreejesh purapadiath -- Relevance: 7% -- Show all results within this thread
          set_table_for_first_display EXPORTING is_layout = gs_layout it_toolbar_excluding = gt_excl_func[] CHANGING it_outtab = i_final[] ...
      14. Re: ALV Print about subtotal
          Posted on: Dec 17, 2005 11:35 AM, by user: max bianchi -- Relevance: 7% -- Show all results within this thread
          Hi In the sort table you has to define the field for sorting and subtotal: DATA: LT_SORT TYPE LVC_S_SORT, GT_SORT TYPE LVC_T_SORT. LT_SORT-SPOS = 1. LT_SORT-FIELDNAME = . LT_SORT-UP ...
      15. Re: Subtotals text in ALV
          Posted on: Feb 14, 2006 11:53 AM, by user: Wenceslaus G -- Relevance: 7% -- Show all results within this thread
          To display subtotal text you have to create sort interface GT_SORT TYPE SLIS_T_SORTINFO_ALV, and GS_SORT-FIELDNAME = 'FIELD1'. GS_SORT-SPOS = 1. GS_SORT-UP = 'X'. GS_S ...
    Pages: 23 1 2 3 4 5 6 7 8 9 10

  • How can I call functionality of ALV Grid by event of button outside grid?

    Hello,
    How can I call functionality of ALV Grid by event of button located outside ALV Grid? For example how to fire printing of this ALV Grid by button click elsewhere on the screen (not in toolbar of ALV Grid).
    Best regards,
    Josef Motl

    hi Motl,
    these are steps to create a button in ALV and trigger an event from it..
    1.Use the parameter i_callback_pf_status_set in the function module REUSE_ALV_GRID_DISPLAY
    i_callback_program = gd_repid
    i_callback_pf_status_set = 'SET_PF_STATUS'
    form set_pf_status using rt_extab type slis_t_extab.
    set pf-status 'NEWALVSTATUS'.
    endform.
    You have to copy the standard ALV pf stauts to 'NEWALVSTATUS' and add your button.
    2.You have to do the following to process the new button click.
    i_callback_user_command = 'USER_COMMAND'
    form user_command using i_ucomm like sy-ucomm
    is_selfield type slis_selfield.
    case i_ucomm.
    3. to copy the standard pf status to a new one.go to the ALV screen and take the menu System -> Status.  Then look for the standard pf status. Copy this to Z range and then add your new button.
    reward points if helpful
    regards
    satesh

  • How can we use the same package in our report used by some other report

    how can we use the same package in our report used by some other report

    Hi,
    You just need to assign package while saving your report.
    No extra is required providing you are aware of package to be used.

  • How can I initiate the saving of a site password?

    I want to be able to initiate the saving of passwords for sites. At the moment sometimes Firefox asks if I want a password saved and sometimes not. How can I start the saving process when Firefox doesn't ask?

    Some web sites tell browsers not to remember passwords by using '''autocomplete="off" ''' on the login page, which tells the browser not to save the password for that page. This bookmarklet makes the browser ignore autocomplete="off" temporarily, allowing you to save passwords even on sites that use autocomplete="off".
    Remember Password bookmarklet: <br />
    https://www.squarefree.com/bookmarklets/forms.html#remember_password <br />
    Just drag that Bookmarklet in to your bookmarks, toolbar or drop-down list, and click that Bookmarklet like you would click on a bookmark '''before''' you you submit your login to the website.
    Or you can use the Saved Password Editor extension to manually add a username / password into Firefox. <br />
    https://addons.mozilla.org/en-US/firefox/addon/60265

  • How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    read this
    https://discussions.apple.com/message/20429789#20429789

  • How can I use the print module to print different size images on one large "canvas"?

    How can I use the print module to print different size images on one large "canvas"? An example would be in Photoshop, go to file>new, and create the size paper I want, and move images of different sizes onto it.
    I was thinking the print module would do this automatically for me.

    You can't, at present. It's been a requested feature, so we'll see if it shows up in a future version, but it's not there at present.

  • How can I use the QR codes with my iPad 2. do I need to download first an app ?

    How can I use the/read the QR codes with my iPad 2 ? Do I need to download an app ?

    Yes.  There are quite a few available for free in the app store

  • I have an Apple MacBook Pro with 2 USB ports and a MiniDisplay Port. I also have an HDTV with a HDMI port. How can I use the TV as a display without any tethering wires between my computer and the TV?

    I have an Apple MacBook Pro with 2 USB ports and a MiniDisplay Port. I also have an HDTV with a HDMI port. How can I use the TV as a display without any tethering wires between my computer and the TV? I have a MiniDisplay Port to VGA adapter, but there are two issues with it: The new display doesn't have a VGA port, and even if it did, I wouldn't want to have my mac constantly attached to the display by a cable. I was looking for a way to use the TV as a display without any wires. Is there some type of bluetooth setup I could use? Please let me know if you have any suggestions.

    As I wrote above, I think you should look into the Apple TV yourself. The best place to find information about what it can and can't do and to ask your own specific questions is probably in the Apple TV forum, here:
    https://discussions.apple.com/community/appletv/appletv

  • HT4314 I have a game under one account, now I have an Itunes card under a different account, how can I use the $$$ in the card for the game I'm playing, I need to purchase different items for my game.

    I have been playing a game for a while under an account, now I have an Itunes card under a different account and would like to use that $$$ to purchase items for my game, but it doesn't let me because the game was downloaded under the original account. How can I use the $$$ in my new account?

    same here but i cant purchase a movie or anything

  • How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?

    With Acrobat 6.0 I was able to copy a stamp in the same position (I mean "exactly" the same one) of different pages just by using the "copy/past" tool.
    Now I am using Acrobat XI and it seems like it is not possible anymore: I am copying a stamp and I am trying to past it in anoter page, but it appears in the center of the page (or wherever it wants to...).
    Does anyone have a solution?
    Thanks in advance.

    Thank you very much. I'll be waiting for you message.
    Messaggio originale----
    Da: [email protected]
    Data: 26/01/2015 17.56
    A: "Umberto Gangi"<[email protected]>
    Ogg:  How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?
        How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?
        created by Gilad D (try67) in Creating, Editing &amp; Exporting PDFs - View the full discussion
    Well, I was in the same situation so I've developed a tool that allows one to do it. I will send you some additional information about it in a private message.
         If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7132586#7132586 and clicking ‘Correct’ below the answer
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7132586#7132586
         To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, &amp; "Stop Following"
         Start a new discussion in Creating, Editing &amp; Exporting PDFs by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    Thank you KiltedTim!
    YES, that is the free 5GB icloud memory for each apple ID. Can I not add the free 5Gb of my second Iphone to my original apple ID (5GB also) as I want to use one Apple ID name on both 2 Iphones? Is it necessary to have a different apple ID for the second Iphone to avail the free 5GB it carries with it?

  • How can i use the iCloud

    how can i use the iCloud,i can't find the icon which should need i download

    system preferences - internet & wireless section - iCloud

  • I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    Contacts are designed to be synced to a supported application on the computer or a cloud service.
    Pictures taken with the device are designed to regularly be copied off the device to a computer as would be done with any digital camera.
    If you have failed to use the device as designed it may be too late to recovery anything.
    Is the device regularly backed up to a computer via iTunes?  If so, the most recent backup (when restored to a replacement iOS device) should contain all contacts and pictures as of when the backup was created.

  • How can i use the apps i have downloaded on itunes

    how can i use the apps i have downloaded on itunes

    Apps downloaded through iTunes will only run on iOS devices such as iPhones, iPod Touch, and iPads. Plug your device into your computer, open iTunes, and click on it in the bar either at the top or the left side. Then, click apps at the top, and click install next to the app you want installed.
    If you are looking for apps to run on your Mac, you need to download them through the Mac App Store, not through iTunes.

Maybe you are looking for

  • Reports 3.0.5 and Excel Format Report Generation

    Hi Folks, I need to create excel format report on my Windows based OS using Report Desiginer 3.0.5. Can someone help in this matter as urgent as possible? Your help will highly be appreciated. Thanks Zahir

  • M/S Visual C++ runtime error message when trying to start iTunes

    I deleted the Yahoo toolbar from Internet Explorer via the add/remove programs function. Now whenever I try to start iTunes, I get a Windows error message stating "Microsoft Visual C++ runtime library Runtime Error! Program: C:\Program Files\iTunes/i

  • WBS element does not belong to business area(Message No: CJ067)

    Hi All, While doing Billing through DP91 by giving the Sales Order No., it is giving the error "WBS element *****does not belong to business area** ". The configuration between Business Area and Plant in Enterprise Structure level is fine. Do let us

  • CRM FAQ Signup Thread

    Hello Everyone, I moving the signup for building CRM Technical FAQ into this thread.  We will keep the list here until we get something more formal.  I will update thread based on your posts below. I will try to "bump" this up every week. More than o

  • How to show folders first in finder

    How can i setup my finder to show Folders first? I want it to always show the folders first in any folder on my mac. How can i do that?