This is my requirement to update Header Note PO with Decision Note from FIORI App when processing PO Approval. when user fill decision note when PO Reject or Approve, thats decision note must send and update particular Header Note PO.

We can use BAdI /IWWRK/BADI_WF_BEFORE_UPD_IB. Go to tcode SE18 and create new implementation.

badi to update decision note fiori 1

After you create New Implementation, then fill Filter Value with PO Workflow Approval = WS20000075.

badi to update decision note fiori 2

Go to Implementing Class. and double click on it to start write your ABAP Code.

We use TDOBJECT code in Header Note F04 ( For Rejection Note ) and F03 ( For Approval Note ).

Get PO Object ID and Item Number from Workflow.

Get Object Information from Workflow Workitem and get PO Number and PO Item.

We use Decision Key to find out whether Approve or Reject.  Decision Key 0001 ( Yes / Approve ) and 0002 ( No/Reject ).

Looping internal table IT_WF_CONTAINER_TAB to get decision note and populate lt_lines internal table then run function module SAVE_TEXT to save to header note PO.

This is the full ABAP Code :

badi to update decision note fiori abap code

 

Incoming search terms: