on 2016 Oct 27 8:42 AM - last edited on 2024 Feb 03 6:49 PM by postmig_api_4
I want to use enhancement ME_PROCESS_PO_CUST meth IF_EX_ME_PROCESS_PO_CUST~POST( ) to do some updates in own Z* tables at the moment of Create/Change of a PO.
I would expect to be able to get the BOM data finally via method (Code extract see further IF_PURCHASE_ORDER_SCHEDULE_MM->GET_BOM( ). Issue however is that in the implementing class CL_PO_SCHEDULE_HANDLE_MM (only 1 in the system) in this method uses the switch MM_OM1_SFWS_SC to decide whether to return or not the BOM data. So although BOM data is present in the implementing class it is NOT returned by the getter as long as the Switch is NOT turned on. Can understand that this would be logic for the setter, but for the getter?
It would take us too long to check for all possible consequences of turning on the switch (Not reversible).
Part of my implementation of IF_EX_ME_PROCESS_PO_CUST~POST( )
*& -------------------------------------------------------------
*& IM_EBELN Importing Type EBELN Purchasing Document Number
*& IM_HEADER Importing Type Ref To IF_PURCHASE_ORDER_MM PO Header External View
*& -------------------------------------------------------------
DATA:
lt_items_4_ror_temp TYPE tab_mepoitem,
lt_bom TYPE mmpur_t_mdpm.
... ... ...
DATA(lt_items) " TableOfRefs2 IF_PURCHASE_ORDER_ITEM_MM
= im_header->get_items( ).
LOOP AT lt_items
ASSIGNING FIELD-SYMBOL(<item>). " IF_PURCHASE_ORDER_ITEM_MM
… … …
DATA(lt_schedules) " TableOfRefs2 IF_PURCHASE_ORDER_SCHEDULE_MM
= <item>-item->get_schedules( ).
LOOP AT lt_schedules
ASSIGNING FIELD-SYMBOL(<l_schedule>).
… … …
<l_schedule>-schedule->get_bom(
IMPORTING et_bom = lt_bom ).
* ActualClassInDebugging CL_PO_SCHEDULE_HANDLE_MM
** has switch in GET_BOM which is now turned of so it doesn't
** return the BOM's although the class knows them ?!?
** And Off Course the BOM-data is just what I Need for Updates in
** own tables at create/change of the PO
… … …
ENDLOOP. " LT_SHEDULES
ENDLOOP. " LT_ITEMS
The code of As-Is in our system CL_PO_SCHEDULE_HANDLE_MM~IF_PURCHASE_ORDER_SCHEDULE_MM->GET_BOM( )
METHOD if_purchase_order_schedule_mm~get_bom.
* check for active Outsourced Manufacturing switch
IF cl_ops_switch_check=>mm_om1_sfws_sc( ) EQ cl_mmpur_constants=>yes.
et_bom = me->mt_bom.
ENDIF.
ENDMETHOD.
My first idea is now to implement the Implicit Enhancement at the end of
CL_PO_SCHEDULE_HANDLE_MM~IF_PURCHASE_ORDER_SCHEDULE_MM->GET_BOM( ) but of course also for that it is not easy to estimate the consequences.
Anybody better suggestion?
Dirk
PS: First Time I use this new environment for asking questions and probably need to get used to it but not easy to find primary/additional tags (was used to fill in Application Components but those are not found). All change is difficult to adopt. So if I did not logical choices feel free to adapt.
Wondering how come the primary tag shows ERP Customer Order Entry. It should have been ABAP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
106 | |
9 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.