cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture the decision note from My Inbox in Workflow

Hi Experts,

When "Approving" or "Rejecting" an Workitem in Fiori My Inbox im able to add a Note to my Decision.

How can i capture this Decision Note in my Workflow ?

With this Coding i was able to capture the Decision Note when "Approving" or "Rejecting" the Workitem in the Business Workplace. This Coding doesn't work when "Approving" or "Rejecting" the Workitem via Fiori My Inbox.

Anyone any Ideas ?

Thanks in advance for any responses.

Accepted Solutions (1)

Accepted Solutions (1)

bpawanchand
Active Contributor

Hi,

Did you try to implement the above mentioned code in the badi /IWWRK/BADI_WF_BEFORE_UPD_IB.

Regards

Pavan

0 Kudos

Hi Pavan,

the badi "/IWWRK/BADI_WF_BEFORE_UPD_IB" should get triggered pre my Action (the Coding you see above) right ?

https://help.sap.com/fiori_bs2013/helpdata/en/dd/fc595461fce630e10000000a44538d/content.htm?no_cache...

Since i don't get an "Attached Object" as result, calling this Coding earlier in the Process, shouldn't have an Impact right or am i missing something ?

Greetings

Jan

bpawanchand
Active Contributor
0 Kudos

Hi Jan,

One of the reasons I assume it could make a difference is, look at the signature of the method "before update". You have decision key as input. which means logically when the user clicks on to approve or reject button this parameter must be populated with decision key either. Logically speaking, the user finished his action. As you have highlighted, I interpret the statement as that you want something to be updated or some information must be read from the work item container before the workflow step gets completed. Please correct me as well. It would be nice if you can share the solution if you have fixed it.

Regards

Pavan

0 Kudos

Hi Pavan,

the Decision Key ist not the Problem. It's the Decision Note.

When processing the Workflow via SAP GUI (Business Workplace) the Decision Note of the User get's stored in the "Attached_Objects". After that i am able to read the Note via the Coding above.

When processing the Workflow via Fiori (My Inbox) the Decision Note of the User doesn't get stored in the "Attached_Objects". So im unable to read the Note.

Still thanks for the Input. I will share the Solution when i fixed this Problem.

Greetings Jan

Edit:

https://answers.sap.com/questions/398446/how-works-the-storage-of-notes-rejectionapproval-n.html

"What does this mean? Add your own logic? there must be a standard way because the BAdI implementations, methods already exist, This is just about the decisions comment." - In this Post it seems like i have to add my own Logic for every Scenario.

bpawanchand
Active Contributor
0 Kudos

Hi Jan,

This is what exactly, I want you to do, as I mentioned. Probably, you overlooked the other parameter which I highlighted in the above screenshot "IS_WI_DETAILS". I was just talking about the IV_DECISION_KEY because I was trying to explain to you the reason, why it would make a difference in writing your code within this BADI?

All I want you to try by reading the work item ID from the importing parameter IS_WI_DETAILS-WI_ID and pass this work-item id to SAP_WAPI_READ_CONTAINER following the same logic what you have mentioned in the screenshot. Now one thing you have to make a note here that the BADI is a filter BAdi. Even you might have an implementation in the system you can add your own workflow template and STEP ID which you can find in the workflow builder which will be called only for the workflow template which you have configured.

I am not sure, what do you mean by the term "scenario"?

Regards

Pavan

Hi Pavan,

thanks for ur Advice. We tryd different Things. At the end it was an already implemented Badi Implementation with a really large Filter. (also including the WorkItems i am working with).

This Implementation called the Function "SAP_WAPI_DECISION_COMPLETE".

--> The Decision get's completed pre the Comment get's attached to the Attached Object.

That's why i couldnt capture the Note with my Coding.

Greetings Jan

Answers (1)

Answers (1)

former_member186746
Active Contributor

Hi,

this value should come from the container element Decision_Note. You have to bind it in the workflow back from the user decision to a suitable container element.

Kind regards, Rob Dielemans

0 Kudos

Hi Rob,

thanks for your Response.

I will try that.

Greetings Jan