Skip to Content
author's profile photo Former Member
Former Member

Adding new button on SC Item Overview Tool Bar

Hello,

I need to add a new button on shopping cart Item Overview screen next to the u201Cprocess all itemsu201D or u201Cdeleteu201D button and provide metadata( i.e. enable the button only in change mode) and action(I need to change some data on all SC line items when the button is clicked).

Can anyone give me some clue on how to achieve it? Iu2019m on SRM 7.0

Thanks,

Shekar

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2011 at 07:52 AM

    Hello,

    1.Enchance the webdynpro component /SAPSRM/WDC_UI_PO_DOTC_IT

    And create a button in the view layout V_PO_DOTC_BASIC.

    2. IN button properties onaction create on click on that action.

    3. IN method on click button code your logic.

    DATA : ls_header_po TYPE bbp_pds_po_header_d,

    lt_item TYPE bbpt_pd_po_item_d,

    ls_pd_item TYPE bbp_pds_po_item_icu,

    lt_pd_item TYPE bbpt_pd_po_item_icu,

    lo_bom_po TYPE REF TO /sapsrm/if_cll_bom_po,

    lo_bom_ctr TYPE REF TO /sapsrm/if_cll_bom_ctr,

    lo_bo_po_adv TYPE REF TO /sapsrm/cl_pdo_bo_po_adv,

    lo_bo_ctr_adv TYPE REF TO /sapsrm/cl_pdo_bo_ctr_adv,

    lo_pdo TYPE REF TO /sapsrm/if_pdo_base,

    lo_task_factory TYPE REF TO /sapsrm/if_cll_taskcon_factory,

    lo_task_container TYPE REF TO /sapsrm/if_cll_task_container.

    DATA : lx_pdo_no_authorization TYPE REF TO /sapsrm/cx_pdo_no_authorizatio,

    lx_pdo_wrong_mode TYPE REF TO /sapsrm/cx_pdo_wrong_mode,

    lrcl_current_controller TYPE REF TO if_wd_controller,

    lrcl_message_manager TYPE REF TO if_wd_message_manager.

    • get single attribute guid

    lo_el_header->get_attribute(

    EXPORTING

    name = `GUID`

    IMPORTING

    value = lv_guid ).

    lv_header_guid = lv_guid.

    *Get the PO details

    CALL FUNCTION 'BBP_PD_PO_GETDETAIL'

    EXPORTING

    i_guid = lv_guid

    IMPORTING

    e_header = ls_header_po

    TABLES

    e_item = lt_item

    e_account = lt_account_update.

    LOOP AT lt_item ASSIGNING <fs_item>.

    HERE Chnage the according to your requirement and fill into lt_pd_item.

    ENDLOOP.

    lo_task_factory = /sapsrm/cl_ch_wd_taskcont_fact=>get_instance( ).

    IF lo_task_factory IS NOT INITIAL.

    lo_task_container = lo_task_factory->get_task_container( ).

    IF lo_task_container IS NOT INITIAL.

    lo_bom_po = lo_task_container->get_bom_po( ).

    lo_pdo = lo_bom_po->/sapsrm/if_cll_bo_mapper~get_pdo( ).

    lo_bo_po_adv ?= lo_pdo.

    ENDIF.

    ENDIF.

    CALL METHOD lo_bo_po_adv->/sapsrm/if_pdo_bo_po~update_item

    EXPORTING

    it_item = lt_pd_item.

    CATCH /sapsrm/cx_pdo_no_authorizatio INTO lx_pdo_no_authorization .

    RAISE EXCEPTION TYPE /sapsrm/cx_pdo_abort EXPORTING previous = lx_pdo_no_authorization.

    CATCH /sapsrm/cx_pdo_wrong_mode INTO lx_pdo_wrong_mode .

    RAISE EXCEPTION TYPE /sapsrm/cx_pdo_abort EXPORTING previous = lx_pdo_wrong_mode.

    ENDTRY.

    " don't forget to submit the changes

    lo_pdo->submit_update( ).

    Regards,

    Neelima

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello,

      Please you this for POP UP.

      1.Enchance the webdynpro component /SAPSRM/WDC_UI_PO_DOTC_IT

      And create a button in the view layout V_PO_DOTC_BASIC.

      2. IN button properties onaction create on click on that action.

      3. IN method on click button code your logic and create new view 'V_FILL'

      in enchacement of /SAPSRM/WDC_UI_PO_DOTC_IT .

      4. In this View make sure u have a button 'OK' and with message Purchase group is updating in all items

      5. ON Ok button action use above to update.

      CALL METHOD wd_comp_controller->mo_bom_po->/sapsrm/if_cll_bo_mapper~fire_event_refresh( ).

      • navigation

      lo_wd_controller = wd_this->wd_get_api( ).

      lo_wd_component = lo_wd_controller->get_component( ).

      lo_window_manager = lo_wd_component->get_window_manager( ).

      DATA: lv_title TYPE string.

      lv_title ='Select Columns'.

      CALL METHOD lo_window_manager->create_window

      EXPORTING

      modal = abap_true

      window_name = 'W_FILL'

      title = lv_title

      close_button = abap_true

      message_display_mode = '1'

      is_resizable = abap_false

      RECEIVING

      window = lo_window.

      lo_window->open( ).

      • ENDIF.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.