Skip to Content

Workflow for z report

Dear all

Im new to workflow , i have got a requirement to run a program in a background. here is my requirement.

1)User used to schedule a z report (PO creation BAPI_PO_CREATE1) in a background .

2) after job has finished workflow has to be triggered with the output from job (error po's and success po's).

3) there is a decision making in the mail if user click YES then all success po's should get processed in the BG.

How to achieve this ,,

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Apr 13, 2016 at 12:44 PM

    Hi Peter,

    We do have standard Workflow which is similar to your requirement. But its for single PO. BUS2012 Busniess object is used. So whenever a PO is created this workflow will trigger.Please check with this busniess Object.

    If you need to deal with bulk POs then i guess you need to copy and customize the STD PO Workflow with busniess object BUS2012.

    Thanks

    Siva.A

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 13, 2016 at 05:31 PM

    For using a workflow you will need an object key, since this is a z-object you can use any z name use want. For the key you can use a job number or any other key that will link all the PO of the job.

    Use sap_wapi_create_event FM to raise the event for staring the workflow. you will need a screen that will display the PO's created by the job (default method for your object)

    Use can use a decision task for the yes/no task (transfer your new object to it)

    After the yes create another method for the BG processing and use it in a task.

    What should happen if the user selects "no"?

    However, this is something that can be done by a report and not necessarily by workflow. you can simply send a mail at the end of the job let people knew they should check the results.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 13, 2016 at 09:59 PM

    Hello,

    You should turn on the event trace (SWEL) via transaction SWELS and get the user to schedule his report. Check to see which events get created. You can then use those events to start separate workflows for each PO and have the relevant user approve each one.

    Approving in bulk is often pointless, nothing gets checked.

    regards

    Rick

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 15, 2016 at 10:32 AM

    Dear all,

    Thanks for ur replies,

    1) i have created BO in swo1.

    2)I am calling FM CALL FUNCTION 'SAP_WAPI_CREATE_EVENT' to create event in my zreport.

    3) created workflow for BO for mail triggering .

    Now i am able receive a mail with decision YES and NO.

    but i have to send mail with some data's which i m getting in my zreport

    Add comment
    10|10000 characters needed characters exceeded