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

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.

  • 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

  • Retain standard SAP order type after copying with user defined order type

    Hello SAP Gurus,
    We have a requirement of retaining the standard SAP order types after copying with User defined order types. But the issue is we don't want to see the standard SAP order type such as PM01, PM02 in production system while using transaction like IW31 etc.
    Is there anybody who has answer to retain these stanadard SAP order types without deleting from system configuration?
    Thanks in advance.
    Cheers,
    Vaibhav

    Vaibhav,
    When you F4 on the order type field in IW31 you will get the popup showing the order type list. At the top of this list is a button with a green "+" sign (Insert in personal list).
    You can use this button to select your favourite list.
    This function is available in most F4 drop-down lists.
    However, you cannot set this setting for all users. You will need to write an ABAP program to do this.
    PeteA

  • Problem with user-defined functions in XQuery String

    hello
    i've a problem with user-defined functions in XQuery String
    details are here (the code is not Human-readable via forum's embedded editor ?? strange)
    http://docs.google.com/Doc?id=ddqwddsr_21c96d9x
    thanks !!

    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.

  • Display of document line items with user defined fields

    Hi all,
    I have created two user defined fields in CI_COBL structure and they are available on OBC4 screen. I maintained  optinal for entry in the screen layout. I posted one document with user defined fields and saved.
    Now the document is updated in BSEG table. I then display the document, and it display the doucment
    But when i double click on the one of the line items system gives an error that there is some problem in customising and entries missing in Table COBM.
    I checked OXK3 and see that in field information for user fields, it says entries maintained in table COBM.
    But still i couldnt display my line items in detail.
    Any solutions
    Thanks in advance
    Ram

    Yes your are looking at the correct sap note.
    Things look pretty straight forward in the notes documentation.
    1)Extend the VBKRED structure with the fields you want.
    2)Populate thse values in the user exit in program DBKMVF02 in FORM routine USER_EXIT_FUELLEN_XVBKRED.
    For extending a standard structure you need to create a zstructuree in se11 first and then append it to the standard structure.
    In your case you need to  extend VBKRED_EX1 structure rather than VBKRED.
    Regards,
    ravi

  • Error erase Queries in Query Manager- The query is used with user-define...

    Hello Experts
    I have deleted a User Field that had a Formatted Search and now I can not remove it because it is linked according to a UF, the error message is as follows:
    "The query is used with user-defined values [Message 952-23]"
    There will be a way to resolve this issue???
    Thanks in advance

    Hi Juan,
    I have tried this very limited, but the formid, is this a number in your case?
    SELECT * from cshs t0 inner join ouqr t1 on t0.queryid = t1.intrnalkey
    where t1.qname = '[%0]'
    Running this query I can get the form id that I need to recreate, but I have a feeling you already know the form id, is this correct?
    - Is there an error when you try to recreate the form id?
    - Will it not let you recreate the same form id because the id is given by the system?
    If it is not possible to recreate the form id, please prepare a backup and log a message. Support should be able to correct the entry in table cshs.
    Hope it helps.
    Jesper

  • Personalization Publication with user defined / multiple / discrete values

    Hello,
    I try to personalize a main report ( with Enterprise XI 12.1.0, Crystal Report XI  )
    ( parameter p_company_code ( as string ),  with user defined / multiple / discree and range values )
    with dynamic recipients ( Crystal Report ).
    For a single value it works.
    But I did not find a solution how to set up the values for my parameter p_company_code so that I can start the main report
    with the following company codes  ( 4711, 4712, 0815-0890 ) for one recipients ( only one report for all this company codes  )
    Thans for your help
    H. Blum

    Hi Fabio,
    It works as follows.
    let's say you have 3 multiple single lines for your cost center variable.
    once you are in the folder, select any single value & the layout is ready for planning with the corresponding cost center.
    now, select the "Cost center variable row" in the header of the folder within section "Name of Variable" & click on "Trash Can" icon to "Delete Selection" of variable.
    this basically deletes all the entered selections (3 entries) & displays for all.
    It works this way, because we don't have "resriction of values required by user".
    if am not wrong & correct me if am wrong,
    overall, this is nothing but equal to "planning level not restricted with any variable".
    I just tested this & the flaw in this is that, it is not only displaying for all the initially entered 3 lines but it displays for each & every cost center irrespective of the variable selections.
    hope it is clear.

  • Want to proceed with User defined fuction in Mapping i dont know java

    Hi all ,
                  i dont know Java , i want to proceed with user defined fuction , i  have worked with ABAP but not with java ,  i do want abt some knowledge about it ,
    thanks
    sridhar

    Hi,
    Please see the below links ,
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    Difference in using java,xslt,message mapping
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    /people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    /people/amol.joshi2/blog/2006/03/10/think-objects-when-creating-java-mappings
    XSLT Mapping
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    Regards
    Chilla..

  • [All Platforms][Your Music] Make it possible to tag and filter "My Music" with user-defined tags

    It would be very nice and convenient to be able to tag and filter "My Music" (playlists, songs, albums and artists) with user-defined tags. I'm sure quite a few users would like to classify their music by genre. Myself, I would like to tag my albums, assigning them to different virtual collections.

    Updated: 2015-07-23Hello and thanks for the feedback!
    A similar idea has also been suggested here:
    https://community.spotify.com/t5/Live-Ideas/Your-Music-Grouping-or-Sorting-by-Tags/idi-p/744947
    Add your kudos and comments there please! ;)

  • 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

  • Problem with ALV and user defined selection screen. please help!

    Hi Experts,
           I have program which has a user defined selection screen 9001. On executing the selection screen i call a ALV using resuse_alv_grid function module.
    What problem I am facing is that when I press back button from ALV page it goes to the se38 editor instead of selection screen.
    How to resolve this?
    Thanks
    Gopal

    Hi,
    This might be due to LEAVE TO TRANSACTION statement. You might be running the program from SE38. Try to run the program using Z-TCode assigned to it.
    Thanks and Regards,
    Bharat Kumar Reddy.V
    Message was edited by: Bharat Reddy V

  • 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^

  • 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.

  • Problems with user-defined update-process

    Hi.
    I have a small problem in the right syntax in an user-defined updated process.
    The process is called by a button on the page and should update a record in a table.
    BEGIN
    UPDATE wam_mod_allocation SET
    alloc_assessment = V('P2120_ASSESSMENT'),
    last_update_date = LOCALTIMESTAMP,
    last_update_staff = V('APP_USER')
    WHERE username = V('P2120_USERNAME')
    AND module_id = V('P2120_MODULE_ID')
    END;
    This is the code of the process. The line with the problem is marked bold. P2120_USERNAME is a text field in the page and contains the username to be updated.
    The problem is, that the comparison doesn't work. the value "smith" is available in the table and is the same as in the text field. (both in lower case).
    If I replace the part V('P2120_USERNAME') with 'smith' (with single quotes), the update statement works properly.
    How do I have to compare the username with the item value that it works properly?

    1. Stephan
    2 + 3 Well. I enclosed both tags in the TRIM-Operator and it works. First, I thought, a whitespace caused the problems. To determine which value contains the whitespaces I removed the trim-tags on both sides. It works.
    It is quite funny, because,if I remove both tags, it works too? Well. Yesterday it didnt.
    To be on the safe side, I will include the trim-tags.
    Thanks very much.
    Stephan

Maybe you are looking for

  • Accessing oracle database

    Dear Gurus, I wants to accesses either through sql*plus or Toad, the database located in a different city. what configuration is/are required and where to do the configurations. I'm using oracle 10gr2 and operating system is solaris.

  • PictureLibrarySlideshowWebPart - Change image size to original size

    Hi, I'm using the PictureLibrarySlideshow Web part as image slider in the banner of a SharePoint website. Apparently this web part changes the image size so it is smaller than its original size. Is there a simple solution to solve this and resize the

  • Another HTML editor

    I am trying to find a cheap alternative to DW as I use DW for my job however my content writer needs an editor as our newsletter wysiwyg is very unstable and cannot hold complex tables. I suggested editing the newsletter in an editor and pasting the

  • Will I lose my site?

    If I un-install and re-install Golive 6, will I lose the site I created? I can download the update, 6.0.1, but it doesn't go into golive. It says that the update has already been installed into my version of golive but it has not. I asked on the goli

  • Web-source  of 9i report

    Hi all, In report9i, when using the report wizard to create a web layout (or both) it gives you a web source to run the web layout. If i change the paper layout around using the layout editor how do I update the web layout accordingly (the web source