Automate

 View Only

Tip of the Week – Excel workflow - how to attach documents to an SAP Object including process history

  • 1.  Tip of the Week – Excel workflow - how to attach documents to an SAP Object including process history

    Employee
    Posted 20 days ago

    Tip of the Week – Excel workflow - how to attach documents to an SAP Object including process history

    Often there is a need to attach documents to an SAP Object.  One common use case is for Journal Entry postings, which often need to include:

    • The Excel file in which you posted the objects, such as Journal Entry documents
    • Supporting documents, which have information related to the posting, like Journal Entry documents
    • Process History – with who approved it and when, noting this requires a workflow associate with it

    This can be beneficial for the auditing process because everything is in SAP in one place.  However, some customers are fine with having the attachments and process history in Evolve, where auditors can review the Who, What and When, and then they can look at the documents in SAP, which can be exposed from the Excel (or Form) Workflow as promoted/solution fields. And in SAP, it will show who posted it and when.

    What is process history – it's the who/what/when in a process or workflow, i.e.:

    • Who was assigned
    • When was it assigned
    • When it was due
    • What tasks, including
      • Status – if complete, and if an approval, if it was approved or rejected
      • Any comments on the task
    • What also includes process status, if completed, in progress or canceled
    • Example Process history from the Evolve document library:


      • History is shown bottom up, i.e. it starts with someone launching the workflow.  In the case of an Excel workflow, that means someone submitted an Excel file that has a workflow to an Evolve server



     quick review of how to do attachments in Studio Transaction or Direct where you are able to attach to an SAP Object via scripts:

    • The current file – tag: <Use Current File>
      • The is the excel file from which you ran the script(s)
      • Go to the map tab
      • Click on the row with the Attachment Location
      • Click on the Script properties on the right
      • Click on the Use Current File checkbox

      • Note if you don't see the checkbox in version 24.x, you should hover your mouse over that area – it's there but blends into the grey background.  That's being addressed in a future update.
    • The supporting documents – tag: <Supporting Doc>
      • This is supporting information for the posting.  It may be on a drive or submitted with an Excel workflow
      • Follow the above steps, but paste in the tag in the Mapped from field
    • Note you cannot attach the current file and the supporting documents in one script.  However, you can chain scripts to post an object and then open that object to attach the supporting documents in another script.
    • There is no process history in Studio since there is no workflow.

    In Excel workflows, you are able to use the same methods as you do in Studio, but the differences include:

    • Any supporting documents you add in the process are considered the Supporting Documents and will be attached to the SAP Object if you use the <Supporting Doc> tag for the Attachment Location.  Note that you can allow or disallow attachments to be changed during an Excel workflow process.


    Once you export the process history to supporting documents, any script or plugin that posts the supporting documents as attachments to an SAP Object will include the Process history as an attachment.

    The example below includes the Current file, i.e. Excel file that was run, as well as 2 supporting documents, plus the Process History as a PDF:


    Here is an example Process History attachment:


    Notice that this process is still active, i.e. it's not yet done, because the workflow is still running when the Supporting Documents are posted.  In this case it was done in a background process via an Automate Autorun plugin, but you can see all of the tasks are complete.

    You'll also see the Task, nodes that don't include a person, like setting a value or a loop, who was assigned, when it was completed and a task.  It also includes which user's credentials were used for background posts if you used the Automate Autorun plugin. 

    Please note Process History is not available with the Studio Manager Out-of-the-Box workflow.

    The choice is yours on what you attach to an SAP Object, if anything.  But the good news is you have options in Evolve Excel Workflows, as well as Studio and Studio Manager.

    Notes:

    • In Fiori automations, you can:
      • Choose to attach the Current File for those Fiori apps that support attachments
      • Map the attachment field to a semicolon separate list of Supporting Documents
      • Note that Fiori automations cannot be part of an Evolve workflow yet, but that is R&D.  Thus, Process History is not yet available for attachment.
    • In GUI for HTML automations, attachments are not yet available, nor can they be used in Excel Workflows.  That may be supported in a future release, as well.

    Happy scripting!

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------