Skip to Content
Author's profile photo Jerry Wang

An example of how cross distribution chain status is updated via draft handling in Fiori application

The explanation why draft handling is necessary in Fiori application could be found from Fiori Design Guideline.

In this blog, I will use the update of field “cross distribution chain status” in S4 Product master Fiori application as example.
This field could be found from Fiori UI:
There is corresponding field in old SAPGUI transaction MM03:

The value is stored in table MARA, field MSTAE.
The available list of status value could be maintained in this customizing:
When end user clicks edit button and chooses a given value from dialog and press enter key:
The draft instance of this product will automatically be persisted in the backend.

At this time ( product is still in edit mode ), we can find out the lock is still acquired via tcode SM12. Also the draft uuid would be found:

How to find the database table which stores the draft data of Cross distribution chain status?
In tcode BOBX, open BO I_PRODUCTWD and double click node I_PRODUCTSALESWD, you can find out table name PROD_SALES.

Query this table with the draft uuid found from SM12 against field PARENTDRAFTUUID, and you can find one corresponding entry for draft instance in Fiori UI.
The parent entry could be found in PROD_ROOT:
When user clicks save button in Fiori UI, an HTTP post will be sent to backend:

The method COPY_DRAFT_TO_ACTIVE_DOCUMENT of class configured in BOBX is called, to merge the data in draft table to MARA, this is called activation.

The persistence to MARA is done by function module MATERIAL_MAINTAIN_DARK:
The value to be persisted is maintained in table parameter amara_ueb:
Meanwhile once activation is done successfully, the draft entry will be removed automatically.
In summary, the draft handling process could be described in the following graphs:
         Figure1: user input is stored in draft table PROD_SALES

         Figure2: user clicks save button

       Figure3: user clicks save button

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Oliver Russinger
      Oliver Russinger

      Hello jerry,

      very good blog!

      we need to implement exactly what you are writing, but with an ERP 6 backend(Netwevaver 740). Is it with this releasy also possible to set a lock in backend via a stateless fiori-app. And if so, how ? as today, calling the enque function from a stateless app is only as long alive as the rfc-task for that operation is alive.


      And if not, is it maybe possible with EHP8 Netweaver 7.50 based release or only s/4 hana?

      best regards,