Custom button in alv and disabling all buttons in application tool bar

Experts,
Could you please  help me for the below requirements.
1). How to disable all the buttons (like sorting, print, find, set filter...etc.) in tool bar using oops?
2). Where can I add my custom download button in alv report using oops?
Thanks in advance...
Sridhar..

Step1:
Create on local class
Class <LCL_EVENT_RECEIVER> Definition
Define the below public methods.
Method Name     HANDLE_TOOLBAR
Event Name     TOOLBAR
Event Class     CL_GUI_ALV_GRID
Importing     E_OBJECT, E_INTERACTIVE
Method Name     HANDLE_USER_COMMAND
Event Name     USER_COMMAND
Event Class     CL_GUI_ALV_GRID
Importing     E_UCOMM
Class <LCL_EVENT_RECEIVER> Implementation 
.     Method HANDLE_TOOLBAR
     Declare the structure <LS_TOOLBAR> of structure type STB_BUTTON
     Append the button information as given below into table E_OBJECT->MT_TOOLBAR to         display the custom button on ALV grid.
                           LS_TOOLBAR-FUNCTION = u2018DOWNu2019
                     LS_TOOLBAR-QUICKINFO = u2018downloadu2019
                     LS_TOOLBAR-TEXT = u2018downloadu2019
     Method HANDLE_USER_COMMAND
In this method if E_UCOMM = u2018DOWNu2019 write your logic.
Step2:
1.     To excluding the ALV grid buttons, fill the <LT_EXC> with function code CL_GUI_ALV_GRID=>MC_FC_EXCL_ALL
2.     To generate the ALV Grid, call the method SET_TABLE_FOR_FIRST_DISPLAY
Class     CL_GUI_ALV_GRID
Method Name     SET_TABLE_FOR_FIRST_DISPLAY
Exporting     
I_STRUCTURE_NAME      ZDS_CM_EXT_SEL
LS_LAYOUT                    <LS_LAYOUT>
IT_TOOLBAR_EXCLUDING     <LT_EXC>
Changing     
IT_OUTTAB                    <GT_EXT_SEL>
Create the Instance for class <LCL_EVENT_RECEIVER>
Class     <LCL_EVENT_RECEIVER>
Instance Name     <LO_EVENT_FNAME>
Now set handler  <HANDLE_USER_COMMAND> and <HANDLE_TOOLBAR_FNAME> events using instance <LO_EVENT_FNAME>
Call method 'SET_TOOLBAR_INTERACTIVE' to raise event TOOLBAR
Class     CL_GUI_ALV_GRID
Instance Name     <GO_GRID>
Method Name     SET_TOOLBAR_INTERACTIVE

