Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Former Member

Testing of the Offline Approval Demo

Run transaction SWUS to test the workflow with following parameters

The work flow is triggered with work item ID 2735147 (Parent / Father Work Item)

The workflow log shown below

Now running SOST, we see the e-mail is triggered via the work item exit (there is no SEND MAIL step in our workflow)

We push this e-mail from SOST (Not needed if SCOT Batch Job is set up)

Message exits from SAP Connect

Now the mail gets delivered to the Outlook Inbox

When the user opens the mail we get the following Information

The APPROVAL and REJECTION links in the e-mail will look as shown

To Approve the Invoice Via Portal Log on to business portal by clicking this link http://<hostname>.<Domain name>.<Extension>:port#/irj/portal

To Process Directly from E-mail, Make your selection here APPROVE or REJECT

We click on APPROVE as of now, the following auto E-mail is generated. Notice that the “TO” field is auto populated with the ECC-OFFLINE approval ID.

The subject is a concatenation of the Processing Action (A = Approve) and the Work Item ID

Now I am running the transaction SOIN for Inbound Send Requests (SMTP). This can also be substituted by Report RSBCSIN

I can see the e-mail has been received at SAP . If you can see this, then your Inbound E-mail Configuration is correct. You have crossed a big hurdle here.

Display the trace of this e-mail (Note: I have activated TRACE in SCOT, this is mandatory to know what has happened in system)

The trace can be displayed from the SOIN screen. Notice the toolbar in that screen shot, the trace button is shown

The trace screen opens as shown below (If trace is not active in SCOT, this screen will show no entries)

Now the moment the e-mail was received by the system, our Inbound Exit should have triggered and processed the work item.

We can verify this from the trace. If we double click on the trace entry, it will show us all the details, our exit was instantiated and triggered as shown in the highlighted entries below. Also we can see that the RETURN Code was “0” which indicates that the method PROCESS_INBOUND was called correctly

So now we will check in SOST. We should see a reply from the Workflow System that the work item has been approved. This was processed in the methodPROCESS_INBOUND coded in the Inbound Exit Class ZZZCL_PROCESS_INBOUND_WORKFLOW

This e-mail was triggered by the Inbound Exit Class (notifying the processing). Displaying the e-mail body

Checking the workflow log, the work item should have been processed as APPROVED


AFTER – Status COMPLETED and action outcome is APPROVED

(Note the work item was not processed manually in Business Workplace SBWP, but was processed in the Inbound Exit Class via function module SAP_WAPI_DECISION_COMPLETE. Please study the code in method PROCESS_INBOUND in class ZZZCL_PROCESS_INBOUND_WORKFLOW. So you can process any code, transaction, etc offline via e-mail using this concept. Simply create specific SUBJECT line in the auto e-mail and model your code on that)

Above work item is also removed from SBWP (Business Workplace)

Checking in OUTLOOK, we should have received the e-mail

The E-mail as seen in outlook. So the effect is,the moment the approver clicked on APPROVE link in the first Workflow Notification HTML E-mail, a few seconds later he receives a system E-mail informing him of the action carried out and stating the success.

Now We open the E-mail to see the details and also to verify if the E-mail opens... Continue in Part-4



Labels in this area