Set the workflow about PPR process as completed status with a report.

Hi Gurus,
I need to complete a workflow and all regarding task from UWL.
To do this, I implemented 2 functions module: the first to execute the dialog step and the second to set the dialog step as completed status.
When I run the report the both function module doesn't work. Sy-subrc  return me different result as 0.
If I execute the SWIA T-code, I see all the task and there I execute the "dialog step" WORK ITEM to set it from ready status to started status and after I use "complete manualy" for the same task then the workflow created a new "dialog step" WORK ITEM I do the same with it and the workflow is completed.
So I would like to do the same in a report with SAP_WAPI_SET_WORKITEM_STATUS and SAP_WAPI_DECISION_COMPLETE functon module ... please see my code below:
loop at lit_wi_stat where wi_type = 'W' and wi_stat = 'READY'.
*to set dialog step WORK ITEM as started status.
      call function 'SAP_WAPI_SET_WORKITEM_STATUS'
        exporting
          workitem_id          = lit_wi_stat-wi_id
          status               = 'STARTED'
          user                 = sy-uname
          language             = sy-langu
          do_commit            = 'X'
        importing
          new_status           = lit_wi_status
          return_code          = lv_subrc
      TABLES
        MESSAGE_LINES        =
        MESSAGE_STRUCT       =
*to set dialog step WORK ITEM as completed status
      call function 'SAP_WAPI_DECISION_COMPLETE'
        exporting
          workitem_id          = lit_wi_stat-wi_id
          language             = sy-langu
          user                 = sy-uname
          decision_key         = '0001'
          do_commit            = 'X'
      IMPORTING
        RETURN_CODE          =
        NEW_STATUS           =
      TABLES
        MESSAGE_LINES        =
        MESSAGE_STRUCT       =
    endloop.
But it doesn't work correctly.
Maybe you have a better idea to reproduce the complete process in a report.
Thanks in advance for your reply..
Best regards.
Julien.

Hi Chandni
I would presume that you are calling some activity step to perform some operation ...when this fails, you are passing some flag to the workflow to send the email and the "planned" error!
It's pretty simple then:
1) Analyze the flag using a condition step
2) Use mail step to send the email
3) Call a custom method to raise a workflow exception - workflow will go in error.
More on Workflow Exceptions:
BO Based Exception:
http://help.sap.com/saphelp_nw73EhP1/helpdata/en/4f/372e0cf5d95541e10000000a421937/content.htm?frameset=/en/4f/3457d50a7b5542e10000000a421937/frameset.htm
How you can define custom BO:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0f157e8-456b-2910-8ea5-c57d9267c913?overridelayout=true
Or you can also trigger Class based Exceptions if you are using ABAP OO for workflow (custom functionality via Class using IF_WORKFLOW Interface). Just make sure you make your Custom Exception Class as a child of CX_BO_TEMPORARY or CX_BO_APPLICATION
Regards,
Modak

