How to include or exclude standard function button easily

Hi everyone,
When I am doing some coding concerning ALV GRID,I found that there are many standard button on
the toolbar, and I want maybe 2 or 3 of them to be used,others just not displayed on the toolbar.
And if I want the others disappeared I should do a lot of append work area to internal table things to
exclude them ,sometimes it is not easy to figure out that the buttons correspond to which functions.that is not convenient. 
  are there any ways to achieve that?
thanks for your help.
Edited by: Aaron Shen on Dec 3, 2008 7:48 AM

FCODE TYPE  UI_FUNCTIONS,
       WFCODE TYPE UI_FUNC.
**********EXCLUDING FUNCTION CODE IN GRID TOOLBAR****************
WFCODE = cl_gui_alv_grid=>mc_fc_loc_copy_row.
   APPEND WFCODE TO FCODE.
  WFCODE = cl_gui_alv_grid=>mc_fc_loc_delete_row.
  APPEND WFCODE TO FCODE.
  WFCODE = cl_gui_alv_grid=>mc_fc_loc_append_row.
  APPEND WFCODE TO FCODE.
  WFCODE = cl_gui_alv_grid=>mc_fc_loc_insert_row.
  APPEND WFCODE TO FCODE.
  WFCODE = cl_gui_alv_grid=>mc_fc_loc_move_row.
  APPEND WFCODE TO FCODE.
CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
     EXPORTING
      I_BUFFER_ACTIVE               =
      I_BYPASSING_BUFFER            =
      I_CONSISTENCY_CHECK           =
      I_STRUCTURE_NAME              = 'MARA'
       IS_VARIANT                    = SLAYOUT
       I_SAVE                        = 'U'
       I_DEFAULT                     = ' '
      IS_LAYOUT                     =
      IS_PRINT                      =
      IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          = FCODE----
> pass fcode here
      IT_HYPERLINK                  =
      IT_ALV_GRAPHICS               =
      IT_EXCEPT_QINFO               =
      IR_SALV_ADAPTER               =
     CHANGING
       IT_OUTTAB                     = imara[]
       IT_FIELDCATALOG               = FIELDCAT
       IT_SORT                       = ISORT
      IT_FILTER                     =
    EXCEPTIONS
      INVALID_PARAMETER_COMBINATION = 1
      PROGRAM_ERROR                 = 2
      TOO_MANY_LINES                = 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.

