INTRODUCTION

In the Extended Classic Scenario of the SAP Supplier Relation Management module, we know that the Purchase Orders are created in the SRM system and is then replicated or copied back to the ECC system. In other words, in an extended classic scenario, the procurement process takes place in the SAP SRM system. The purchase order is created in the SAP SRM system and a read-only copy of the purchase order is replicated to the backend system.

For more information related to the Extended Classic Scenario in SAP SRM, please find the below link:
https://blogs.sap.com/2013/05/05/sap-srm-extended-classic-deployment-scenario

Now suppose that the client’s SRM consultants want to have a custom program to update the Purchase Order(s) in the SAP SRM system in MASS, where one would pass the excel file as input to the program with the details like PO Number, line item number and the columns/fields which they intend to change through the program.

This program will then try to update the Purchase Order in the SAP SRM system, and then the changes shall be reflected back in the SAP ECC system as these systems are fully integrated with each other.

FLOW DIAGRAM

Flow%20Diagram

PROGRAM FLOW

Now here we will discuss the flow of the program or in other words, I will share the sequence of standard function module calls to achieve the requirement.

  1. GET DETAIL: At first, we shall try to get the details of the purchase order we intend to modify or update. The same can be retrieved by the use of the standard Function Module “BBP_PD_PO_GETDETAIL“.
    With the use of this FM, we will get the details like HEADER, ITEM, ACCOUNT, PARTNER, STATUS information of the purchase order.
  2. MODIFY DATA: Now suppose (just as an example, make sure you know what you are doing and what impact it will have substantially), you intend to modify the Cost Center, Fund Center, or WBS Element of a line item of the purchase order(these details can be found in the Accounting details for each line item of the purchase order), so you update the Cost Center, Fund Center or WBS Element of a line item of the purchase order in the Accounting details internal table.
    Then, we wish to update the Purchase Order, after implementing all the checks and validations in your program.
    You can check the basic errors in the purchase order using the FM: “BBP_PD_PO_CHECK
  3. Accounting INFO Check: Now, in between, if you would like to make a check, if there is enough budget available to complete the change, then you can use the FM: “B700_ACC_PURCHASE_ORDER_CHECK” before you update the information.
  4. UPDATE PO: Now, we can try to update the modified information using the FM: “BBP_PD_PO_UPDATE
    Function%20Module%3A%20BBP_PD_PO_UPDATE
    If you think this is enough, to update the PO in SRM, then you are mistaken ?
    This FM just acts like an EDIT Button on the screen.
    Till now, you have just pressed the EDIT button and made the changes, generating a new Change Version. Next, we will save the Change Version of the Purchase Order.
  5. SAVE the PO: Now, we will save the changes using the FM: “BBP_PD_PO_SAVE
    BBP_PD_PO_SAVE
  6. ORDER the PO: Now, we will order the changes using the FM: “BBP_PD_PO_STATUS_CHANGE
    BBP_PD_PO_STATUS_CHANGE
  7. RELEASE the PO: Ideally, whenever we make a change to the PO in the SAP SRM system, one workflow gets triggered. The work item reaches the inbox of the concerned stakeholder or approver for approval. But, in this case, we would require an automatic approval process, provided the user executing the program has the required authorization.The FM which is used here is “BBP_PD_PO_STATUS_CHANGE_WF” as follows:
    BBP_PD_PO_STATUS_CHANGE_WF
  8. COMMIT and RESET: If everything goes well and you did not receive any error, then you can COMMIT the WORK and reset the buffer using the FMs “BAPI_TRANSACTION_COMMIT” and “BBP_PD_PO_RESET_BUFFER” respectively.

NOTE:

Some settings are configured in ECC, therefore in case you pass wrong values, you will be in a dilemma when the values will not get updated in ECC.

For example, if Funds Management is applied in the ECC system, then there is a possibility that the Fund Center will be getting derived either of the below combinations:
1. Cost Center to Fund Center derivation. OR
2. GL Account to Commitment Line item to Fund Center derivation.

REFERENCES

  • https://help.sap.com/viewer/5cd86364e18a49c6a01a79557b61416a/7.04%20SP11/en-US/45f7600cacf806f8e10000000a155369.html
  • https://help.sap.com/viewer/5cd86364e18a49c6a01a79557b61416a/7.04%20SP11/en-US/4efd07236bf24dc48975b49c30c1a9a8.html
  • https://help.sap.com/viewer/d277b8781ce94d098906075a23db0cc8/7.04%20SP15/en-US/7b303780eb29438d8dd1bacba29edc7a.html
  • https://help.sap.com/viewer/8d30b08cce92443987c937e2e1b37c8a/7.04%20SP05/en-US/db82abb3011444c1b09d4cd514303966.html

CONCLUSION

This way you can update the Purchase Order in SAP ECC from SRM, without creating an RFC enabled function module in ECC for this purpose.

For any issues, improvements, additions, or any other concerns, please feel free to contact me.

I look forward to your feedback and suggestions.

Keep learning!! Keep improving!!

Randa Khaled

Randa Khaled

Author Since: November 19, 2020

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x