Recently, we were tasked to build a solution for a client that made it possible to transfer MPMLink Process Plans to SAP ECC Routing through an API. Due to policy in the client’s architecture, this was built as an RFC in SAP. However, the whole logic could, without huge effort, be moved into a POST request in an SAP Gateway AP. That, in many ways, would be preferred by other customers.
While we have much experience building such solutions, creating/ changing a routing in RFC development is not an entirely trivial development task. This is due to SAP only providing standard BAPI for creating routings, and not for changing the various data in the routing. Though, guidelines exist on handling changes to the various data from the SAP side in note 488765. Nevertheless, it doesn’t mean that the listed function modules listed in the note are released from SAP’s side. It seems the various function modules are stable based on the extensive tests done to ensure all the data change scenarios are covered.
All routing creations and changes are done regarding a change master that is linked with its corresponding counterpart object being a Change Notice in Windchill.
Data covered by the solution
- Header data
- Material assignment
- Option Data
- Sequence data
- PRT data
- Component Allocation data (supports Alternative BOMs as well)
Errors are naturally consolidated and returned in an SAP standard error return table. Commit of data is only at the end of the RFC if all data changes are successful in making sure not ‘half’ the datasets are aligned and the remaining data are not.
For this client, we decided to let SAP determine the group number and counter for the routing created from MPMLink. We kept the Process Plan number, Alternative and Version in the ‘Old Task List Number’ field in the header. An F4 search help was also developed for the group number. Here, the users can search for the ‘Old Task List Number’ to increase transparency across the systems. Furthermore, the routing data from SAP is sent through a production order to an MES system. Through this, the reference to the Process Plan also is important to pass.
Want to learn more? Read our other articles here