Add customer button on header level for BUS2201(PO) - SRM 7.0

Hi,
I want to define a customer button (with action) within PO on header level.
Web Dynpro           FPM_OIF_COMPONENT
Configuration          /SAPSRM/WDCC_FPM_OIF_PO_PURCH
Task:
Add a customer button besides standard Export button.
I assume-afterwards I have to enhance the method onactionbutton_pressed to create my event when customer button is pressed, right?
Could anyone please guide me how to solve this issue?
Thanks and best reagrds
Andreas

Hi,
Here are the steps to add the button, I wrote it in other thread. In my case for PO is not displayed, try to follow the steps and if you are able to show the button tell me how please.
Add custom button in PO
And yes ,you need to create an enhancement point in the view CNR_VIEW of the component FPM_OIF_COMPONENT, you need to create a post-exit in the method BUTTON_PRESSED, here you have a sample code:
DATA: lv_id TYPE string,
        lv_event_id TYPE fpm_event_id.
  DATA: lo_nd_oif_application TYPE REF TO if_wd_context_node,
        lo_nd_variant TYPE REF TO if_wd_context_node,
        lo_nd_toolbar TYPE REF TO if_wd_context_node,
        lo_nd_button TYPE REF TO if_wd_context_node,
        lo_el_button TYPE REF TO if_wd_context_element,
        lo_nd_other_functions TYPE REF TO if_wd_context_node.
  DATA: lv_substring TYPE string,
        lv_substring_i TYPE i,
        lv_node_name TYPE string,
        lv_position TYPE string,
        lv_length TYPE i,
        lv_seq TYPE i.
  DATA:lt_keys TYPE STANDARD TABLE OF string,
       lv_key LIKE LINE OF lt_keys.
  TYPES:BEGIN OF y_parameters,
    name TYPE string,
    value TYPE string,
  END OF y_parameters.
  DATA: lt_parameters TYPE STANDARD TABLE OF y_parameters,
        ls_parameter LIKE LINE OF lt_parameters.
  DATA: lv_boid      TYPE bbp_guid,
        lv_botype    TYPE string,
        lv_objkey TYPE  swo_typeid,
        lv_objtype  TYPE  swo_objtyp,
        lv_object_id TYPE crmt_object_id_db,
        lv_process_type TYPE crmt_process_type_db,
        lv_object_type TYPE crmt_subobject_category_db,
        lv_rfc TYPE zgrs_co_logsys-rfc,
  DATA: lo_fpm TYPE REF TO if_fpm.
  lo_fpm = cl_fpm_factory=>get_instance( ).
  lo_fpm->raise_event_by_id( lv_event_id ).
  lt_keys = lo_fpm->mo_app_parameter->get_keys( ).
  LOOP AT lt_keys INTO lv_key.
    ls_parameter-name = lv_key.
    lo_fpm->mo_app_parameter->get_value(
      EXPORTING  iv_key = lv_key
      IMPORTING  ev_value = ls_parameter-value  ).
    INSERT ls_parameter INTO TABLE lt_parameters.
  ENDLOOP.
  lv_id = wdevent->get_string( 'ID' ).
  lo_nd_oif_application = wd_context->get_child_node( name = wd_this->wdctx_oif_application ).
  lo_nd_variant = lo_nd_oif_application->get_child_node( name = wd_this->wdctx_variant ).
  lo_nd_toolbar = lo_nd_variant->get_child_node( name = wd_this->wdctx_toolbar ).
  lo_nd_other_functions = lo_nd_toolbar->get_child_node( name = wd_this->wdctx_other_functions ).
  lv_substring = lv_id.
  lv_length = STRLEN( lv_id ).
  lv_seq = lv_length - 3.
  IF lv_id+lv_seq = '_CP'.
    lv_substring = lv_substring(lv_seq).
    lv_id = lv_substring.
  ENDIF.
  WHILE lv_substring CS '_'.
    lv_position = sy-fdpos + 1.
    lv_substring = lv_substring+lv_position.
  ENDWHILE.
  IF lv_substring CO '1234567890'.
    lv_substring_i = lv_substring.
  ENDIF.