Similar Messages

  • Trigger the workflow when so delivery is completed

    Hi experts ,
    I  need to  trigger the wokflow if SO  delivery is completed.
    could  anyone  please let me know if any event  is there to trigger the workflow whenever SO delivery is completed.
    Regards ,
    Kiran.

    1. First you need to create a RFC function module in the CRM system, and in that FM call the respective workflow template .
    2. Now you need to define RFC connection between the R/3 and CRM system in SM59 txn.
    3. Now once the connection is established between R/3 and CRM system, then as i mentioned in my preivous reply, plesase call the newly created RFC FM in the CRM system from that method.....
    4. Make sure that first you define connection between R/3 andf CRM, approach your basis consultant to create a RFC connection, and provide the username as WF-bacth and its password correctly , this is because when you call a FM in other system then the repective sytem will ask for the login and password, sisnce Wf-bacth is background user w.r.t to Wrokflows , once you provide wf-bacth and its password in the created connection then you mght not face login problem...
    for Further queries please revert back...

  • How can I set the number of batch process for DTP globally?

    Hi guys,
    How can I set the number of batch process for DTP in system globally?
    For eg. set the number to 1
    Any hint is appriciated!
    Regards,
    Liying

    Hi,
    In DTP screen also you can view batch settings. Check the Settings menu, you will find Batch.
    Reg
    Pra

  • How to set the Background Color of a Text Field in a Tabular Report.

    Hello,
    I tried to set the Background Color of a Text Field in a Tabular Report.
    But I was not able to change this colur.
    In the report attributes --> column attributes
    I tried already:
    1. Column Formating -- >CSS Style (bgcolor: red)
    2. Tabular Form Element --> Element Attributes (bgcolor: red)
    but nothing worked.
    Can anybody help me?
    I Use Oracle Apex 2.2.1 on 10gR2
    thank you in advance.
    Oliver

    in "Report Attributes" select the column to move to the "Column Attributes" page. In the "Element Attributes" field under the "Tabular Form Element" region enter
    style="background-color:red;"
    I will also check if there is a way to do this via the template and post here again
    edit:
    in your template definition, above the template, enter the following:
    < STYLE TYPE="text/css" >
    .class INPUT {background-color:red;}
    < /STYLE >
    (remove the spaces after the < and before the >)
    change "class" to the class that the template is calling
    (I'm using theme 9, the table has: class="t9GCCReportsStyle1" so I would enter t9GCCReportsStyle1)
    A side-effect of using this second version is that ALL input types will have a red background color--checkboxes, input boxes, etc.
    Message was edited by:
    TheJosh

  • How to set the transition duration of a slide in keynote with applescript

    hi
    how to set the transition duration of a slide in keynote with applescript
    i made an applescript script which converts a numbers file to a keynote presentation
    figured out how to set the transitions but cant find how to set the time
    +set appTransition of slideTransition of current slide to "apple:dissolve"+
    anyone?

    you can send keystrokes to invoke menu commands via shortcuts but as for transition time not sure. You've check the dictionary right? Scripting support is very limited in KN.

  • HT3577 I have an iPhone 4S and I have set the VoiceOver to off, but when I run with iTunes on, it still comes on. How do I stop this from happening?

    I have an iPhone 4S and I have set the VoiceOver to off, but when I run with iTunes on, it still comes on. How do I stop this from happening?

    This is from article on device with multiple computers:
    iPod shuffle and iPhone are intended for use with a single computer. You cannot load music from multiple computers or iTunes libraries onto iPod shuffle and iPhone like you can with other devices.
    http://support.apple.com/kb/HT1202

  • Session completed successfully with errors reported in error tables.

    Which table would contain the errors for this error message?
    "Session completed successfully with errors reported in error tables."
    The Snp_Exp_Txt table?
    Edited by: user8702914 on Mar 2, 2011 11:28 AM

    Sutirtha,
    The FLOW_CONTROL option must be set to 'Yes', as it is the CKM that creates and populates the E$ table. If it was set to 'No' there would not be any 'errors reported in error table' as the error table would not exist.
    Cheers
    Bos

  • Question on the Adobe Captivate 6.x Google LMS Widget With Email Reporting

    Im looking to use the Adobe Captivate 6.x Google LMS Widget With Email Reporting to collect quiz answers and results but due to security issues I would like to put the results directly into a databse and not into google.
    Does anyone have any experience in doing this and if so how what do I have to change to get the widget to send the results to the database.
    Thanks

    Email reporting has been removed in Captivate 6 out-of-the-box, though it can be achieved using a widget.
    You can use Michael’s widget to achieve the same - http://www.cpguru.com/email-reporting-widget-for-adobe-captivate/
    Akshay

  • How to make a restart of the workflow in a process controlled workflow?

    Hi Experts,
    How to make a restart of the workflow in case of process controlled workflow? Scenario is like this:
    The user has created a shopping cart with 1000 USD. The process schema has three process level with the first level being approval with completion.
    The first level being executed by the responsible purchaser. Here, the purchaser adds the source of supply and changes the price of the shopping cart 2000 USD and approve the shopping cart.
    Now, I want the approval task to start from beginning so that the requestor can know the changes and accept/reject the changes.
    Thanks and regards,
    Ranjan

    Hi,
    Restarting workflow goes to 1st level approval step. It is not requester.
    I think you need to set condition for "Acceptance by Contact Person" in Define Process Level.
    Regards,
    Masa

  • Work process in complete status

    Hi Gurus ,
    wps are going to complete status and restart after error is set to no , tried to retart wps again same problem they going again to complete status .
    could some guide on this.
    thanks
    va

    Hi,
    please find the trace file info
    Network error of client T269, NiBufReceive (-6: NIECONN_BROKEN), dp_tm_status=3
    Client address of T269 is 43.194.61.45(xxxxx.com)
    ***LOG Q04=> DpRTmPrep, NiBufReceive (1957 AEDIAZP 269 AEPSEDUBWS02) [dpxxdisp.c   8106]
    RM-T269, U1957, 400      AEDIAZP, AEPSEDUBWS02, 06:31:06, M0, W11, VA02, 3/1
    Thu Aug 14 06:54:08 2008
    SoftCancel request for T281 M0 received from REMOTE_TERMINAL
    Thu Aug 14 07:33:32 2008
    ERROR => W38 (pid 692230) died [dpxxdisp.c   10724]
    Thu Aug 14 07:41:12 2008
    ERROR => DpCheckTerminals: NiCheck2(rc=-23) failed for tid: 304 -> disconnecting [dpxxdisp.c   8734]
    thanks for ur help

  • How to re-start the workflow for Shopping carts in WAITING status

    Hi
    We are using 1-step approval work flow, and we get some strange issue. We can add approver in the workflow, but after we click order button and back to check status again, sometimes there will be "Ad-hoc agent not found" issue. Do you know how to solve?
    And one workaround for user is to re-add the approval, and sometimes the shopping cart back to normal. But sometimes, after we add the approver, the shopping cart are in waiting status:
    Workflow Item:
    Workitem-ID 000000714642
    Task WS10000276
    Text One-Step Approval: Value limit: Shopping Cart
    1000114698
    Status WAITING
    Statustext Waiting
    Date 13.06.2008
    Time 10:41:22
    So may I ask how to re-trigger the workflow?

    Hi,
    Thx for that. I need to trigger the Approval workflow to go the the approval manager.
    Can u give me the document on this? thx,  kerry.liu [at] ap.effem.com.
    Thx very much
    Kerry

  • How to change/set the browser title from web forms (XP platform with SP2)

    I am running Form9i, I have set the browser windows title from Web Forms dynamically by using following method. However, when my PC has changed to XP, the function seems not work. Does anybody have same problem and how to solve it? Any suggestions would be appreciated.
    Add the Javascript code to your baseHTML file. For example,
    if you are using the basejini.htm:
    <HEAD><TITLE>%pageTitle%</TITLE>
    <script language="javascript1.2" type="text/javascript1.2">
    function Change(a) {    document.title=a;    } </script>
    </HEAD>
    In web Forms , call the javascript function with WEB.SHOW_DOCUMENT built.
    For Example the following code set the browser title with username . web.show_document('javascript:Change('||'"'|| get_application_property(USERNAME)||'"'||')','_self');
    Best Regards,
    Bowie

    Dear Frank,
    Thanks for your reply. Can you tell me in detail which built-in function in Webutil can set value in browser title ?
    Btw, is it possible for me to set parameter "separateFrame=True" in formsweb.cfg and set the form window title by using SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,TITLE,v_msg_string)?
    Best Regards,
    Bowie

  • Setting the Substitution Value for a Link Attribue in an Interactive Report

    another thing driving me NUTS in apes.
    I set the URL of the Link column to
    javascript:void(#METRIC_NAME#);I set the Link Attribute to:
    onclick="#METRIC_NAME#"and I get...
    a href="javascript:void(BACKUP);" onclick="#METRIC_NAME#"><img src="wwv_flow_file_mgr.get_file?p_security_group_id=3299510997213006&amp;p_flow_id=583&amp;p_fname=garbage.gif" alt=""One is being substituted and one is not.
    Any ideas....
    thanks
    Edited by: bostonmacosx on Mar 5, 2013 4:46 PM
    Edited by: bostonmacosx on Mar 6, 2013 9:56 AM

    Did you try to change the column to "Standard Report Column" instead of "Display as Text"?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Setting the cell width in a Tabular Form (SQL Query (updateable report) )

    version 3.2.1
    I have a Tabular Form (SQL Query (updateable report) ) and I have a column that is a VARCHAR2(4000) that when displayed extends the cell to the full length (which of course makes sense).
    How can I set the width of this cell to something like 30 or 50 and wrap the contents?
    Thanks,
    Joe

    Scott,
    Thank you for replying.
    Your suggestion kinda worked. I say kinda because when the report is first displayed the cell is the full width and appears to ignore the width setting. There is a Select List on the report to restrict some of the data that is displayed. When a selection is made from this Select List, it appears that the cell width is then adjusted to what was set, but not for every selection from this Select List.
    I made the width entry in Tabular Form Element - Element Width
    Any idea why the width setting is ignored?
    Thanks,
    Joe

  • What is the workflow for creating a children's ebook with animated illustration?

    I would like to animate and create a children's book with animated illustrations for the iPad but I am confused as to what the workflow is. I am proficient in Flash, Edge, Photoshop and getting to grips with indesign and DPS. but I cannot find the answer as to how to create an interactive children's book anywhere, Would I be able to create it with DPS? How can I make the accelerometer? e.g. getting things falling when you turn the iPad? Ultimately what I would like is to animate in Edge or Flash and then create a page turner/table of contents (illustrated) etc. Can someone please help?

    Impossible to answer, I’m afraid. There’s just not enough details here and the very fact that you’re asking tells me that you should be very careful in choosing how to get this project done.

Maybe you are looking for

  • Appleworks Drawing & Painting: Color palettes *still* getting scrambled

    I have a problem when using Appleworks drawing files with painting frames. An Appleworks painting frame normally has two color palettes. One comes from the Drawing document, and this determines the background color of the painting frame. Anywhere tha

  • Can 5 axis image stabilization be engaged with non system lenses for A7II and A7rII?

    Many people use/will use their excellent non system manual focus non system macro lenses on the A7II and undoubtedly on the soon to be released A7RII. Stabilization in the X/Y planes is very very important for macro. Sony on the A7II only stablizes t

  • TV green in HDMI 1080p 60hz I mean all green... Ok in 1080i 46XV640UZ

    46XV640UZ All in green can't run and is flashing when in HDMI 1080p 60hz. I just bought a computer to plug to it and figure out it can't run 1080p... any idea of the problem? Attachments: IMG_20130220_215701.jpg ‏101 KB

  • Modify elemets of a node

    Hi Experts, I am trying to enhance method HANDLE_UPLOAD_CHILDREN of class /SAPSRM/IF_CLL_SOSM_SC_TEMPL in SRM 7.0  . Let me explain the issue Time point 1. lon_results_node = mo_wd_context->get_child_node( mc_data_results_node ). In debugger COLLECTI

  • IMac to MacBook Pro exporting calendars

    I have made about 15 bespoke calendars for various dog owners, now some of them would like to see them before they go off to print. They are on an 24" iMac and I would like to transfer them from the iMac iPhoto 08 to my new Mac Book Pro iPhoto 08 is