Overriding delivery type customizing to stop distribution of Inb delivery to EWM
Delivery type is customized to distribute the Inb delivery to EWM during the creation. However, the business requirement is to hinder the distribution for some deliveries during the creation and distribute them later.
The customizing path for the delivery type is customizing is as follows:
Spro > Logistics Execution > Shipping > Deliveries > Define Delivery Types
with the above mentioned customizing, delivery will be created with value B .
Overriding the customizing by enhancing Subroutine beleg_verteilung_pruefen in Program SAPMV50A
At the end of this subroutine , there is an enhancement point which could be used to suspend the distribution.
Sample code as follows.
IF t180-trtyp = 'H'. " H represents Create mode for Inb delivery . * your condition on the basis of which during creation distribution has to be suspended IF sy-subrc eq 0. * Set VLSTK as D , if an entry exists. cf_likp-vlstk = chard. ENDIF. ELSEIF t180-trtyp = 'V'. * Also the change mode has to be handled here. otherwise vlstk is set to status B [Distributed] . V represents the change mode through vl32N. [Change through idoc has to be tested.] * your condition on the basis of which during change distribution has to be suspended or set for release after the checks IF sy-subrc eq 0. IF checks_done EQ 'X'. cf_likp-vlstk = chara. ELSE. cf_likp-vlstk = chard. ENDIF. ELSE. * this delivery is not relevant. No intervention . ENDIF. ENDIF.
Creation and change mode both has to be handled here and the relevant logic to set the release ok has to be implemented too.
Badi le_shp_modify_distrib_status is marked as ‘can only be implemented internally at SAP’, otherwise that could have been a great possibility.
If there are any Questions or additional information, please comment below.
Thanks for insight.I am also planning to ignore decentralize warehouse set up for one of my plant. Are you able to manage this? Can you please let me know which BADI or enhancement spot you ?used?
For my Requirement , I have used the following enhancement point in the above mentioned subroutine. There you should be able to check on the plant basis as well.
ENHANCEMENT-POINT EHP603_BELEG_VERTLG_PRUEFEN_01 SPOTS ES_FV50XF0B_BEL_VERT_PRUEF INCLUDE BOUND .