cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger Order button in SC creation from a custom button

former_member610985
Participant
0 Kudos
112

Hi Experts,

I have enhanced the standard WD component: /SAPSRM/WDC_UI_SC_DOTC_BD and created a custom button in the view: V_SC_DOTC_BASIC. When i click this custom button, the standard 'Order' button should be triggered. Please guide me how to trigger the Order button event from the custom button.

Thanks

Arun.

Accepted Solutions (0)

Answers (1)

Answers (1)

RicardoRomero_1
Active Contributor
0 Kudos

Hi,


Try with something like this:


DATA:

  lv_guid      TYPE bbp_guid,

  lo_pdo               TYPE REF TO /sapsrm/if_pdo_bo_sc_adv,

  lo_pdo_msg_consumer TYPE REF TO /sapsrm/if_pdo_msg_consumer.

*lv_guid = WD_COMP_CONTROLLER->MO_BOM_SC->/sapsrm/if_cll_bo_mapper~get_bo_guid( ).

*lo_pdo  = /sapsrm/cl_pdo_factory_sc_adv=>get_buffered_instance( lv_guid ).

  lo_pdo ?= wd_comp_controller->mo_bom->/sapsrm/if_cll_xo_mapper~get_pdo( ).

CALL METHOD lo_pdo->/sapsrm/if_pdo_bo_sc~order

  CHANGING

    co_message_handler = lo_pdo_msg_consumer.

*  lo_pdo->/sapsrm/if_pdo_base~submit_update( CHANGING co_message_handler = lo_message_handler ).

  wd_comp_controller->mo_bom->/sapsrm/if_cll_xo_mapper~fire_event_refresh( ).

Or this:


CALL METHOD WD_COMP_CONTROLLER->MO_BOM_SC->order

*  IMPORTING

*    ev_succeed =

.

If does not work try putting a break point in class /SAPSRM/CL_CH_WD_BOM_SC

and method /SAPSRM/IF_CLL_BOM_SC~ORDER and debug what is doing the standard code.

Regards,
Ricardo.