* Item level action;
  IF lv_id CS '_item'.
* Or header level action;
  ELSE.
    IF lv_id CA '0123456789'.
      lv_position = sy-fdpos - 1.
      lv_node_name = lv_id(lv_position).
      IF lv_id CS 'OTHER_FUNCTIONS'.
        lo_nd_button = lo_nd_other_functions->get_child_node( name = wd_this->wdctx_button ).
        lo_nd_button->set_lead_selection_index( index = lv_substring_i ).
        lo_el_button = lo_nd_button->get_element(  ).
        TRY.
            lo_el_button->get_attribute(
            EXPORTING
              name =  `EVENT_ID`
            IMPORTING
              value = lv_event_id ).
          CATCH cx_wd_context.
        ENDTRY.
        READ TABLE lt_parameters INTO ls_parameter WITH KEY name = 'SAPSRM_BOTYPE'.
        lv_botype = ls_parameter-value.
        READ TABLE lt_parameters INTO ls_parameter WITH KEY name = 'SAPSRM_BOID'.
        lv_boid = ls_parameter-value.
*         Obtain the object_id;
        SELECT SINGLE object_id INTO lv_object_id
         FROM crmd_orderadm_h
         WHERE guid EQ lv_boid.
*         If not Z button, exits;
        IF lv_event_id(1) NE 'Z'. EXIT. ENDIF.
*      Actions;
        CASE lv_event_id.
          WHEN 'ZBUTTON'.
          WHEN 'ZBUTTON2'.
        ENDCASE.
      ENDIF.
    ENDIF.
  ENDIF.

