cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow Justification decision text into a subsequent step

08-07-2019 11:09 AM
former_member183909 Active Participant
7557 views 4 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi

I have a workflow that will ask a Reviewer whether to approve a Requisition - if they Reject then they are prompted to provide a justification reason.

I want that justification reason sent back to the creator of the Requisition.

In the Review User Decision I have bound the DECISION_NOTE to my container object "JustificationNotes" ( a BOR Object of type SOFM).

In the subsequent Reject email step I have the &JUSTIFICATIONNOTES.DESCRIPTION& - and this works but it is only the justification subject line. I would like to show the "JustificationNotes" reason texts. - how can I do this?

Here is the binding on the Review User Decision

Here is the what the Reviewer will see and do.


Here is the Reject Email step - The Reviewers Title does work and appears OK. But how to get at the Review comments ?

See that the Inbox has the Justification Reason title - BUT How can I put in the Reason texts ??

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

StephaneBailleu
Active Contributor

Hi

I have solved this by making a subtype of SOFM with method to_string_table

Basically reading the note with function module SO_NOTE_READ

it puts it in table type SOLI_TAB

then for each line using function module SWA_STRING_SPLIT which is added to a table type swastrtab

from table I get the swastrtab-str into a structure typetline (into TDLINE) and add all those lines into a table type SWNTTEXTLINE

From the method I get a task and I can use the returned table in my text

I hope this will help

Cheers

Stephane

Answers (2)

Answers (2)

former_member183909
Active Participant

Hi Stephane

thanks for your reply. I had a look at that FM and indeed I can get to the Texts. Thanks for that. I did a little test outside of the workflow using the parameters I can see in the SWEL log . I just now need to incorporate a call to the FM within my workflow.

former_member183909
Active Participant
0 Likes

Sorry but following on from this - my requirement has changed. I now need to have the Reason for Rejection attached to the email. I have managed to do this but I have a problem with it !.

The Workflow will remain in a Loop until fully approved or cancelled - that is fine.

So if the Requisition has been rejected a number of times - I can only get the FIRST Rejection reason Attachment on my email. I want the LATEST Rejection reason attachment.

How can I do this ?

See the Email Step with the &JUSTIFICATIONNOTES& (my container object of SOFM) into the &ATTACHMENTS&