ALV GRID - to include user defined buttons in the output

Hi,
Currently I am working on ALV grid output.
Along with the standard buttons, I need to include my own push buttons.
When I try to include it using pf-status like this,
passing parameter  in alv
I_callback_pf_status_set = G_status
FORM STANDARD_02 USING EXTAB USING SLIS_T_EXTAB
set pf-status 'PF_STATUS' EXCLUDING EXTAB.
ENDFORM
I have included Confirm and exit buttons
In the output it shows only the button which I created .
I want to get both standard buttons which gets displayed when using REUSE_ALV_GRID_DISPLAY and the newly created one .
Plz help me to resolve this .
I am just passing my own internal table values to the grid .
Thanks in advance.
Regards,
Uma

hi
good
create ur own GUI status in ur program using SET PF-STATUS '--'. now give that program name and pf status name while u r copying that standard status ie.,of ALV grid Go to transaction SE41 (Menu painter). In the initial screen give the program name SAPLKKBL In the status give STANDARD Then go to the menu bar.in that follow this menu User Interface>Copy--->Status. Then a pop up will appear to give ur program name and the status name.
thanks
mrutyun^

Similar Messages

  • How to create user defined button in alv report

    how to create user defined button in alv report
    thnks in advance.

    Hi,
    U can define it the the PF-STATUS ( Menu for ALV ).
    For that u have to define it in the EVENTCAT.
    form z_eventcat  using    p_i_eventcat type slis_t_event.
      data: i_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = p_i_eventcat
        exceptions
          list_type_wrong = 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.
      clear i_event.
      read table p_i_eventcat with key name = slis_ev_top_of_page into
      i_event.
      if sy-subrc = 0.
        move 'TOP_OF_PAGE' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      read table p_i_eventcat with key name = slis_ev_pf_status_set into i_event.
      if sy-subrc = 0.
        move 'SET_PF_STATUS' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      clear i_event.
      read table p_i_eventcat into i_event with key name = slis_ev_user_command .
      if sy-subrc = 0.
        move 'USER_COMMAND' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
    And in the DISPLAY
    call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
         i_callback_program                = v_progname
         i_callback_pf_status_set          = 'SET_PF_STATUS'
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = v_gridtitle
         i_save                            = 'A'
         is_layout                         = i_layout
         it_fieldcat                       = i_fieldcat[]
         it_sort                           = i_sortinfo
         it_events                         = i_eventcat
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        tables
          t_outtab                          = it_final
       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.
    *MENU SETTINGS.
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ALV_MENU'.
    endform.                    "SET_PF_STATUS
    endform.                    " Z_EVENTCAT
    Now double click on ALV MENU nad u can create a button in the application bar.
    Regards,
    Pritha.

  • ALV with user-defined buttons on toolbar in wd abap

    Hi All,
    I have to create an alv with user defined buttons  in wd abap on its toolbar.Could any one tell me in detail about it or provide me with any tutorial based on it.
    Thanking you all in advance.

    DATA: LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    DATA: LR_INTF_ALV TYPE REF TO IWCI_SALV_WD_TABLE.
    LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
    IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) EQ ABAP_FALSE.
       LR_CMP_USAGE->CREATE_COMPONENT( ).
    ENDIF.
    LR_INTF_ALV = WD_THIS->WD_CPIFC_ALV( ).
    WD_THIS->M_MODEL = LR_INTF_ALV->GET_MODEL( ).
    DATA: LR_FUNCTION TYPE REF TO CL_SALV_WD_FUNCTION.
    LR_FUNCTION =
    WD_THIS->M_MODEL->IF_SALV_WD_FUNCTION_SETTINGS~CREATE_FUNCTION(
                            ID = 'ISSUE' ).
    DATA: LR_BUTTON TYPE REF TO CL_SALV_WD_FE_BUTTON.
    CREATE OBJECT LR_BUTTON.
    LR_BUTTON->SET_TEXT( 'Issue/Receive' ).
    LR_FUNCTION->SET_EDITOR( LR_BUTTON ).
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110
    Abhi

  • Wan to add push button in the output of ALV Grid display.

    Hi Friends,
    I wan to add a Push button in the output of ALV GRID display with STANDARD ikons.
    How to copy standard ikons of GRID output.
    How to apply the copied status into my code.
    Regards,
    Viji

    Hi,
    Goto SE41, create a pf-status for your alv report program.
    On the next screen, click menu EXTRAS --> click option ADJUST TEMPLATES and select radiobutton LIST VIEWER --> you will get all standard buttons of alv in the pf-status.
    Delete the unwanted buttons and also you can add new buttons if reqd.
    Activate pf-status --> and apply in alv program.
    Now to apply this pf-status in your alv report follow code:-
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_rep_id       " report id
         i_callback_pf_status_set          = 'PF'           " for PF-STATUS
         i_callback_user_command           = 'USER_COMMAND' " for User-Command
         is_layout                         = wa_layout      " for layout
         it_fieldcat                       = it_field       " field catalog
         it_sort                           = it_sort        " sort info
        TABLES
          t_outtab                          = it_final      " internal table
       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
    *       SUB-ROUTINE PF IS USED TO SET THE PF-STATUS OF THE SCREEN
    *       ON WHICH THE ALV GRID IS DISPLAYED
    *       -->RT_EXTAB
    FORM pf USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZTG_STAT'. "<--pass pf-status name here
    ENDFORM.                    "pf
    *&      Form  USER_COMMAND
    *       SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
    *       AND EXECUTE THE APPROPIATE CODE
    *      -->LV_OKCODE   used to capture the function code
    *                     of the user-defined push-buttons
    *      -->L_SELFIELD   text
    FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
    * assign the function code to variable v_okcode
      lv_okcode = sy-ucomm.
    * handle the code execution based on the function code encountered
      CASE lv_okcode.
        WHEN '<function_code>'. "<--to handle user actions
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    Hope this helps you.
    Regards,
    Tarun

  • Error creating a user defined report in the grid control

    I am trying to create a simple User Defined report in the Grid OEM
    Under the 'Elements' tab I have a 'Type' - 'Database Table from SQL'
    And I have this 'Statement' - SELECT * FROM SYS.DBA_USERS
    When I Click the 'Preview' button I get this error.
    Error rendering element. Exception: ORA-00942: table or view does not exist
    I'm logged on as SYSTEM.
    Isn't the SYS.DBA_USERS table accessible by SYSTEM?
    Any advice on what I'm doing wrong/
    Edited by: bfee_sdc on Oct 19, 2010 9:12 AM

    What are the tricks?
    It has to be some what supported since I found this somewhere in an Oracle note...
    How to create custom reports on tables other than mgmt* views.
    To create reports on other tables, grant permissions to MGMT_VIEW user as MGMT_VIEW is responsible for creating reports in grid control
    SQL> GRANT SELECT on SYSMAN.<table_name> to MGMT_VIEW;
    And then create the reports in the reporting framework referencing SYSMAN.<table_name> in the query.
    I tried GRANT SELECT on SYS.DBA_USERS to MGNT_VIEW but this did not work.

  • CFolders - User Defined Buttons

    Hi All,
    I went to SPRO -> Collaboration Folders and created a User-defined button for showing the status report.
    The place at which is displayed, i have chosen "Default".
    Then went to SPRO -> Collaboration Folders and BADI, created a new implementation name and activated with the Filter ID as the new button id (created from the above step).
    But now my question is, in the cFolders, i can't able to see the button. Any other specific setting need to be done, to display the button?
    And also i would like to know, when i click the button, it has to generate an ABAP report in html format. Any suggestion on this?
    Regards,
    Anandhi

    I don't think this is possible in the ALV, you may add another toolbar using class [CL_GUI_TOOLBAR|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/8f/bcc23657ad0730e10000009b38f839/frameset.htm].
    (You can  search sdn for sample or look at SAP sample SAPTOOLBAR_DEMO1)
    Regards,
    Raymond

  • How i can make user defined button in standard menu.........

    hi all,
                     please tell me how i can make user defined button in standard menu.........
       regards
    vikas saini

    hi Vikas ,'
    u can do this by using PF status and setting titile .
    follow thw link for help.
    Re: To Change SAP Tiltle into some other title
    Regards,
    Amit

  • USER DEFINED FUNCTION in the formula editor

    How do you create a USER DEFINED FUNCTION in the formula editor using BADI

    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/frameset.htm">This</a> may help.

  • How to add user defined tab in the Header level of T-Code O4NM?

    How to add user defined tab in the Header level of  T-Code O4NM?
    I tried with BADI but I cant able to find any BADI for it and also searched for screen exit too..

    Can you check the user exits,
    OIJNOM_N and OIJTKT_N
    Cheers,
    Balaji

  • Set user Defined Status in the Shopping Cart

    Hello,
    I am facing problem while Setting user defined Status in the shopping cart. Below are the steps which I have followed.
    1. I have created Status profile via Transaction 'BS02' and also created the Status 'On Hold' with Status number 'Exxxxx'.
    2. Entry of this external status is also created in the table TJ30.
    3. Also I tried assigning this Status profile in Transaction type for "BUS2121".
    After making the above configuration for the new User defined status I have used below function module in my program.
    I am using FM "CRM_STATUS_CHANGE_EXTERN" to set the User defined status in the shopping cart.
      CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN'
        EXPORTING
          objnr                    = ls_header-guid
          user_status          = lv_stat
        IMPORTING
          stonr                    = lv_stonr
    After this FM I am also using "COMMIT WORK AND WAIT ".
    But still my Status is not updated in the Shopping Cart.
    Expert please suggest if some one has work in this scenario.
    Best Regards,
    Chirag Shah

    Hi Chirag,
    try to initialize Status schema before update.
    CALL FUNCTION 'CRM_STATUS_OBJECT_CREATE'
         EXPORTING
           objnr                        = ls_header-guid
           obtyp                        = 'SCH'
           stsma                        = 'ZHOLD'
         EXCEPTIONS
           obtyp_invalid                = 1
           status_object_already_exists = 2
           stsma_invalid                = 3
           stsma_obtyp_invalid          = 4
           error_ocurred                = 5
           OTHERS                       = 6.
    Regards
    K

  • User defined fields for the Trading partner agreements

    Hi,
    Do we have any provision to create custom/user defined fields for the Trading partner agreements ?

    Hello,
    It would be great if you can provide complete details of your use case. I can suggest the possible way of implementation only after understanding your requirement.
    Regards,
    Anuj

  • Dealing with User Defined Tables with the DI Server

    I have a general question about the best way of working with the data in user defined tables using the DI Server. It appears from previous posts that it is not possible to use the standard methods such as UpdateObject. Also since update/insert and delete statements or explicitly forbidden using the ExecuteSQL method then how do we interact with the data in the tables?
    Do we need to code our own data access layer for this type of access and is this a good practice?
    Is this type of functionality going to be available in a future release of the DI Server?
    Thanks

    Using SQL for Update/Insert/Delete is not forbidden on UDTs (at least non-UDO UDTs; UDO UDTs are somehow in a gray area since they carry internal fields + e.g. inserts require further manipulation in B1 tables...)...
    I.e. using ExecuteSQL to add data into UDTs is OK for DI Server...
    HTH,
    Frank

  • ALV view : Problem with user defined views

    Dear Experts,
    We are facing a problem pertaining to user defined views for a ALV table that we have in SAP eRecruiting application in webdynpro ABAP. The problem is as follows.
    There is a candidate application ABC & only ONE person can edit this at a time.In this application ABC there is a ALV table.
    If the user clicks on this application & navigates to the ALV,this ABC application is in normal/edit mode(no one else has opened this ). So, the user can make changes in ABC. In the ALV, he can click on the 'settings 'button and save the STANDARD view as his own user defined view(by adding or removing columns).
    If the user opens the application ABC in display mode(implying that someone else has alraedy opened ABC for editing), when i navigate to the same ALV,the user CANNOT see the views which were saved in the edit mode.Only the standard view is displayed. The user however has the option to again freshly save a view.
    The views created by a user for this ALV should be seen irrespective of the application being opened in normal or display mode.
    To add to the confusion, this problem is occuring only in some systems & not in others. There is atleast one system where the views are displayed correctly to the user.
    On debugging, the table wdy_conf_user has config ids as different where the user views are stored separately for display & edit mode.
    In systems where the user views are displayed correctly, the config id is one & the same ensuring that the user can see all his views irrespective of the mode of the application.
    Any thoughts on how we can rectify this?
    sorry for the long & tedious explanation
    Thanks in advance,
    Sowmya

    See
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        return {$inputtype}
                     local:test_function("1","2")' returning content) o from dual
    Error at line 5
    ORA-19114: error during parsing the XQuery expression:
    LPX-00801: XQuery syntax error at '{'
    3                       return {$inputtype}
    -                              ^
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        $inputtype
                     local:test_function("1","2")' returning content) o from dual
    O   
    2   
    1 row selected.

  • ALV Grid: event for user return in ALV Grid Control

    Hi developers,
    i'm wanna do something after a user has pressed the return button in a alv grid control. For that i need probably a event. But i can not find a proper event in the documentation. Could one of you guys help me?
    Best regards christian

    Hi Christian
    ALV grid is an encapsulated object, so it seems there is no way, you ought to implement the data_changed event. So if you want to make bulk data input and after trigger the event by pressing the return key, you should make the ALV Grid get your changes after pressing the key but not after a cell change of a modified cell.
    To set this attribute:
    CALL METHOD gr_alvgrid->register_edit_event
         EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_enter .
    This way "data_changed" event will be triggered whenever you press the return key while editing.
    For some more information you can also refer to the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf">"An Easy Reference for ALV Grid Control"</a>.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • ALV grid display issue from radio buttons

    Hello,
    I have a radio button group in a selection screen. On select of the first radio button, I display an ALV grid below the radio button group.
    On selecting the next one, I want the grid to disappear which isn't happening currently.
    Please help.
    Thanks and Regards,
    Abhijnan

    Please check if this is what you needed or something else
    DATA: obj TYPE REF TO cl_gui_alv_grid,
          repid TYPE sy-repid,
          entered TYPE c,
          lv_structure TYPE tabname,
          dock TYPE REF TO cl_gui_docking_container,
          i_mara TYPE TABLE OF mara,
          i_marc TYPE TABLE OF marc.
    FIELD-SYMBOLS:<fs_tab> TYPE table.
    PARAMETERS: p_matnr TYPE matnr.
    PARAMETERS: p_mara RADIOBUTTON GROUP a USER-COMMAND abc.
    PARAMETERS: p_marc RADIOBUTTON GROUP a.
    AT SELECTION-SCREEN OUTPUT.
      CHECK NOT p_matnr IS INITIAL.
      IMPORT entered from memory id 'E'.
      CHECK NOT entered IS INITIAL.
      CHECK dock IS INITIAL.
      repid = sy-repid.
      CREATE OBJECT dock
           EXPORTING
             repid = repid
             dynnr = sy-dynnr
             ratio = 80
             side  = cl_gui_docking_container=>dock_at_bottom
             name  = 'DOCK_CONT'.
      CHECK  obj IS INITIAL.
      CREATE OBJECT obj
      EXPORTING
      i_parent          =  dock.
      IF p_mara = 'X'.
        IMPORT i_mara FROM MEMORY ID 'IMARA'.
        FREE MEMORY ID 'IMARA'.
        lv_structure = 'MARA'.
        ASSIGN i_mara TO <fs_tab>.
      ELSE.
        IMPORT i_marc FROM MEMORY ID 'IMARC'.
        FREE MEMORY ID 'IMARC'.
        lv_structure = 'MARC'.
        ASSIGN i_marc TO <fs_tab>.
      ENDIF.
      CALL METHOD obj->set_table_for_first_display
      EXPORTING
      i_structure_name = lv_structure
      CHANGING
      it_outtab = <fs_tab>.
    START-OF-SELECTION.
      entered = 'X'.
      EXPORT entered TO memory ID 'E'.
      IF p_mara = 'X'.
        SELECT * FROM mara UP TO 100 ROWS INTO TABLE i_mara
                 WHERE matnr = p_matnr.
        EXPORT i_mara TO MEMORY ID 'IMARA'.
      ELSE.
        SELECT * FROM marc UP TO 100 ROWS INTO TABLE i_marc
               WHERE matnr = p_matnr.
        EXPORT i_marc TO MEMORY ID 'IMARC'.
      ENDIF.

Maybe you are looking for

  • COLOR LASER PRINTER HELP!!!

    I am looking to get a Color Laser Wireless All In One Multifunction Duplex Printer and was just wondering if you can tell me the best brand that's top of the line and on down from there.

  • Disc error when I install Panther

    I have a powerbook G4 that is really acting up. It has come to the point I had to reinstall my original software. Now when I go too upgrade to Panther it tells me disc error at the end of the installation of the first disc. Also I can not get on the

  • Notification pages runing from Local Jdeveloper

    Running notification page from the local Jdeveloper and clicking on the notification link, I get the below error: ========= oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Stateme

  • Net send from mac to windows

    Hi, anyone know how to send a pop up message from a mac to a PC? I used to work in an IT support office and it was great to be able to just type 'net send' to make a message pop up on another machine. Now I work from home and have just set up a wirel

  • How to fix "iTunes could not sync contacts to the iPhone "my name's iPhone

    How to fix the "iTunes could not sync contacts to the iPhone "my name's iPhone" because the sync server failed to sync the iPhone. Thank you. Hugh