Skip to Content
0

Offline Approval (IF_INBOUND_EXIT_BCS)

Aug 22, 2017 at 10:32 AM

59

avatar image

Hi,

I am in ECC, using Interface (IF_INBOUND_EXIT_BCS) which am using for my Offline Approval. Where user clicks Approve or Reject from Outlook to Release or Reject a PO.

All settings for Inbound is done, mails coming in SOIN, user given proper authorization, class/exit where I use this interface is maintained in SO50.

Now If user Approve / Reject from Outlook for a PO, and if PO is NOT in edit mode, it works perfect.

If user Approve / Reject from Outlook for PO, and if PO is in edit mode, the WF goes in error. So I put a piece of code in the class (which is maintained in SO50) where I check if PO is locked, if yes then send a message to Approver, if not process the PO using SAP_WAPI_DECISION_COMPLETE.

Say you have an entry in SOIN <a123>

If PO not in edit mode, 'success' message sent.

If PO is in edit mode, it still sends 'success' message, which is not the piece of code it should have entered.

Now strange thing is if I debug it from SOIN for the same <a123> from SOIN, it sends the lock message.

Any idea why it behaves strange or is it that am missing something in code.

Code is simple, checks if PO locked, if yes am sending normal message thru standard call methods.

Thanks,

Aditya V

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sandra Rossi Aug 22, 2017 at 08:22 PM
0

do an abap trace or add a log to understand why it behaves abnormally when you don't debug.

if the code is simple, you'd better tell us how you test the lock, etc.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks SR,

code is like, I get the workitem id from the OFFLINE email-subject.

with this workitem-id I get the PO number.

To check if PO is locked, I use ENQUEUE_READ.

If PO is locked, I send mail after this code. Thats all I do.

Thanks,

Aditya V

0
Okay, so the best solution is to add a log or do a trace, and you should get clues about what's going on.
0
Mike Pokraka Aug 22, 2017 at 09:05 PM
0

As I also wrote in this question, I think most implementations of email approvals are bad solutions:

Unless you use digital signing, email is very very easy to forge, and I doubt any auditors would endorse automated plaintext mail approvals.

As to 'offline', in this decade people doing approvals are connected most of the time unless in airplanes or underground, so why not use a more modern solution like Extended Notifications (approval via authenticated link in email), or web-based solutions such as Fiori Inbox or POWL? Much nicer for the user, more secure, easier to implement.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Right said Mike.

we had given them the risks with this approach, but 'client is the boss' :)

however thanks for the reply.

Aditya V

0

I figured you'd probably be aware.

Sadly it's the organizations who think they won't be hacked that are most at risk.

0