Similar Messages

  • How to add a custom button on Application Toolbar for ME21N, ME22N & ME23N

    Hi Experts,
    I am new to this forum. I hope someone will help me.
    My Requirement is as :
    I want to add a new custom button on Application Toolbar for ME21N, ME22N & ME23N.
    There are already standard buttons in this toolbar which is Document Overview On, Hold, Personal Settings etc.
    So after the 'personal settings' button i want add a new button and want to write a code which will open one custom screen.
    I am not able to find any exit for this....
    Please help...
    Thanks....

    Hey Buddies
    Try below BADI : ME_PROCESS_PO_CUST
    and check with required methods.
    1)PROCESS_ITEM
    2)CHECK
    3)POST
    Regards,
    Pranav

  • Custom button  on ALV report for Tcode FL10G ?

    Hi All,
    I want to add custom button in the AVL report for FL10G transaction.  And then need to implement logic for that button (calling BAPI to create shipment for the selected records).
    For VL10G alv program GUI Status - STANDARD001  I think I can add button in this gui by using access key.
    But how to implement logic for this custom button?  Where I can put the code for this button logic?
    Please let me know if any one has any ideas on this issue.
    I appreciate your help and time on this.
    Thanks.
    M

    Hi Murali,
    The standard program it will not allow to copy the GUI Status. Because source and target program should not same.
    It will definitely debug will work. Yo can create the GUI Status through SE41. In SE41 Just give Program name :SAPLV50R_VIEW click the button status. here you should not give any gui status. just blindy say create the then it will popup screen appears in the screen. Here you can mention your Z GUI Status. It is not required to create all the menus manually instead of the there is button which is located in the screen next to blue i button. here you can click and select the standard interface. You can get all the menus as similar to standard. Like that you should create Menu Bar, Application Toolbar and Function Keys  Menus. Then you can add your custom button in the Application tool bar button.
    When you execute the Transaction VL10G and check your cusom menu button will appears. Once you click custom button only exit will trigger. Find the below code for your reference.
    CODE
            loop at ct_postab assigning <fs>
                    where selkz = 'X'.
    *To Fill the BAPI  Header Parameters
                  str_ordhdr-ship_cond = w_sval-value.
    *To Fill the BAPI  HeaderX Parameters
                  str_ordhdrx-updateflag = 'U'.
                  str_ordhdrx-ship_cond = 'X'.
                  call function 'BAPI_SALESORDER_CHANGE'
                    exporting
                      salesdocument    = <fs>-vbelv
                      order_header_in  = str_ordhdr
                      order_header_inx = str_ordhdrx
                    tables
                      return           = str_return.
                endloop.
                read table str_return into w_return index 1.
                if sy-subrc eq 0.
                  if not w_return-type = 'S'.
                    message w_return-message type 'E'.
                    leave to current transaction.
                  endif.
                endif.
    *Do the BAPI Commit
                call function 'BAPI_TRANSACTION_COMMIT'
                  exporting
                    wait = 'X'.
              endif.
            endif.
          endif.
    Let me know if you have anything to discuss on the same.

  • Custom field at Header level in Additional Data B tab of VA01/VA02

    Kindly help me out , I have a requirement to add a custom field at Header level in Additional Data B tab of VA01/VA02.
    Program: SAPMV45A
    screen 8459
    This can be done only through access key or not. Can any body tell me procedure to do that.
    Appreciate your response.Thanks in advance

    Please help me out this

  • How to add custom buttons in a workflow email?

    We want to add custom buttons in the workflow mail, and we have tried it successfully in workflow notification, but failed in mail,so is there anyone know how to add buttons in workflow mail if it is possible.

    The buttons available are all of the different values on the Lookup Type you assign as the Result for the Notificaiton.  Add values to this list, or create a new list and point to it.

  • Field Selection at Header Level for FB60/FV60/MIR7/MIRO

    Hi All,
       I am facing a problem  for making few feilds mandatory at header level for the above transactions.
    Feild required to be made as mandatory are
    1. POR Number
    2. POR Ref.No.
    The above two feilds  are sepcific to Switzerland Business Process.
    Please  guide me how i can make/add/delete/reqdentry/edit for any of the feilds at header level.
    Thanks
    Sudhakar

    while creation of document type... there r 2 fields which u can make as compulsory.... check in OBA7
    it has header like: required during document entry
    so whenever u use the specific document type these fields will be mandatory
    for other fields on header U can use validation GGB0 to do so...

  • Add fiel FRBNR at Header level

    Hi SAP community.
    I need to add the field Bill of landing (FRBNR) at header level for MType=561 in transaction MIGO or MB1C.
    Please indicate how could I reach that...step by step.
    Thanks
    la

    Make screen enhancement with help of ABAPer
    In standard procedure FRBNR field is not allowed for 561 movement type.
    561  movement is to upload intial stock only.
    check this Message no. CZ287

  • Multiple selection customer field at header level... Is it possible?

    Y'all,
    I would like to know if it's possible to append a table into the include structure (CUF) at header level in the contract and create a search help screen with multiple selection values return.
    This requirement comes because we have to mantain a 1:N relationship between a contract and customer field at header level.
    If you have any idea or comment please let me know.
    Best regards,
    Jerry.

    Hi
    <u>I have not tried, but seems to be possible.</u>
    <b>Please go through the SAP OSS Notes -></b>
    Note 672960 - User-defined fields 2
    Note 762984 - SRM40-SUS: Implementation of customer enhancement fields
    Note 882256 - SRM-SUS: Customer fields for SUS invoice header missing
    Note 749196 - SRM40-SUS: SP01 Redefining UI settings
    Note 809628 - Table like customer fields from bid invitation in bid
    Note 809630 - Customer field in bid invitation and bid - How does it work?
    Note 458591 - User-defined fields: Preparation and use
    Hope this will help. Do let me know.
    Regards
    - Atul

  • How to add Custom button to existing ALV toolbar

    Hi,
    I want to add custom buttons for varaints in the existing row PRINT VERSION/EXPORT
    How do we do that?
    Rgds
    Vara

    I have used the standard component u2018salv_wd_tableu2019 in my application and will be able to give example by adding a button named 'NEW__BUTTON' .
    In the WDDOINIT method of the component controller, use the following code to define column name, your own buttons, visible column for the same component usage.
    DATA:
    lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage,
    lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
    *Check ALV component usage
    lr_salv_wd_table_usage = wd_this->wd_cpuse_alv( ).
    IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.
    lr_salv_wd_table_usage->create_component( ).
    ELSE.
    lr_salv_wd_table_usage->delete_component( ).
    lr_salv_wd_table_usage->create_component( ).
    ENDIF.
    *Get ALV component
    lr_salv_wd_table = wd_this->wd_cpifc_alv( ).
    wd_this->mr_table type ref to CL_SALV_WD_CONFIG_TABLE.
    *Get ConfigurationModel from ALV Component
    wd_this->mr_table = lr_salv_wd_table->get_model( ).
    *Set table settings
    DATA:
    lr_table_settings TYPE REF TO if_salv_wd_table_settings.
    lr_table_settings ?= wd_this->mr_table .
    lr_table_settings->set_visible_row_count( '5' ).
    lr_table_settings->set_width( '100%' ).
    DATA:
    lr_header TYPE REF TO cl_salv_wd_header,
    l_header_text TYPE string.
    lr_header = lr_table_settings->get_header( ).
    l_header_text = cl_wd_utilities=>get_otr_text_by_alias( 'NEW__BUTTON' ).
    lr_header->set_text( l_header_text ).
    lr_header->set_tooltip( l_header_text ).
    "lr_table_settings->set_selection_mode( cl_wd_table=>e_selection_mode-multi_no_lead ).
    *Set functions
    IF wd_this->mb_no_maintain NE abap_true.
    DATA:
    lr_function TYPE REF TO cl_salv_wd_function,
    lr_fe_button TYPE REF TO cl_salv_wd_fe_button,
    l_btn_text TYPE string.
    *Add the button here for validation on the top of the ALV
    *This is where you add the buttons on the same ROW.
    lr_function = lr_functions->create_function( 'NEW__BUTTON' ).
    CREATE OBJECT lr_fe_button.
    l_btn_text = cl_wd_utilities=>get_otr_text_by_alias( 'NEW__BUTTON' ).
    lr_fe_button->set_text( l_btn_text ).
    lr_fe_button->set_tooltip( l_btn_text ).
    lr_function->set_editor( lr_fe_button ).
    After defining the buttons 'NEW__BUTTON' , handle the actions for the same using the method u2018LIST_ACTIONu2019 which should have the event as u2018ON_FUNCTIONu2019, controller as u2018interface controlleru2019 and component use as the name you have given say u2018ALVu2019.
    In the method u2018LIST_ACTIONu2019, handle the actions as below. This method will have the following importing parameters.
    WDEVENT Importing CL_WD_CUSTOM_EVENT
    R_PARAM Importing IF_SALV_WD_TABLE_FUNCTION
    method list_action .
    case r_param->id .
    when  'NEW__BUTTON'.
    "Do the validation here-"
    endcase.
    endmethod.
    Thanks,
    Rajkumar.S

  • How to make Delivery block at Sales Order Header level for specific materia

    Hi,
    My client want to create a delivery block EDI order at the Order Header level for specific materials
    How can we achieve this.

    Dear Varada rajan
    Go to material master, select "Sales: sales org.1" view and assign "01" against the field "DChain-spec. status" and save.  By assigning, for a particular sales area, you can block that material.
    Now go to OVSU select 01 and assign "B" against the field "Block delivery".
    Now create a sale order and post the outcome.
    thanks
    G. Lakshmipathi

  • Ever since my last update I have been unable to add songs from my i tunes library onto my i phone.  The "add to" button does not appear for me when I connect my i phone.  Can anyone shed some light on this for me?

    Ever since my last update I have been unable to add songs from my i tunes library onto my i phone.  The "add to" button does not appear for me when I connect my i phone.  Can anyone shed some light on this for me?

    Thanks for that 'sberman' - because my iPhone is backed-up to my work computer (only at this stage) I have had to call our IT Department in Adleaide. (4 times this morning). The last guy managed to get the phone into 'DFU Mode' - no more recovery mode screen - (kind of 'asleep' perhaps) from my understanding of same. I am awaiting a call again from IT so they can get my computer to actually recognise my iPhone on the C Drive. This also happened to  one of my colleagues in Newman (WA). She got so frustrated with the whole process that she bought another phone the next time she was in 'civilisation.' She hasn't had any problems since. (Cross fingers).
    Thanks again, Sandra2474.

  • I'm working in Pages 4.1. I want to add text to a header but for it to appear only on that page in stead of duplicating itself on all pages of the document. How can this be done?

    I'm working in Pages 4.1. I want to add text to a header but for it to appear only on that page in stead of duplicating itself on all pages of the document. Can this be done?

    See this thread: https://discussions.apple.com/thread/3728197?start=0&tstart=0

  • How to add custom buttons in the tool bar of the crystal reports viewer

    Hi,
    I'm using Crystal report viewer (Crystal 2008) in my report and I want to add custom buttons and handle them in the tool bar of the viewer. Is there anyway to achieve this?
    Please help me in this regard.
    Thanks in advance.
    Siva.

    I did this by adding a picturebox to the toolbar, the same size as the buttons, and loading in an image, and putting code into the Click event of the picturebox.
    I also put code into the MouseHover event to change the picture's background color and into the MouseLeave event to change it back.
    I have a couple of these buttons. They work very nicely and really look like part of the toolbar.

  • QIP : material assignment button at header level

    Hi everyone,
    Since QM is not my main module  : can someone explain to me what the "material assignment" button is for in a quality inspection plan (at header level)?
    Thanks in advance
    P.

    "material assignment" : consider a scenario where there is two vendors for a particular material & your requirement is to check material of different vendor with different specification.
    Then in that case you can specify the Material ,plant & Vendor in "Material assignment " field.
    Say you have maintained vendor "X" in the task list & Vendor " Y" in other group counter for same material with differnt cherectiristics in it.
    So when inspection lot with vendor X will create ,system will automatically assign the task list with Vendor X in Material specification.
    same with vendor Y.
    If you do not maintain anything against material here ,irrespective of vendor same task list will attach to all vendors.
    Also Customer specific task list same as that of Vendor can be assigned through Material assignment
    I hope this will add some value.
    Regards
    Sujit

  • Add customer button to check status screen

    hi everyone
    i'm quite new in developing srm and need your help.
    my customer wants me to put a new customer button on the check status web screen at item level which is supposed to work like the print button.
    so if i want to integrate this customer button do i have to modify the screen and html template? as far as i know there is no customer exit for this?!
    thanks in advance!

    Hi
    <u>Which SRM version are you using ?</u>
    <b>The addition of a new button for a new process means modification to standard screens, HTML templates used in the relevant Internet (Web) Services and the releavnt source code.
    Addition of button can only be done through ITS Template change.Please look in the Internet services say - BBP_BID_INV (for Bid Invitations) Or for service - BBPSC01 (shopping cart) for the exact template in whcih you want to add the button</b>
    <b>You have to define a new button in the screen and in the template. Then assign to it an OK_CODE and manage it in the PBO of the screen.</b>
    There is no BADI which can do this as this is not a SAP funtionality. You need to do a little bit of research on this to get the job done.
    <b>As a start step, You can use the BADIs - BBP_CUF_BADI and  BBP_CUF_BADI_2 to change the display from customer-defined fields to the SAP standard screen. This BAdI enables you to control whether the fields can be edited, and how they are displayed.</b>
    MODIFY_SCREEN method will Show/hide field display and restrict edit options.
    <u>For more information on BADI please go to SPRO -> BADI.
    OR View the information on BADI's.</u>
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    <u>Implement -  BADI - BBP_CUF_BADI (in SRM 4.0) to display a customized screen.</u>
    <b>Related link -></b>
    a new button required on shoppingcart screen
    <u>Hope above proves helpful to you.</u>
    Regards
    - Atul

Maybe you are looking for