Scroll Top

MES Driven Consumption with EWM and Digital Manufacturing

Shailesh Mishra is a SAP EWM Senior Consultant. Shailesh has deep Expertise in implementing and offering SAP EWM best practices solution and EWM deployment options on S/4 Hana embedded versions and decentral versions supporting various business verticals like Pharma, Food industry and Manufacturing. Cross module knowledge of SAP ERP logistics like SAP MM, SD and Production Planning. Strong technical knowledge of SAP ABAP.  You can reach him at [email protected].

 

Back this month is our resident EWM expert Shailesh to explain how the usage of EWM MES Function Modules, especially, Consumption from Production FM /SCWM/MFG_CONSUME_ITEMS_EXT can be leveraged for Automation of Consumption for Single, Cross Order Items, Crate Parts & Manually staged Items(Adhoc Transfers). These FMs are building blocks of MES EWM integration and are highly used in Digital Manufacturing system.

All the EWM MES FM starting from /SCWM/MFG_* are primarily used in Staging, consumption & Reversal, GR & GR reversal and are building blocks for Digital manufacturing

For automation of the consumption process, or the staging, the external Function modules can be called. All *MFG*EXT function module can be called from own custom program like from PPF, or from Idoc. Not necessary to have MES system for using these FMS, even with simple S/4 HANA, embedded EWM or Decentralized EWM, these /SCWM/MGF_* FMs can be seamlessly used for Automation like Auto GI during receiving. These FMs are provides seamless integration for Digital Manufacturing Integration using Advanced Production Integration APIs.

MES

MES

With EWM 9.2, an internal API was introduced for an easy integration of the EWM production processes with Manufacturing Execution Systems (MES)

  • Provide an easy-to-use programming interface for receipt (and reversal) of handling units.
  • Provide an easy-to-use programming interface for Consumption (and reversal) of handling units
  • Provide an easy-to-use programming interface for reading the HUs stocks, the probable HUs to be consumed in a Manufacturing Order.

How to Use /SCWM/MFG_CONSUME_ITEMS_EXT

Function Module /SCWM/MFG_CONSUME_ITEMS_EXT can be widely used to consume Production material requests (PMRs) with Single, Cross, Crate Part as well manually staged Item. Lets take a look at the scenario below.

A PMR is created with Single and Cross items have been created with creation of Manufacturing Order in S4 system.

MES PMR

Since, no consumption has been carried, hence consumption quantity is marked as zero in PMR document. Once staging is performed, stocks are moved to Production Supply Area (PSA). The components are packed in handling units and labeled and moved to PSA.

MES Consumable PSA Stock

Now you can Call FM /SCWM/MFG_CONSUME_ITEMS_EXT. This FM can be called from any external system using Idoc, custom program, custom RFC or through PI message.

Testing FM/SCWM/MFG_CONSUME_ITEMS_EXT

Testing MES API

This function module invokes the method POST_CONSUMPTION of the API /SCWM/IF_API_MFG_CONSUMPTION, which enables to post consumption from production for packed and unpacked goods. The packed goods means technically products having HU labels and unpacked signifying loose items.

Lets take a look at the formal parameters. First the import…

IV_LOGSYS (mandatory)
Contains the logical system of the ERP system.

IV_WHS_NUMBER (mandatory)
Contains the ERP warehouse number. The ERP warehouse number and the logical system are used to determine the EWM warehouse number.

IV_ORDER_NUMBER (mandatory)
Contains the manufacturing order number. This number is usually the ERP manufacturing order number.

IT_ITEMS (mandatory)
Contains the items of the manufacturing order for consumption postings. An item consists of the material, the reservation item, the production supply area, the handling unit (optional), the batch (for batch managed materials) and the quantities to be consumed. In my case, HU is passed in FM as components are packed in HU. If stocks in PSA are in unpacked form, HU field is not used, instead GM BIN needs to be passed. !Do not pass Reservation number and reservation items no, it may cause locking of reservation when records are processing in short span of time.

IT_SERIAL_NUMBERS (optional)
Contains the serial numbers of materials which are serial number managed. For serial number managed products, the unique serial numbers have to be passed in this table to identify which serial numbers are to be consumed.

 

Now lets look at what is exported back…

EV_GMDOC
Contains the number of the goods movement document in EWM.

ET_BAPIRET
Contains the message information.

Once FM is successfully called, it performs the consumption in PMR and documents goods movement is updated in Manufacturing Order in S4 (see below)

MES PMR Consumption


New functionality available via
SAP notes implementation

 

Once implemented, Note #3309692 provides consumption by Operation number & Work Center.

SAP has provided a note which introduces 2 additional fields in FM/SCWM/MFG_CONSUME_ITEMS_EXT, Operation Number and Work Center ( Applicable for 1909 & Higher version).

A PMR is created with same items having assigned to 2 different Operation number and Work center. (see below)

PMR with Diff OP and Work Centers

Now when using the FM, please pass Operation number when components are assigned with different operation number as shown below…

MES PMR Operation passed

The system considers the operation number and consume component assigned to operation 20 only, again see below.

MES PMR Operation passed result

SAP has provided another note, # 3321600 for consumption by stock identification. This note introduces an additional field in FM /SCWM/MFG_CONSUME_ITEMS_EXT to consume by Stock Identification.

MES Stock Identification

Finally you can set the IS-Dynamic  in the FM as shown below for usage in Dynamic Staging, PMR relevant for MES driven Staging

MES Dynamic

With this feature, you can supply components to production supply areas (PSAs) after a manufacturing execution system (MES) re-plans the manufacturing activities by reallocating operations to different production resources.

The function module /SCWM/MFG_CONSUME_ITEMS_EXT has been extended with a new field ‘’Dynamic Staging’ IS_DYNAMIC field to allow the functionality as shown above.. lets look at an example…

MES Replan

The way this process works, once the Manufacturing Order is created in S/4HANA, a Production Material Request (PMR) is created on the SAP EWM side (where PSA1 and PSA Bin 1 are determined). However, before staging is planned, MES replans the manufacturing operations to a different production resource (or work centre). MES creates a staging request to a new PSA and EWM creates a warehouse request to a new PSA bin (where PSA 2 and PSA Bin 2 are determined).

EWM then confirms the staging to the new PSA and sends out a Stock Change Notification to MES, which in turn synchronizes the PSA stock. MES then proceeds to consume stock from PSA 2 during the manufacturing process, and triggers EWM to post consumption of stock from PSA Bin 2. EWM sends out Stock Change Notification to MES. The following graphic shows the overall process for dynamic staging, using SAP Digital Manufacturing Cloud (DMC) as an example of the MES.

Summary

A MES (Manufacturing Execution System) is a software solution that helps manufacturers plan, execute and monitor their production activities in real-time. The SAP Digital Manufacturing and EWM integration,  provides an efficient way to manage material staging in your manufacturing processes. By leveraging these FM’s , you can streamline your material staging, reduce production delays, and improve overall efficiency.

ITP logo

If you enjoyed this blog, MES Driven Consumption with EWM and Digital Manufacturing, please fill out the form below to sign up for our newsletter. We deliver SAP Technical tips & tricks, SAP news, and the current month’s BLOG right to your inbox!

Related Posts

Related Posts