Similar Messages

  • How to disable ikons on the Application tool bar in module pool

    Hi Guys,
    I am working in module pool.
    I had three ikons on the Application tool bar .
    i am creating transactions for create,change and display.
    for display transaction i want to disable the ikons on the Application tool bar .
    Can any one help me in this regard.
    Regards
    Ram
    Message was edited by:
            ram kumar

    Hi
    go to layout
    double click on the button
    it will display button properties
    in that below u will find 3 tab strips
    like
    dict program  display
    click on display
    click on check box for invisible
    so that will become invisible
    reward if usefull

  • Push button in the application tool bar in the standard LDB PNP

    Hi ABAPERS,
    I have a  requirement that in the selction screen to use the standard LDB PNP beyond that I need to pass one push button in the selection screen 1000 ( in the application tool bar beside execute button) actually i  passes the push button in the gui status but its not refelcting in the output  and in the initilization event also i passed even then its noty working,
    initialization.
      move 'Cluster ID'(010) to sscrfields-functxt_01.
    Thanks and Regards,
    Deepthi.

    Pavan,
    write code like this
    TABLES: USR02,       "Logon data
            SSCRFIELDS.  "FIELDS ON SELECTION SCREENS
    STANDARD SELECTION SCREEN FOR SCROLLING LEFT AND RIGHT
    SELECTION-SCREEN: FUNCTION KEY 1.
    SELECTION-SCREEN begin of BLOCK b1.
      PARAMETERs p1 type i.
      SELECTION-SCREEN end of BLOCK b1.
    INITIALIZATION.
    SCREEN ICON LEFT AND RIGHT
      SSCRFIELDS-FUNCTXT_01 = 'Button'.
      start-OF-SELECTION.
    Thanks
    Bala Duvvuri

  • Maximize frame on startup and disable all windows button

    Hi every body:
    I new in java field, but I'm already working with oracle Developer form for three years.In developer form I used to maximize the window at startup and disable all the windows buttons (minimize,maximize, restore and close) but unfortunatly I tried to do it with Java I couldn't .
    For close I used : setDefaulCloseOperation(DO_NOTHING_ON_CLOSE )
    I also tried frame.setResizable(false) it only disable the resizing but what about minimizing and restore
    and how to maximize it automaticly at startup.
    Thanx in advance

    Try to use JWindow instead of JFrame. You can get
    screen size using:
    Dimension
    d=Toolkit.getDefaultToolkit().getScreenSize()
    and then
    jWindow.setSize(d);
    regards,
    StasFor most systems you should leave 20 pixels for the OS status bar, eg;-
    Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
    setSize(dim.width, dim.height-20);
    "and disable all the windows buttons (minimize,maximize, restore and close) but unfortunatly I tried to do it with Java I couldn't . For close I used : setDefaulCloseOperation(DO_NOTHING_ON_CLOSE )"
    Put the buttons on a Panel, then use this to restore it;-
    getContentPane(),add(ButtonPanel); // or remove(---)
    validate();
    For closing add a custom event class (or an anonymous class), eg;-
    inyour constructor;
    addWindowListener(new WindowController() ) ;
    class WindowController extends WindowAdapter{
    public void windowClosing(WindowEvent e){
    // Conditions: eg typically -ask if the user wants to save befor closing?
    if(yes) System.exit(0);
    Hope that's of some use (:D)

  • Reply and Reply All Buttons Disabled

    Occasionally I will receive an email from someone and I will be unable to reply to that specific message as the reply and reply all buttons are disabled.
    It only seems to happen with one person, but not with every email from that person.
    Can anyone shed any light on the matter?

    HI and welcome to Apple Discussions...
    From your Mac Mail menu bar click Mailbox / Take All Accounts Online
    Carolyn

  • To disable the Application tool bar button in ALV report

    Hi Everyone,
    Iam using REUSE_ALV_GRID_DISPLAY to display ALV report.
    Now my requirement is to disable(I mean grey out) a application tool bar button.
    Thanks in advance
    Moderator message: please search for available information and try yourself before asking.
    locked by: Thomas Zloch on Sep 23, 2010 11:38 AM

    We can disable the buttons on the application toolbar as below.
    *To Exclude a few buttons from the Application tool bar
    data: it_excluding type slis_t_extab.
    data: wa_excluding type slis_extab.
    wa_excluding-fcode = '&OUP'.
    append wa_excluding to it_excluding.
    wa_excluding-fcode = '&ILT'.
    append wa_excluding to it_excluding.
    wa_excluding-fcode = '&ODN'.
    append wa_excluding to it_excluding.
    and in the FM.....
    call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
            i_callback_program      = sy-repid
            i_callback_pf_status_set = 'ZPICK'
            is_layout               = itlayout
            i_callback_user_command =  'LIST1'
            i_grid_title            = <fs>
    *       i_callback_top_of_page  = ' '
            it_fieldcat             = itfieldcat[]
            it_excluding            = it_excluding
    But,no idea on how to disable the  whole application tool bar itself ?
    K.Kiran.

  • Enabling and disabling the button in the multi record block

    hi all,
    i am using
    Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    i have a multi record block each block contains a button(button is to approve the record in terms of changing the status)
    i have the items like date,remarks and button
    the button should be enabled if the remarks is not null otherwise it should be disabled.
    for this in pre-record trigger i have written
    if :record is null then
       set_item_property('button',enabled,property_false);
    else
          set_item_property('button',enabled,property_false);
    end if;what problem is enable and disable is impacting on all the buttons in the block. in other words if first record's remarks is null then all the records button is disabled. if first record's remarks column is not null then all the records of the button column is enabled.
    i have to make enable and disable the button for the corresponding record.that means if first record's remarks column is not null then only first records button should be enabled others should be disabled.
    Thanks..

    You need to set the No. of items displayed to 1 as Ammad had said, additionally you can set the X and Y Position (Just Y will do and having fixed X) of the button depending upon the current record.
    can u explain this part alone bit more (setting the position of x and y)You need to calculate the variable Y_POS depending upon the current position of the cursor that is the current record.
    You can find the current record Y_POS using combination of
    V_CURRENT_RECORD := :SYSTEM.CURSOR_RECORD;
    V_TOP_RECORD := GET_BLOCK_PROPERTY ('BLOCK_NAME', TOP_RECORD);
    V_ITEM_Y_POS := GET_ITEM_PROPERTY ('ITEM_NAME', Y_POS);
    -- Also needs to add the Y_POS of the relative other items in the muti-record block
    V_HEIGHT := GET_ITEM_PROPERTY ('BUTTON_NAME', HEIGHT);
    -- Note :- TOP_RECORD  Returns the record number of the topmost visible record in the given block.
    V_Y_POS := V_ITEM_Y_POS + ((V_CURRENT_RECORD - V_TOP_RECORD) * V_HEIGHT);
    -- You will need to add Distance between Items in records if anyThen you can Set the current Y_POS of the button.
    SET_ITEM_PROPERTY ('BUTTON_NAME', Y_POS, V_Y_POS);
    [/code[
    Hope this helps
    Best Regards
    Arif Khadas
    Edited by: Arif Khadas on Feb 24, 2011 4:58 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Is there any ADF component similar to move and move all button

    Hi,
    Is there any button similar to move and move all used in the ADF shuttler component. I have implemented a custom shuttler component in that i used the images as move and move all button.
    Any help would be appriciated.
    Thanks,
    Harish

    You can put an icon to the af:button or try an af:commandImageLink ...
    Timo

  • Fix and Fix All buttons greyed out in Analyzed Results List

    The Fix and Fix All buttons are greyed out in the Analyzed Results List. This was working preTiger at least. Perhaps after my initial clean install of 10.4.1. Now running 10.4.3. Things I've tried to no avail:
    Reading the documentation and "Late Breaking News".
    Repaired permissions.
    Repaired disk. (found no problems)
    Ran Disk Warrior (found no problems)
    Trashed SountrackPro prefs file.
    Tried several existing and three new Audio File Projects on the internal and an external firewire drive.
    Searched for a similar topic in this forum.
    TIA for any help, Ken

    It works for me.
    First you have to select what you want to fix (e.g.
    clicks and pops) then press the analyze button to get
    a list of things to fix.
    Right after the analysis is done, if at least one
    thing was found to fix,you should see the "fix all"
    button not greyed out, but the "Fix" button will be
    greyed out until you actually click on one or more
    of the items in the analysis result list.
    Are you seeing something different from the behavior
    I've described?
    My experience and information is that Soundtrack Pro only finds clipped samples. Have you been able to fix them as well?

  • Display of push button in the application tool bar in an ALV report

    Hello everyone,
    Query:
    Is it possible to display a custom push button in the application tool bar while displaying an ALV report(1st one)?
    On pressing this custom push button will I be able to display another ALV report(2nd one) based on the selection made on the current ALV report(1st one)?

    Hiii..
    I have written a sample code for You
    <b>"Call the below FunctionModule For Displaying The List
    " And see the bolded line in the Below FunctionModule
    " STANDARD_02 and USER_COMMAND are the subroutine Names</b>
    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       = 'STANDARD_02'</b>
      <b> i_callback_user_command       = 'USER_COMMAND '</b>
       i_structure_name               =  'ZST_SCARR'
       is_layout                      = is_layout
       it_fieldcat                    = gt_fieldcat[]
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      is_sel_hide                    = is_sel_hide
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
       it_events                      = e03_lt_events[]
      IT_EVENT_EXIT                  =
      is_print                       = t
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      IR_SALV_LIST_ADAPTER           =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = it_scarr
    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.
       FORM PF_STATUS_SET
    <b>" Here Set A Button In Application Toolbar Using PF- Status</b>
    FORM standard_02 USING  extab TYPE slis_t_extab.
      SET PF-STATUS 'STANDA02' EXCLUDING extab.
    ENDFORM.                    "STANDARD_02
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->RS_SELFIELDtext
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
    <b> "menubutton with functioncode GOTO's Action</b>
        WHEN  'GOTO'.  
          READ TABLE it_scarr INDEX rs_selfield-tabindex. "cursorposit.
          IF sy-subrc = 0.
            WRITE:/ it_scarr-carrid,
                  /  it_scarr-carrname.
          ENDCASE.
    ENDFORM.                    "USER_COMMAND<b></b>
    Hope it helps..
    Regards,
    Simy

  • Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Have you attempted a restore?

  • How can i disable a button in the application tool bar of a standard trans?

    Hi Experts,
       I want to disable the create button in the application tool bar of the standard transaction cv03n. Is there any method?

    Hi,
    In the include 'LCV110F19', the GUI is being called for the screen.
    This is the actual code being called.
    WHEN c_dms_create.
          SET PF-STATUS 'D100CREATE'.
          SET TITLEBAR  'D100CREATE'.
    You can try to code something like below.
    DATA: itab TYPE TABLE OF sy-ucomm.
    APPEND 'CREATE' TO itab.
    SET PF-STATUS 'D100CREATE' EXCLUDING itab.
    Kindly reward points by clikcing the star on the left of reply,if it helps.

  • ThePrevious button, a choice, and a Next button in the tabel dont work (new

    Im writing the code like that for adf faces earlly access 13 but The Previous button, a choice, and a Next button in the tabel select one dont work i dont know why , they were working properly in the early access9 with the HR employees tabel with the same code but in the newest versions it dosent work .
    <af:table var="row"
    value="#{myEmployees.employees}" rows="10">
    <f:facet name="selection">
    <af:tableSelectOne text="Select Employee and "
    </af:tableSelectOne>

    what method does myEmployees.employees call?
    that method must cache the List.
    if a new List is returned each time, then the table resets to the first row.
    we have fixed this in EA15.

  • ThePrevious button, a choice, and a Next button in the tabel dont work

    The Previous button, a choice, and a Next button in the tabel select one dont work i dont know why , they were working properly in thw early access9 with the HR employees tabel but in the newest versions it dosent work and i dont know why.

    Could you clarify the technology and versions you're using - that'll make it much easier for us to understand the problem.

  • Grey out and disable all controls at once

    Is there a simple way to grey out and disable all of the controls on a FP at once?
    Thanks,
    Paul

    Apok, Bill
    Its merely a style issue.  No specific benefit.  Bill is absolutly right that these refs will be cleaned up without the close ref.  In fact, In theory if the Panes[] PN returns an error the loop will not iterate and all of the lower three errors are identical.  So WHY? because, the guy in the next cube may be working with property nodes of some other class. Almost garunteed to be interfacing to some .NET assembly written by the maestro of poor programming practice, known affectionatly to us as "The manager".  Now I have to explain to him/her why your adaptation blows up but my code is safe and maybe, even point out that the richly obfuscated assembly from the manager was concieved with all the talent our worst intern could have outcoded in diapers.   Now they are confussed and remember that my code doen't follow the standard I enforce on them "Just because I think I'm Mr. LabVIEW Trivia buff."  So, the coworkers begin to hate me just a little and, the manager thinks I hate them (I might but, I woudn't want them to think so.)
    I guess that actually is a specific benefit
    Jeff

Maybe you are looking for

  • H8-1287 Beats Audio controls do not work in Windows 8.1

    I've upgraded to Windows 8.1 and installed the IDT High-Definition audio driver from HP's website.  The surround sounds seems to be working but the controls do not work to modify the EQ etc.  I've seen the problem has been resolved for Envy laptops b

  • Formatting External Hard Drive for Backup

    Please advise: how should I set up an external hard drive (WD 500GB MyBook Home Edition) with a view to using it to backup my MacBook with Time Machine and have partitions to be accessed by Windows: 1) through BootCamp, running Windows Vista (Busines

  • How to make an input text for user to type name in?

    I'm making a game in which the user can type their name, and later in the game it'll say something like: "Oh, Kaitlyn, how was your day?" But all I really know how to do is make it so the name will appear but NOT be in an actually sentence. The probl

  • Exchange 2010 user Non-deliverable message

    Any help is appreciated. We have a user who is trying to email a vendor who she normally can but now she is getting an NDR message stating: The following organization rejected your message: [XXX]. <- other company's IP Diagnostic information for admi

  • How I detect mouse wheel movement?

    I never use this for now, and I want to intercept mouse wheel movement (up or down) for to change animation panels (divs) or to make another actions. Is not for a scroll of a large stage or div, it's only for to know when the user use the mouse wheel