Similar Messages

  • How develop INCLUDE ZXMRMU01 in standard function 'EXIT_SAPLBARM_001'.

    Hi all,
    now in standard have function: EXIT_SAPLBARM_001
    i want develop INCLUDE ZXMRMU01 .
    when i double click INCLUDE ZXMRMU01 have warring 'Program names ZX... are reserved for includes of exit function groups'
    how i create or develop  INCLUDE ZXMRMU01 ??
    how create program and this program know  INCLUDE ZXMRMU01 ??
    pls help me, or step by step doing ...
    thanks so much/Tham.

    hai,
    i thing you have a worning message in your status bar. when you get this warning message simply press enter button it will open.......
    regards,
    jai.m
    points reward for usefull answer....

  • How to include and exclude external infoobject values in a hierarchy

    Hello experts,
    I'm working with hierarchies and the problem I have is that I don´t know how to include nor exclude a value in the definition of the hierarchy.
    For example, I want to show in a query some cost elements related to some functional areas, so I've created a hierarchy for md funcional area. But I don't want to show every cost element related to one functional area but only some of them. I've defined 0costelmnt as a external characteristic for 0func_area infoobject so that I can specify in the hierarchy the cost elements I want to show. But it doesn´t work, in the report all cost elements are showed. How can I specify the ones I want to show?
    thank you very much.

    Any ideas please?

  • How to code in the standard refresh button in ALV toolbar

    Hi Experts,
    My ALV includes some standard toolbar buttons like refresh, select all, sort, and etc. How can I put logic into the refresh button such that when user click on the refresh button, I want to run some logic on my own?
    THanks in advance.

    Hi again,
    1. Further to my previous reply
    2. This code will make it clear.
    3. just copy paste
    a. Before that, copy the SALV Standard Toolbar to ABCD as suggested before.
    <b>Important & Relevant code has been marked in bold.</b>
    4.
    report abc.
    type-pools : slis.
    Data
    data : itab like t001 occurs 0 with header line.
    DATA : fc type SLIS_T_FIELDCAT_ALV.
    Logic
    select * from t001 into table itab.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        I_PROGRAM_NAME         = sy-repid
        I_INTERNAL_TABNAME     = 'ITAB'
        I_INCLNAME             = SY-REPID
      CHANGING
        CT_FIELDCAT            = fc
      EXCEPTIONS
        INCONSISTENT_INTERFACE = 1
        PROGRAM_ERROR          = 2
        OTHERS                 = 3.
    Display
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             =  SY-REPID
    <b>   I_CALLBACK_PF_STATUS_SET       = 'MYSTATUS '</b>
    <b>   I_CALLBACK_USER_COMMAND        = 'MYFORM'</b>   IT_FIELDCAT                    = FC
      TABLES
        T_OUTTAB                       = ITAB
    EXCEPTIONS
       PROGRAM_ERROR                  = 1
       OTHERS                         = 2
    <b>
    IMPORTANT
    This sets the PF Status on ALV Screen
    And not Selection screen
    FORM MYSTATUS USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ABCD'.
    ENDFORM.                    "MYSTATUS
    IMPORTANT
    When Fcode is pressed on ALV Toolbar
    FORM MYFORM USING r_ucomm LIKE sy-ucomm
                                       rs_selfield TYPE slis_selfield.
      IF R_UCOMM = 'ZREFRESH'.
    *----CODE
      ENDIF.
    ENDFORM.                    "MYFORM</b>
    regards,
    amit m.

  • How to include segments to  standard idoc PEXR2002 ..

    How to include the below segments to the standard  idoc PEXR2002 ..
    E2EDK02
    E2EDK12
    I want to map the check number to E2EDK12-BELNR depending on the document number.
    I have a recording in shdb..but my real question is it where to have this logic..
    Any suggestion would be highly appreciated.
    Thanks,

    U will have to create IDoc Extension for this.
    Goto WE30 select the Radio button Extension.
    Link it with the basic Idoc Type.
    Then attach the new segments in the IDoc.

  • How to find query_only and standard functions (AOL)

    Hi,
    There are many functions which are attached to menus and which inturn are attached to responsibility.
    Also, we can have a function view only by creating the same function by entering QUERY_ONLY="YES" in parameter.
    For ex:- I have a function called "Customers Standard" by which you can create customers. I can create another
    function using the same form and make it query only by entering QUERY_ONLY="YES" in the parameters column.
    My question is, I want to know for which responsibilities i have this query_only function attached and for
    which reponsibilities i have this normal standard function is attached to. If it is Query_only, then i want
    to populate a comment saying " Query Only Customer" and if not then populate with " Standard Customer Function".
    I wrote a query which displays all the menus, sub-menus and user-function-names for all responsibilities. But
    i need to populate another column with this "Query-only" or "Standard Customer" by checking the parameter values.
    Like this, i need to check for all like "customer" , "invoices", "order entry", "vendors" etc etc.
    If it is hard to understand my problem, to make it simple, " A query to Display all the menus, sub-menus, sub-sub-menus,
    user-function-names for all menus, sub-menus, sub-sub-menus for all reponsibilities. After writing this query,
    I want to populate one more column in which i want to display whether it is query_only or not_query_only."
    Help Appreciated
    Thanks

    Hi Adwinn,
    Do you have any query for this.
    For ex:- for AR reponsibility, the screen looks like this:-
    -Transactions
         Batches
         Batches Summary
         Transactions Summary
         Credit Transactions
    -Receipts
         Batches
         Batches Summary
         Receipts
         Receipts Summary
         Remittances
         Remittances Summary
    -Lockbox
              Transmission History
              Maintain Transmission Data
    -Collections
         Scheduler
         Customer Calls
         Customer Account
         Account Overview
         Aging
         Correspondence
    -Customers
         Standard
         Quick
         Summary
         Profile Class
         Merge     
    and so on.....
    In this, there are may be query_only functions created and attached to these menus. I need a report which shows me all the menus, sub-menus, sub-sub-menus and tell whether that is standard or query_only with that prompt description.
    for ex:- output:-
    AR reponsbility | AR_NAVIGATE_GUI | Customers | Standard | Customers-Standard-Query Only
    help appreciated
    thanks

  • ALV: Context Menu: Standard Functions: Copy to clipboard: How to throw?

    How can I throw the standard function "copy to clipboard"
    CL_GUI_ALV_GRID=>MC_FC_LOC_COPY <&LOCAL&COPY>
    If I try to throw it with the method
    <ref to cl_gui_alv_grid>->set_user_command(
    EXPORTING i_ucomm = cl_gui_alv_grid=>mc_fc_loc_copy )
    , it doesn't work.
    This standard function is a feature of every context menu of an ALV grid control.
    It is possible to inactivate it via the method
    <ref to cl_gui_alv_grid>->disable_functions
    , so it must be the right function code.
    I visited that the "application server is working"-logo
    (the blue waving-water-picture in the upper right corner of
    every SAP GUI window) doesn't move if I use this function via
    context menu.
    So possibly there is no server-turn-around between the
    presentation server an the application server when using this
    function. The application server only catches an event
    cl_gui_alv_grid_base=>evt_copy_clipboard_failed <34>
    on copy malfunction.

    Hi,
    there is a simple method to put something to the clipboad. I have done it a couple of times and it works fine.
    Data Definitions:
    DATA: BEGIN OF clippboard OCCURS 0,
            line(172) TYPE c,
          END OF clippboard.
    cnt1 type i.
    ABAP Example:
              refresh clippboard.
              append xx_outtab_pos-prodh to clippboard.
              CALL METHOD cl_gui_frontend_services=>clipboard_export
                IMPORTING
                  data = clippboard[]
                CHANGING
                  rc   = cnt1.
    In this example the content of the field xx_outtab_pos-prodh has been put to the clipborad and can be inserted anywhere by pressing Ctrl/V.
    If you want to restore it from the clipboard, there is a m
    ethod called cl_gui_frontend_services=>clipboard_import. It works the same as the clipboard_export.
    Best regards
    Peter

  • During MRP run unwanted plant and storage location include and exclude

    Hi There,
    During MRP run how to include and exclude the unwanted plant and storage location pls let me know the required configuration settings.
    Thanks in advance.

    HI,
    To control whether a particular storage location will be included or excluded from the MRP run.  (MD02/MD41).
    To exclude it from MRP run :-
    OMIR - Define storage location MRP per plant
    Put the MRP ind. as.         1 - storage location stock excluded for MRP
    To include it from MRP run:-
    OMIR - Define storage location MRP per plant
    Put the MRP ind. as.      space - storage location stock also planned at plant level and save it
    Next go to transaction MM01 - tick only view MRP 2
    Key in Plant and Storage Location
    Look at the Storage Location MRP section
    change the SLoc MRP indicator to space  and save it
    MMD1 - Create MRP Profile - MRP profile is a useful entry aid and makes it easier to manage MRP data.
    You define which fields are filled with values when MRP data is entered in the material master record, which of these values can be overwritten and which not.   You use the information stored in a profile is standard information that is needed again and again in similar constellations when material master records are maintained.
    Regards
    KK

  • IPhone 3G headset function button schematic

    Hey all. I am trying to figure a couple of things out in regards to the function button as on the standard iPhone headset.
    I have a motorcycle, and an older Autocom system (a helmet radio / voice switcher / etc), and am trying to integrate my iPhone. To do so, I need to make a male-male 3.5mm 4-pole TRRS cable, as nobody really seems to make one anywhere that I've been able to find. I've seen the various pin-outs for the wires if one wanted to simply go from connector A to connector B, but I am trying to find out how to wire in a function button (this way I can reject a call, pause playback, skip tracks, etc, without having to actually look at or touch the phone while I'm riding).
    I have found several pretty useful diagrams, the best of which is at this link:
    http://www.advrider.com/forums/showthread.php?t=276870
    The overall schematic of what I need to do here (as near as I can tell) is as follows:
    Tip (right speaker) --> Tip (right speaker)
    Ring1 (left speaker) --> Ring1 (left speaker)
    Ring2 (ground) --> Sleeve (microphone)
    Sleeve (microphone --> Ring2 (microphone)
    Supposedly one should be able to wire in a momentary switch, on the Ring2 and Sleeve wires. When this switch is activated, is how the phone interprets the function button being pressed, and does whatever it is the phone is programmed to do when that happens.
    What I am trying to figure out, basically, is how this switch works: a typical momentary switch is in either an always-open or always-closed state, and the switch action occurs when the circuit is either closed (as in an always-open switch) or opened (as in an always-closed switch). Push a button, switch is activated. Let go of the button, it returns to its normal default state.
    That would, however, imply that either Ring2 (ground, on the iPhone side), or Sleeve (the microphone, on the iPhone side) is either always disconnected, and the phone recognizes a function-button action when that circuit is completed momentarily; or, that the phone interprets a headset-function-button-push when that connection is interrupted. It could also be that the connections should be switched (Ring2 -> Ring2, Sleeve -> Sleeve) in order for that to happen. I really don't know.
    Does anybody here have any insight? In a nutshell, what I am trying to find out is how the iPhone recognizes that the function button on the headset has been pushed.
    Thanks very much, all!
    Dan

    Nevermind, actually, I just answered my own question, sorry everyone.
    If anyone is curious, shorting out the microphone signal to the ground is what activates the function button.
    Doh!

  • URGENT can anyone let me know how to include sort buttons in table maintian

    hi
    can anyone let me know how to include sort buttons in table maintianence
    as generally table maintianec done have sort buttons i need to include the sort buttons kindly let me know on that asap
    or can we use module pool in between table maintianece screen
    if yes how touse and how to cod for that
    regards
    Arora

    You can change the coding of Table Maintenance.
    >> Goto SM30, give table name and goto Display/Maintain mode and copy all the GUI status from standard program into your function group. Add sort button in the GUI Status of Maintain & Display mode.
    >> Goto to tablemaintenance screen generated using SE51.
    >> Select change mode.
    >> After PROCESS BEFORE OUTPUT, create one module to assign your function group program name to " X_HEADER-GUI_PROG = "
    >> In PROCESS AFTER INPUT, add another module at the end to perform the action.
    -Alpesh.Saparia

  • How to include a new Z Partner Function in Sales order header drop down lis

    Hello SAP experts,
    We have come up with a new requirement to include a custom Partner Function-ZI  in dropdown of SO header-Partners field.
    Current scenario- Presently we are maintaining this partner function  ( Say ZI-  Institute ) in customer master data-Sales area tab.There could be more than one partners under this PF in master data. While entering sales Order, all partners associated are displayed in Header- partners tab, where only SP, SH, BP, PY partner functions are displayed.
    Requirement- 1. Is to  provide Drop down of this ZI-Institute partner function (which I did not find presently) in SO header-partners field and user should be able to provide one of partner function as available in Customer master ( as there are more than one partners that can be set in Customer master data but user need to be able to provide ONE of this ZI partner fucntion in DROPDOWN of PF tab in SO header ).
    2. In addition, How can I link this new partner function in related sales reports against that particulat order and invoice?
    Kindly suggest your valuable inputs as what should be the procedure to get this.
    Many thanks in advance.

    Hi,
    Go to partner determination by VOPA
    OR
    IMG >> SD >> Basic function >> Set up partner functions >> set up partner function for sales document header
    click on partner function and Maintain partner function ZI  and back
    Then select your existing partner determination procedure (Standard is TA) and click on PARTNER FUNCTIONS IN PROCEDURE and add partner function. and make it mandatory so even user forget to mention then at the time of saving system can remind user 
    Then double click on PARTNER DETERMINATION PROCEDURE ASSIGNMENT
    Assign partner procedure to sales document
    Now when you creating sales order go to header partner tab and enter you institute partner number
    For sales order and invoice report
    Execute this report by selecting partner function ZI in VA05N and VF05 respectively
    kapil

  • The Problem is about Standard Back Button Function in Report Program

    The Problem is about Standard Back Button Function in the Report Program.
           In the Report,First call screen Then Using "write" output some information,That is ok. but In the GUI When I press back button that is standard button,it exit screen to program.
           My question is how can i do When i press back button,the screen can be back forward first screen instand of exit screen to program.  Thanks .

    This problem is solution.I call screen using T-code and submit report In PAI,at last return to PAI.That is OK.

  • The Problem is about Standard Back Button Function in the Report Program.

    The Problem is about Standard Back Button Function in the Report Program.
    In the Report,First call screen Then Using "write" output some information,That is ok. but In the GUI When I press back button that is standard button,it exit screen to program.
    My question is how can i do When i press back button,the screen can be back forward first screen instand of exit screen to program. Thanks .

    Hi,
    You can define your own PF-STATUS and in that assign the function code for BACK button anything except 'BACK'.
    The code would somewhat look like this:
    SET PF-STATUS 'TEST'.
    write : itab-col1,
               itab-col2.
    in the PF-STATUS 'TEST', assign the function code to BACK button as 'BCK'.
    Now in your program you can use the event AT USER-COMMAND.
    In this you can handle the functionality of BACK button.
    Hope this helps.
    Regards,
    Himanshu

  • How to remove the the standard button APPEND/INSERT/DELETE in webdynpro alv

    Hello,
    how to remove the the standard button APPEND/INSERT/DELETE in webdynpro-abap  alv
    Thanks
    Rakshar

    Use  this.
        data lo_cmp_usage type ref to if_wd_component_usage.
        lo_cmp_usage =   wd_this->wd_cpuse_alv1( ).
        if lo_cmp_usage->has_active_component( ) is initial.
          lo_cmp_usage->create_component( ).
        endif.
        data lo_interfacecontroller type ref to iwci_salv_wd_table .
        lo_interfacecontroller =   wd_this->wd_cpifc_alv1( ).
        data lo_value type ref to cl_salv_wd_config_table.
        lo_value = lo_interfacecontroller->get_model(
        data: lr_std type ref to if_salv_wd_std_functions.
        lr_std ?= lo_value.
        lr_std->set_export_allowed( abap_false ).
    NOte: ALV1 is alv component name
    Regards
    Srinivas
    Edited by: sanasrinivas on Dec 1, 2011 6:11 AM

  • How can i extend the filter function to also include an option to select which column to filter on?

    Hi.
    I have built an spry test-page (testing it on my localhost  so i cannot give you direct access to it) here i have an XML file that i show in an dynamic/ repeat table with 5 columns.
    I hvae included an spry filter function to easy filter out records, but the code only allows me to filter on one of the columns.
    I would like to add an extra "select-menu" to define which column the filter should be active for, how can i do that
    Here is the filter code and also the html code for the select-menu and the box to type in what to filter.
    The bold parts is the important parts, i would like the options values from the select menu to be inserted in the filterData function to be able to define which column to do the filtering on.
    var ds1 = new Spry.Data.XMLDataSet("report3.xml", "orders/order", {sortOnLoad: "@id", sortOrderOnLoad: "descending"});
    ds1.setColumnType("date", "date");
    ds1.setColumnType("BUTIKNR", "number");
    ds1.setColumnType("EXTRAFRAKT", "number");
    ds1.setColumnType("job/@idx", "number");
    var jobs = new Spry.Data.NestedXMLDataSet(ds1, "job");
    function FilterData()
        var tf = document.getElementById("filterTF");
        var menu = document.getElementById("searchIdent");
        if (!tf.value)
            // If the text field is empty, remove any filter
            // that is set on the data set.
            ds1.filter(null);
            return;
        // Set a filter on the data set that matches any row
        // that begins with the string in the text field.
        var regExpStr = tf.value;
        if (!document.getElementById("containsCB").checked)
            regExpStr = "^" + regExpStr;
        var regExp = new RegExp(regExpStr, "i");
        var filterFunc = function(ds, row, rowNumber)
            var str = row["@id"];
            if (str && str.search(regExp) != -1)
                return row;
            return null;
        ds1.filter(filterFunc);
    function StartFilterTimer()
        if (StartFilterTimer.timerID)
            clearTimeout(StartFilterTimer.timerID);
        StartFilterTimer.timerID = setTimeout(function() { StartFilterTimer.timerID = null; FilterData(); }, 100);
    html:
                <select name="searchIdent" size="1" id="searchIdent">
                    <option value="@id" selected="selected">ID</option>
                    <option value="date">DATUM</option>
                    <option value="time">TID</option>
                    <option value="BUTIKNR">BUTIK</option>
                    <option value="REF">REFERENS</option>
                  </select>
              <input type="text" id="filterTF" onkeyup="StartFilterTimer();" />
    Contains:
      <input type="checkbox" id="containsCB" /></td>
    Thanks in advance.
    //Rickard H

    Now it works, i had to do it like this:
        var filterFunc = function(ds, row, rowNumber)
            var str = row["@id"];
            if (str && str.search(regExp) != -1)
                return row;
            var str1 = row["date"];
            if (str1 && str1.search(regExp) != -1)
                return row;
            var str2 = row["time"];
            if (str2 && str2.search(regExp) != -1)
                return row;
            var str3 = row["BUTIKNR"];
            if (str3 && str3.search(regExp) != -1)
                return row;
            var str4 = row["REF"];
            if (str4 && str4.search(regExp) != -1)
                return row;
            return null;
    I also had to remove the line "ds1.setColumnType("BUTIKNR", "number");" from the code, otherwise it would not search at all (only searches string types?).

Maybe you are looking for

  • Mass Printing of Journal Entries

    Good Morning. I'm trying to figure out how to print a large number of journal entries without having to click on each one individually, but am having difficulty figuring this out. I need the Journal Entry/Document print out to match how the print out

  • New version of yahoo mail - completely blank contact page (no tabs,columns, or contacts) but on internet explorer works fine

    I just got the newest version of Yahoo Mail and on Internet Explorer everything works fine. On Firefox, the contact page is completely blank ( no tabs, columns, or contact information)

  • XSD to SQL?

    I've been trying to figure this stuff out by myself for a while now but the tech. jargon is throwing me. Please help. I was wondering how to go about turning an XSD into a bunch of CREATE TABLE SQL statements?? I don't wish to use the XML DB, just a

  • Why are Adobe lying thieves?

    I cancelled a product I no longer used. I stopped using it a couple years ago. They love taking your money, and they love sending emails, but notice they NEVER send an email thanking you for another year's subscription when it might alert you to the

  • Safari suddenly displaying pages in a strange font

    There are 3 users on my system and this is just affecting me. When I go to any web page what would normally be shown in a normal font has been changed to an almost unreadable one. It's not all the text on the page, and some pages are a lot worse than