Skip to Content
avatar image
Former Member

Outlook Email Based Approval

Hi,

I am working on Workflow and BSP to enable web accessing for Work Items. I have come across of simplifying the workflow steps.

SCENARIO -

1) Notification is created through BSP and the workflow is started by sending an Outlook email to the approver

2) In the email there are two emails encrypted by me with querystrings one for "approved" and other for "notapproved" like

a.

WF-BATCH@MYCOMPANY.COM?subject=Re:workflow decission"&content="approved""> APPROVE

b.

WF-BATCH@MYCOMPANY.COM?subject=Re:workflow decission"&content="notapproved""> NOT APPROVE

3)So when the user clicks any of the two links email should be sent to SAP with this querystrings. There i have a OBJECT to capture the emails received by WF-BATCH user.

Have any experts done this? Is this scenario possible?

Thank you

arun

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 18, 2004 at 06:01 AM

    Basically the links load a BSP page that reads the URL and then does something correct?

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 18, 2004 at 08:05 AM

    Arun,

    First please review your preview question HTMLB Complex Select Options. (The same will be good also for your questions in EP forums!)

    What I suspect you need is something such as href="mailto:...". Maybe someone has for you the complete syntax. (And when it works, also flag this question as answered.)

    ++bcm

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I think we both missed something on his question.

      You'll need to use the escape characters and not "" for the url in mailto:

      <a href="mailto:user@somwhere.com?subject=My+Subject&content=this+is+my+content">
      Send EMail>
      </a> 
      

      <a href="http://here.dom.com:8003/sap/bc/bsp/sap/zwf/bsp.htm?objid=#####&status=true">
       APPROVE 
      </a>
      
      <a href="http://here.dom.com:8003/sap/bc/bsp/sap/zwf/bsp.htm?objid=#####&status=false">
      NOT APPROVE 
      </a>
      

      Where <b>objid</b> is the record id of the object being approved or not and <b>status</b> is the approval or non approval you can of course use any value you like.

      Problem, you can't add content very well so you'll need to have a program that sends the mail.

      In the mail you can then provide the URLs for the person to click which loads a BSP page, the BSP page then reads the URL and acts on the values in given.

      Here is some sample code for sending an email in ABAP.

      CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
            EXPORTING
              DOCUMENT_TYPE              = 'RAW'
              DOCUMENT_DATA              = DOC_CHNG
              PUT_IN_OUTBOX              = 'X'
            TABLES
              OBJECT_CONTENT             = OBJCONT
              RECEIVERS                  = RECLIST
            EXCEPTIONS
              TOO_MANY_RECEIVERS         = 1
              DOCUMENT_NOT_SENT          = 2
              OPERATION_NO_AUTHORIZATION = 4
              OTHERS                     = 99.
      

      You'll of course need to look at this function module documenation for all the proper parameters and values.

      Message was edited by: Craig Cmehil

  • avatar image
    Former Member
    Aug 19, 2004 at 08:36 PM

    Hi Criag,

    I was thinking in a different way, But you have given me new ideas. I can give a link in the mail when they click the link i can get the parameters in the querystring and updated the function module as i need.

    Thank you

    arun

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      It most cases it's the only way.

      Message was edited by: Craig Cmehil

      Not to be picky but I just re-read this here, and I realized that what you said you were doing now was what I was trying to tell you to do...

      I think I need a vacation too 😊 Hava nice weekend.