Supply Chain Management Blogs by SAP
Expand your SAP SCM knowledge and stay informed about supply chain management technology and solutions with blog posts by SAP. Follow and stay connected.
cancel
Showing results for 
Search instead for 
Did you mean: 
SaraMani
Advisor
Advisor
475

SAP Digital Manufacturing (SAP DM) is an advanced solution designed to optimize and execute manufacturing processes. However, it currently lacks support for a correlation framework, which limits its capabilities to only standard workflows. The standard workflow is capable of receiving and transforming the original message before it is sent to the target system. In contrast, a correlation workflow can receive, correlate, and aggregate multiple messages into a single message before forwarding it to the target system. This aggregation capability significantly reduces network traffic and transactional load on the target system.

Example Scenarios

In high-volume and parallel message processing scenarios, such as when customers post a large number of SFC (Shop Floor Control) completions in SAP DM, each SFC completion generates a yield confirmation message. This results in CPI (Cloud Platform Integration) processing a high volume of messages that need to be sent to the ERP system, thereby causing excessive postings on the ERP side.

Challenges without Correlation Support

Since SAP Digital Manufacturing does not currently support correlation, customers face several potential challenges:

  1. Heavy Load on ERP System: A large number of messages posted to the ERP system can cause significant load and potential performance issues.
  2. CPI Processing Delays: CPI can struggle to keep up with the high volume of message processing.
  3. Reservation/Material Locking Issues: Frequent and parallel postings can lead to reservation/material locking issues, hindering other operations.
  4. Measurement Document Creation Issues: The heavy load may cause SAP DM to generate multiple messages at the millisecond level, which ERP supports only at the second level. This discrepancy can result in failures in creating measurement documents in the ERP, as documents may already exist with the same timestamp.

Implementing Workarounds with Custom Approaches

To address these challenges, custom approaches can be implemented to simulate correlation. Apart from the correlation approach, one effective method involves queuing confirmation messages in the ERP and decoupling the goods issue posting of the components from the actual confirmation.

Queueing in ERP

  1. Queuing Confirmation Messages: Confirmation messages sent to ERP can be queued and processed asynchronously to avoid bottlenecks in posting large numbers of confirmation messages or parallel yield confirmation messages, thus preventing reservation lock issues. Refer to SAP Note 2016712 for implementing queuing in ERP.
  2. Decoupling Material Document Posting: Material document postings, such as goods issue postings, can be decoupled from yield confirmation messages to avoid material locking issues. Refer to SAP Note 1793291 section #12 for more information on decoupling goods movement postings from yield confirmation postings.
  3.   Limitation: As confirmation messages are posted asynchronously using the queuing approach in ERP, SAP DM will not be able to cancel the corresponding confirmation message. In such cases, customers can cancel any confirmation message directly in ERP.

If the above workaround does not meet customer requirements, a custom correlation logic implementation may be necessary.

Steps to Implement Custom Correlation in CPI

1. Message Reception in CPI: - When a confirmation message is received in CPI, a custom service workflow is triggered to handle this message.

sara_mani_0-1722451771503.png

 

2. Persisting the Message: - The custom service workflow stores the message in a custom table. The table includes a correlation key which groups similar messages for future aggregation. - The correlation key can be derived from message parameters such as "Order Number + Operation". - Example: For a yield confirmation message, the correlation key might be `ORDER_NUMBER + OPERATION`. - This correlation key can be customized according to customer requirements.

Example Table Structure: 

sara_mani_1-1722510985716.png

Note: The table structure could be expanded as per customer requirements. Initially, the ‘STATUS’ column is set to `OPEN`.

3. Implement a Scheduler Program

a. Objective: To automate the process of checking, aggregating, and sending message data to the ERP system periodically.

b. Implementation Details:

1. Periodic Checking of Unprocessed Records: - Develop a scheduler program that runs at regular intervals to check for unprocessed records with `OPEN` status.

2. Verification for Aggregation: - The program verifies if there are enough records with the same correlation key to justify aggregation. - This verification could include checking if a minimum number of messages have been received or if certain business conditions are met.

3. Data Aggregation: - Once the conditions are met, the program aggregates the quantities from these messages. - Example: If there are 25 records with the correlation key `ORDER-001, DRILLING`, their quantities will be summed up if customer requirement is to group and aggregate every 25 messages with the same correlation key.

4. Sending Data to ERP System: - The aggregated information is formatted as required by the ERP system and sent. - This ensures that the ERP system receives data in a consolidated form, reducing the number of messages processed by the ERP system.

5. Updating Record Status: - After successfully sending the aggregated information to the ERP system, the status of the processed records in the custom table is updated to `CORRELATED`.

6. Note: Customers can also implement notification, guaranteed delivery, and/or retry mechanisms themselves, as this approach bypasses SAP Digital Manufacturing Integration logic.

c. Example Scheduler Program Workflow:

1. Check for Unprocessed Records: - Identify records with `OPEN` status.

2. Aggregate Quantities: - Group records by correlation key and sum the quantities for each group.

3. Send to ERP: - Format the aggregated data and send it to the ERP system.

4. Update Status: - Change the status of the processed records from `OPEN` to `CORRELATED`.

d. Technology Options:

The scheduler program can be built using various technologies, such as

i.  Java, JavaScript, Python

ii. Built-in scheduling tools available in CPI.

iii. Business Automatic Trigger -> Timer, which can also be used to trigger the schedule.

4. Cleanup of Processed Records

a. Objective: To maintain the efficiency and manageability of the custom table by removing processed records.

b. Implementation Details:

Periodic Cleanup: - Develop another scheduler program that runs at predefined intervals to clean up records marked as `CORRELATED’.

 

sara_mani_2-1722452312179.png

 

SaraMani_0-1722522267097.png

 

 

By implementing these custom solutions, customers can effectively manage high volumes of messages, reduce the load on their ERP systems, and mitigate potential reservation and material locking issues.

Conclusion

In conclusion, while SAP Digital Manufacturing may not currently support correlation workflows natively, customers can achieve a significant performance boost and operational efficiency by adopting these custom strategies. Persisting messages with correlation keys, aggregating them before forwarding to the ERP system, and periodically cleaning up processed records ensures a streamlined workflow and effective resource usage.

These custom solutions provide an immediate path to success, allowing customers to run their scenarios seamlessly. Moreover, this proactive approach positions customers well to leverage future innovations and enhancements that SAP may introduce to further optimize these processes. By staying ahead of the curve, customers can continue to enjoy efficient operations and stay at the forefront of technological advancements in SAP Digital Manufacturing.