I find the below OSS note very useful and wanted to keep it handy.
Ayhan Akkaya
Symptom
You would like to
- post consumption of some material components (not traceable material, e.g. packaging) in production scenario immediately right after posting goods receipt.
- calculate and perform consumption of those components in EWM automatically via PPF action when GR is executed.
Other Terms
Scheduling condition, PPF action, BAdI
Reason and Prerequisites
Not foreseen in EWM standard
Solution
Caution: This note contains just an basic example coding how to implement a PPF backflush imitation logic in EWM. This coding is intended to customers or consultants to start their own backflush implementation project. Therefore all parts of this example coding can be adapted in order to fit different customer perspectives accordingly.
This note shows how you can implement the consumption posting for components at the goods receipt posting using the PPF. That is to say, in case of goods receipt all components for the same manufacturing order are collected in PMR and a partial GI is posted. It contains the settings for the action profile and the code to call the necessary EWM standard code. You can adapt the logic, for example the decision which components to post and the calculation of the quantities as required for your business process.
Software Components
Software Component |
From |
To |
And subsequent | ||
---|---|---|---|---|---|
S4CORE | 102 | 102 | |||
S4CORE | 103 | 103 | |||
S4CORE | 104 | 104 | |||
SCMEWM | 950 | 950 |
Manual Activities
------------------------------------------------------------------------
|Manual Activity |
------------------------------------------------------------------------
|VALID FOR |
|Software Component S4CORE |
| Release 102 All Support Package Levels |
| Release 103 All Support Package Levels |
| Release 104 All Support Package Levels |
|Software Component SCMEWM Extended Wareho...|
| Release 950 All Support Package Levels |
------------------------------------------------------------------------1. Create BAdI Implementation ZBADI_MFG_BACK
Start Transaction BAdI Builder (SE19). In the box Create Implementation mark the radiobutton Classic BAdI and enter BAdI Name EXEC_METHODCALL_PPF. Press button Create Impl.
The system sends a pop-up. Enter the following data:
Implementation Name: ZBADI_MFG_BACK
Defined Filters: EMFG_CON
Confirm your entries.
The system navigates to the main screen for the BAdI implementation. Enter the following data:
Implementation Short Text: Method Call for post of consumption in EWM
On tab screen interfaces enter ZCL_IM_EWM_MFG_PACK_BACK as implementing class.
Activate your changes.2. Create Action Profiles and Scheduling Conditions
In IMG choose Extended Warehouse Management -> Cross Process Settings -> Delivery - Warehouse Request -> Actions -> Change Actions and Conditions -> Define Action Profiles and Actions.
a) Action Profile /SCWM/PDI_02
Select Action Profile: /SCWM/PDI_02In the view cluster tree, navigate to Action Definition. Press button New Entries.
Action Definition: EPDI_02_MFG_POST
Description: XI Message: Post Manufacturing Consumption
Tab strip Action Definition
Action Settings
Processing Time: Processing when saving document
Processing Times Not Permitted: Immediate Processing
Sort Order For Display: 0
Schedule Automatically: X
Delete After Processing: _
Changeable in Dialog: -
Executable in Dialog: -
Display in Toolbox: -
Partner Determination for the Action: Leave fields initial
Action Determination and Action Merging
Determination Technology: Determination Using Conditions that Can Be Transported
Rule Type: Conditions Using Business AddIn (BAdI)
Action Merging: EWM: Max. 1 Action for Each Action Definition, Do not Delete
Sort Fields for the Execution of Actions: Leave fields initial
Save your entries. In the view cluster tree, navigate to Processing Types.
Press button New Entries. In Table Permitted Processing Types of Action enter: Method Call using the search help. Press Enter. Mark the entry that you have created and press button Set Processing.
In box Settings Method Call, field Method enter EMFG_CON using the search help. Save your entries.3. Create BAdI Implementation ZMFG_BACK_SCHED
Start Transaction BAdI Builder (SE19). In the box Create Implementation mark the radiobutton Classic BAdI and enter BAdI Name EVAL_SCHEDCOND_PPF. Press button Create Impl.
The system sends a pop-up. Enter the following data:
Implementation Name: ZMFG_BACK_SCHED
Defined Filters: EGR_POSTING
Confirm your entries.
The system navigates to the main screen for the BAdI implementation. Enter the following data:
Implementation Short Text: Scheduling Conditions for post of consumption in EWM
On tab screen interfaces enter ZCL_IM_MFG_SCHED as implementing class.
Activate your changes.4. Create the scheduling conditions for the new action profile
In IMG choose Extended Warehouse Management -> Cross Process Settings -> Delivery - Warehouse Request -> Actions -> Change Actions and Conditions -> Define Conditions
Switch to change mode.
Press button Technical Names to facilitate navigation. You can refresh the display by toggling between Technical Names On/Off while maintaining the condition records.
a) Action Profile /SCWM/PDI_02
In box Scheduling of Actions double-click on action /SCWM/PDI_02.
Press button Create and select action Post Manufacturing Consumption from the dropdown list. On tabstrip Schedule Conditions enter EGR_POSTING as Schedule Condition using the search help.
Start Transaction Class Builder (SE24).
Enter ZCL_IM_MFG_SCHED and create Imp. Class for BAdI Imp. ZCL_IM_MFG_SCHED.
Implement the following Interface IF_EX_EVAL_SCHEDCOND_PPF by entering the name in implementation section.Switch to Source Code-Based editor mode and copy the attached coding from ZCL_IM_MFG_SCHED.txtAfterwards save and activate.Go back to the Class Builder Initial Screen SE24.
Enter ZCL_IM_EWM_MFG_PACK_BACK and create optionally with description ‘Consumption Back flushing in EWM’.
Define /SCWM/CL_DLV_PPF_EXEC as superclass.
Implement the following Interface IF_EX_EXEC_METHODCALL_PPF by entering the name in implementation section.
IF_EX_EXEC_METHODCALL_PPFSwitch to Source Code-Based editor mode and copy the attached coding from ZCL_IM_EWM_MFG_PACK_BACK.txtAfterwards save and activate.