Skip to Content

Testing of the Offline Approval Demo


Run transaction SWUS to test the workflow with following parameters

/wp-content/uploads/2013/12/o_348970.png

/wp-content/uploads/2013/12/p_348986.png

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

The workflow log shown below

/wp-content/uploads/2013/12/q_348987.png

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

/wp-content/uploads/2013/12/r_349001.png

We push this e-mail from SOST (Not needed if SCOT Batch Job is set up)/wp-content/uploads/2013/12/s_349002.png

Message exits from SAP Connect

/wp-content/uploads/2013/12/t_376290.png

Now the mail gets delivered to the Outlook Inbox

When the user opens the mail we get the following Information

/wp-content/uploads/2013/12/u_349010.png

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

/wp-content/uploads/2013/12/v_349016.png

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

/wp-content/uploads/2013/12/w_349012.png

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.

/wp-content/uploads/2013/12/x_349018.png

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

/wp-content/uploads/2013/12/y_349036.png

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

/wp-content/uploads/2013/12/z_349037.png

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

A.png

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

/wp-content/uploads/2013/12/b_349039.png

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

/wp-content/uploads/2013/12/c_349058.png

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

BEFORE – Status IN PROCESS

/wp-content/uploads/2013/12/d_349059.png

AFTER – Status COMPLETED and action outcome is APPROVED

/wp-content/uploads/2013/12/e_349060.png

(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)

/wp-content/uploads/2013/12/e_349060.png

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

/wp-content/uploads/2013/12/11_349063.png

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

/wp-content/uploads/2013/12/12_349064.png

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


Cheers

Pradyp



To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply