Skip to Content
Product Information
Author's profile photo Alice Ying

From Asset Costs in Purchase Order to Accrual Posting

When do I need purchase order accruals? Are there any exceptional cases?

The Purchase Order Accruals application enables you to calculate and post accruals in General Ledger Accounting automatically. Accruals can become necessary in the context of the purchasing of products that are directly consumed, such as office materials, raw materials to be used for production, or the purchasing of services that have been received over a certain period of time, such as IT consulting. Purchase order items for these kinds of purchases usually have an additional account assignment, such as a cost center.

However, this is usually not the case for costs for fixed assets. Some business requirements are emerging where there is a need to apply purchaser order accruals to asset purchasing. This is not a standard solution of the purchase order accruals application, because this kind of asset type data in a purchase order is excluded from the transfer scope in the Transfer Orders to Accrual Engine job. For SAP S/4HANA Cloud users, we now provide a BAdI solution to satisfy the requirement that asset costs can be calculated as accruals and posted to an asset account. All you need to do is implement two BAdIs.


I want to create a purchase order with the asset category and enable the system to transfer the purchase order to the Accrual Engine, and finally post an accrual entry to the General Ledger.

The solution mainly uses two BAdIs, one for removing the transfer restriction that excludes the asset type of purchase orders, and the other for replacing the reconciliation account for asset purchase with a G/L account where accruals can be posted.

Please note that the solution is for SAP S/4HANA Cloud only.


  1. Open the Custom Logic app as an Administrator.
  2. Create an implementation of BAdI Change sel. Criteria and fields for PO selection.
    a. Create a new an implementation entry.
    b. In the New Enhancement Implementation dialogue box, provide the following values:
    * Business Context: Purchase Order Accruals
    * BAdI Description: Change sel. Criteria and fields for PO selection
    * Implementation Description: <add description>
    c. On the Available Fields tab, copy the following code in the Published Logic pane:

    o_poheaderselectedfields = i_poheaderselectedfields.
     o_poitemselectedfields = i_poitemselectedfields.
     o_poitemassignmtselectedfields = i_poitemassignmtselectedfields.
     o_poitemscheduleselectedfields = i_poitemscheduleselectedfields.
     o_poheaderselectoptions = i_poheaderselectoptions.
     o_poitemselectoptions = i_poitemselectoptions.
    *   allow asset purchasing
    DELETE o_poitemselectoptions where fieldname = 'KZVBR' and sign = 'E' AND low = 'A'.

    Note: By default, purchase order items that represent a purchasing into asset are excluded from being selected by the transfer process to the Accrual Engine. In this step, you can delete the excluding condition in the implementation.

    d. Publish this logic.

  3.  Create an implementation of BAdI of Accrual Engine: Modify Journal Entry Line Items (Cloud).
    a. Create a new an implementation entry.
    b. In the New Enhancement Implementation dialogue box, provide the following values:
    * Business Context: Accrual Engine
    * BAdI Description: Modify Journal Entry Line Items (Cloud)
    * Implementation Description: <add description>
    c. On the Available Fields tab, refer to the following code in the Published Logic pane:

    DATA: ls_line_item_changed LIKE LINE OF ct_line_item_changed.
     LOOP AT it_line_item_orig REFERENCE INTO DATA(lr_line_item_orig).
     MOVE-CORRESPONDING lr_line_item_orig->* TO ls_line_item_changed.
    IF ( ls_line_item_changed-symbolic_account = 'PER_OFFSTNG_ACCNT' ) and ls_line_item_changed-glaccount = '0016014000'.
                  ls_line_item_changed-glaccount = '0010010000'.
    "In case the new account requires an additional account assignment like cost center
    "ls_line_item_changed-s_assgmnt-cost_center = 'TEST'.
     APPEND ls_line_item_changed TO ct_line_item_changed.


      * The code serves as an example only. 0016014000 stands for an example reconciliation account and 0010010000 stands for a G/L account to which you want the accruals to be posted. Please replace the account numbers to meet your business requirements.
    * In case the G/L account requires an account assignment (for example, the cost center) you can replace ‘TEST’ with the actual cost center ID.

d. Publish this logic.


After implementing the steps above, you can create a purchase order of type ‘asset’ and check if it can be posted successfully as accruals by the Accrual Engine.

Here are the key steps and screenshots of apps.

  1. Create a purchase order with the Asset category in the Manage Purchase Orders app.

  2. (Optional) Run an accrual job for purchase order transfer in the Schedule Accruals Jobs app.
    Note: If you’ve configured online transfer in the Define Accrual Item Types and Methods for MM Purchase Order Items activity, you can skip this step.
  3. Check the job running result. The purchase order is transferred to the Accrual Engine.
  4. Check the accrual object in the Display Purchase Order Accruals app.
  5. Run a posting job with template Post Periodic Accruals in the Schedule Accruals Jobs app.
  6. Check the job running result. The accrual object is posted successfully.
  7. Check the posted journal entry in the Display Purchase Order Accruals app.

For more information about purchase order transfer, please refer to:

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.