Cancel WorkItem after execute a Method

Hi all,
Is there a way to cancel a workitem after executing a method?
I put this method at the tab METHODS in the activity USER DECISION, but when the method is executed before the workitem, i need this closed.
It´s because i am using a worklist at the PORTAL, and then what I need is to show the workitem at the UWL and then when the user click on the link to the WI, execute the METHOD (this method opens a webpage made with webdynpro).
Best Regards,
Ricardo

I think you want to complete the workitem , once the workitem is executed from the UWL right?
if this is the case as you said that you are using a Decision step which will open a webdynpro applicaiton once it is executed, then instead of using the methods tab, I suggest you to modify from the application side
1. If the end user clicks on the Approve button or reject button UNder the actions of these button, call the standard SAP fm SAP_WAPI_DECISION_COMPLETE to which you have to pass the currently executed workitem ID and Decision for approve as 0001 and for reject 0002.
this is more suitable and simple way of completing the worktem.

Similar Messages

  • How to download error records after the session method executed in BDC?

    Dear Experts,
    How to download errors in session method after executing session method. Please dn't say for BDCMSGCOLL  i have goggled all . every one answer for call transaction. In session method after executing we fill find all the success and errors in log file . But how to download this log file?
    please help me.
    Thanks
    Ravilla

    Hi Laxman,
    Please find the below process .I hope this will suits to your requirement .
    1)Write an error report.
    2)Send the record(s) in error to an error file.
    3)Create a BATCH input session with the record(s) in error.
      To store error MESSAGES ( CALL TRANSACTION )
        data:  begin of Tab_Mess occurs 0.
                  include structure bdcmsgcoll.
        data : end of Tab_Mess,
      CALL TRANSACTION ‘FK02’ USING BDC_TAB MODE ‘N’ UPDATE ‘S’
            MESSAGES INTO TAB_MESS.
           IF SY-SUBRC NE 0.
             WRITE: / Tab_MESS-TCODE, Tab_MESS-DYNUMB, Tab_MESS-MSGTYP , 
                            Tab_MESS-MSGID.
           ENDIF.
    Regards,
    Bharat Kumar

  • How open new browser in JSF after executing backing bean method

    hi All,
    Can you please tell me how to open a new browser after executing action method in bean.
    I have writen one java script function, i am passing the string url which i got from the backing bean action method.
    First of all i want to execute action method then only javascript function.
    waiting for your quick reply.
    thanks & regards
    bhushanam.

    hi,
    That command link in data table. The requirement is like this:
    I have datatable, the columns are
    1) <h:selectBooleanCheckbox ....
    2) <h:commandLink ....
    requirement 1:
    if user select the boolean check box and click the command link
    then I want to execute the backing bean action method , it returns string url and show in new browser window( popup window with toolbar ).
    requirement 2:
    if user not select the boolean check box and click the command link then I want to excute the backing bean action method, it returns string url and show in the same browser ( through navigation rule we can show that page.)
    Please look the below command link code.......
    <h:commandLink id="belegnr" onmousedown="return showPopupWindowForInvoiceForGraphicImage( '#{row.importKz}', '#{row.blnChecked}', '#{InvoiceMecBoxBean.printInvoiceFilePath}');" styleClass="input" style="color:blue" value="#{row.belegnr}" action="#{InvoiceMecBoxBean.editLinkAction}"/>
    Can u please give me the idea istead of command link can we use outputlink to fullfil the requirement?. Or any suggestion please......
    Here in my case commandlink value is differenet and after action the return value is different to show in new window. that is problem here.
    thanks & regards
    bhushanam.

  • Dump while executing class method whose exporting parameter  of type table

    hi,
    i am getting dump after executing a method in which i want to export an internal table which will hold all the states name along with its code on the basis of the country name which is my importing parameter.
    for the above i am using importing parameter named as country of type too5u-land1 and the exporting parameter named as itab of type table and below is my code for the requirement.
    method PROCESS.
      select BLAND BEZEI from T005U
             INTO TABLE ITAB WHERE
             LAND1 = COUNTRY.
    endmethod.

    Hi,
      Please check the below code
    parameters country type land1.
    *Refer the class which we are using like below
    data: a type ref to ZCL_TX_SERVICE_01.
    data itab type ycountry.
    *ycountry is a table type defined in dictionary with fields BLAND and BEZEI
    data wa like line of itab.
    *If we are using instance method we need  to create the instance like below
    create object a.
    *In the method process define exporting parameter itab as type ycountry which is a table type already defined
    CALL METHOD a->PROCESS
      EXPORTING
        COUNTRY = country
      IMPORTING
        ITAB    = itab.
    loop at itab into wa.
    write:/ wa-bland.
    endloop.
    Regards
    Dande

  • How to execute a method after page Load?

    My question is very similar to what was discussed in following thread:
    How to execute a method after page Load?
    My requirement is that I want to run a method in backing bean of a page, immediately after the page gets loaded. In that method I want to invoke one of the method action included in the pagedef of this page, conditionally.
    I tried using the approach given in the above thread, i.e to use <f:view afterPhase="#{backing_security.setPermPriv}">, but the problem is that our page is not using 'f:view' , so I explicitly added one f:view with afterPhase property set , but it is not working, page it self is not getting loaded, it is throwing the error:
    Root cause of ServletException.
    java.lang.IllegalStateException: <f:view> was not present on this page; tag [email protected]e8encountered without an <f:view> being processed.
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.setProperties(UIXComponentELTag.java:108)
         at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:733)
         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1354)
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:71)
         at oracle.adfinternal.view.faces.taglib.UIXQueryTag.doStartTag(UIXQueryTag.java:41)
         at oracle.adfinternal.view.faces.unified.taglib.UnifiedQueryTag.doStartTag(UnifiedQueryTag.java:51)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:262)
         at oracle.jsp.runtime.tree.OracleJspNode.execute(OracleJspNode.java:89)
         at oracle.jsp.runtimev2.ShortCutServlet._jspService(ShortCutServlet.java:89)
         at oracle.jsp.runtime.OracleJspBase.service(OracleJspBase.java:29)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:665)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:387)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:822)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:746)
    Please help to resolve this issue, or am I doing anything wrong?

    Hi,
    I assume that your view is a page fragment and here - indeed - the f:view tag cannot be used. If you use ADF then one option would be to use a custom RegionController on the binding layer to listen for the render phase to invoke the method. Another option would be to use a hidden field (output text set to display="false" and have this component value referencing a managed bean property. The managed bean property's getter method can now be used to invoke the method you want to run upon view rendering
    Frank

  • Method for finding row count after executing query

    Is there a method for finding the row count from the resultset after executing a query on a database ?

    The best way: read the data from the result set. If you read it into e.g. a LinkedList, size() will tell you how many rows you got. Or you could increment a counter.
    There are other ways, such as variants of ResultSet that do the read loop for you. But since you'll be doing the fetch loop anyway, those just add unnecessary work and moving parts.

  • Adf faces: execute bean method after table is loaded

    Hi,
    How can I execute a method after an adf table is rendered on the page?
    This is what I want to do:
    I have a master/detail:
    - the master part contains a list of materials
    - the details contains a list of customers and volumes depending on the selected material.
    I tried to add totals on the details table:
    - I created an output text in the footer-facet of the colums containing volumes
    - I created a binding of the detail table to a CoreTable.
    - I created a method in a managed bean related to this CoreTable binding, so I can browse to all rows in the table and calculate the sum.
    - I then set the value of the output text to the total calculated in the managed bean.
    the problem is that I don't know how to execute the calculate procedure after the data in the detail table exists.
    What I tried:
    - call the calculate procedure in the setCoreTable method. --> at this point, there is no data in the table and this results in a nullPointerException when the pages is loaded.
    - call the calculate procedure on the valueChangeListener of the material list --> this doesn't work because totals are calculated for the previous details set.
    - I tried to add the call in one of the table listeners but I cannot find a listener that is executed after data is loaded in the table...
    for testing purpose only, I added a button: calculateTotals that calculates the totals. This works correctly.

    Hi,
    if you use page fragments exposed in an ADF region, you have two options I see
    1. Use a method call activity to call the managed bean
    2. Use a hidden UI component that references the setter/getter exposed in a managed bean and just use this as an indication for the page fragment being loaded
    Keragala

  • Replace the workitem while executing

    Hello Everyone,
    I am sending a workitem for the release of PO to multiple approvers at a time. As per the process, If one of the approver starts executing the workitem, the others will not be able to do so.
    If the approver who executes the workitem first is not going to release the PO, but just comes back from the ME29N screen. Now the workitem wd be reserved for the approver and the others will not be able to do anything. Only this approver will have to release the PO. My requirement is to replace this workitem so that the other approvers can release the PO.
    Is this feasbile or not.... I have tried to do the same using the function modules in the method SINGLERELEASE which is used to release the PO. But was unable to get the result.
    Please do help me out.
    Thanks,
    Samson

    Hi,
    Use Program exit in task which is called after executing the Workitem for the task. Add the code which Changes the status from 'SELECTED' or 'STARTED'  to  'READY'. Use BO Object 'WORKITEM', read the attributes. WORKITEMSTATUS attribute gives the current status of workitem. Then change the status using method STATUS_CHANGE.  This I have tried executing manually for a case which works perfectly.  
    Regards,
    Vaishali.

  • Authorization to execute a method of BO

    Hello,
    The workitem received by an agent goes into error status when executed due to the reason that the user is not authorized to execute the method of the business object. Please let me know the role or the authorization to be given to the user to execute the workitem. The method is a custom one in a custom BO.
    Thanks,
    Samson

    Hi Samson,
    To rectify this issue you need to get access to the authorization object to execute the BO method.
    To do go, execute the method and on getting the error, go to t-code SU53.
    There you would find an authorization error message. Take a screenshot of this error and send to your basis team and ask them to provide you toe desired authorizations.
    Hope this helps!
    Regards,
    Saumya

  • Creating Payment File in SAP after executing Automatic Payment transaction

    Hi,
    Need to know how is the Payment file created in SAP after executing Automatic Payment Transaction and how do I see the file and the fields.
    Regards,
    Kiran

    Hi,
    If you are using EDI format for sending the file to the Bank, then you need to map the fields to segments. You can consider basic type PEXR2002. You also need to make configuration settings - like enable payment method for EDI etc.
    Once the payment run is executed you can run DME - Data Medium Exchange to generate Idocs for the payment run.
    Thanks
    Murali.

  • RFBIBL00 No Batch Input Created after Executing

    Hello,
    After Executing SAP standard report - RFBIBL00, no batch input session has been created in SM35 in ECC 6.0 version. There is no error message but one message displayed as 'PRODPER not transferred.'

    First the issue was in the input file.
    Second Number of lines was more and in the report it was set less.
    Third in check only there will no Batch Input session generates.
    Fourth to create input file use SAP standard procedure i.e sxda_tools.
    Note : From ECC, SAP not supporting Batch Input Method.

  • Automatic popup for reason of rej after an async method

    Hello,
    How to get a reason of rejection popup after an asynchronous method?
    Currently I am using the standard singlerelease method of object type BUS2012 for the release of purchase order. Now once this order gets rejected the user wants an <b>automatic popup for entering the reason for rejection</b> and NOT as another workitem in his inbox for execution.
    Please let me know how can I provide this functionality in the current scenario. <b>Also since the Previous method(singlerelease) is asynchronous “Advance with Dialog” does not work.</b>
    Thanks and Regards,
    Anuj

    It does not work for asynchronous methods but works for synchronous methods. As per SAP the advance with immediate dialog should work for asynchronous methods as well.
    Below is an excerpt from SAP help.
    At runtime, after completion of a step, (= work item has status completed), the workflow system checks the following properties of the subsequent work item:
    •     Is it a dialog work item?
    •     Does the corresponding task refer to a synchronous method?
    •     Is the indicator Advance with dialog set?
    •     Is the actual agent also a recipient of this work item?
    •     Has the work item reached all of its requested starts?
    If the answer to all these questions is yes, the workflow system automatically starts execution of the work item.
    May be you should write a message to SAP. In the meanwhile you can create a synchronous method for the business object.
    -Kiran

  • Error message after executing KKRC- How to define Hierarchy ID ?

    Hi Gurus
    Ours’ is a Chemical Mfg./ Marketing Company. We have ECC 5.0 version implemented in our Company. We  have the Production process orders of different types ( Normal Process order , Reprocess Process order etc.). For the purpose of MIS it is our regular practice to download data in Worksheets & then work upon it ( pivot tables etc.)  &  compile the reports. We have the requirement to have SKU wise ( Finished Goodswise ) summarised compilation of  different type of Variances ( both Qty. , value of input materials, wherever applicable) .
    While browsing the SAP’s BPX community database I have come across the query similar to my requirement . refer thread Product costing - Information system, order summarization  
    Posted: Sep 30, 2007 3:21 AM
    As suggested in the response to that query  I have followed the steps .
    KKRV followed by KKRC . The error message after executing  KKRC reads
    “ No IDs defined for Hierarchy type CO
    Diagnosis No Hierarchy id is defined in customising for the hierarchy type you selected
    Procedure : go in to the customising and define the structure of hierarchy  by means of an appropriate Hierarchy ID. “
    Can some one give me further leads ( i.e. navigation/path and clues for  defining   Hierarchy ID)
    Or
    is there any other way to address the requirement mentioned in opening para.
    With best regards
    Sudheer

    Hi Patrick,
    unfortunately I cannot provide an ad-hoc solution for your nested exception without further investigations.
    Nevertheless I'm very interested to know, why you "gave up" using the Adaptive WS Model in Web Dynpro. What's the problem?
    Perhaps the coding which now requires to create a model instance:
    /** Hook method called to initialize controller. */
    //@@end
    public void wdDoInit() {
      //@@begin wdDoInit()
      // create a new model instance (1)
      EmailAdWSModel model = new EmailAdWSModel();
      // create model objects (2, 3)
      Request_SendEmail requestMO = new Request_SendEmail(model);
      SendEmail emailMO = new SendEmail(model);
      // associate model objects (4)
      requestMO.setSendEmail(emailMO);
      // bind executable model object to context node (5)
      wdContext.nodeRequest_SendEmail().bind(requestMO);
      //@@end
    Regards, Bertram

  • Execute some method once an effect has been played

    Hi everybody, I want to execute a method after the effect i have played is finished. is there any property in AnimationProperty tag to acheive it.
    In the component i have pasted below, getting data from xml file and using repeater populate those data in Hbox then it moves the horizontal scroll position of HBox using animation property. once animation property has been played, it has to execute some method. how can we do it ?
    the next question is
    i want to play animation propery infinite times and i have done it with the help of repeatCount but it takes some delay in between. how can it play infinite imes without any delay in between.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="getXML.send(),slide(event)" >
    <mx:Script>
            <![CDATA[
                import mx.containers.Canvas;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.effects.easing.*;
                import mx.controls.*;
                import mx.collections.*;
                [Bindable] public static var refThumb : Thumbnail;
                [Bindable] public var xmlData : XMLListCollection = new XMLListCollection();
                [Bindable] public var xml :XMLList;
                public function resultHandler(event :ResultEvent) : void
                    xml = event.result.product as XMLList;
                public function faultHandler(event :FaultEvent):void
            public function slide(event :Event):void{
               ap.play();
        ]]>
    </mx:Script >
        <mx:AnimateProperty id="ap" effectEnd="{Web.refWeb.nextSlider()}" repeatCount="0" property="horizontalScrollPosition" fromValue="0" target="{can}" toValue="7200" duration="72000" startDelay="0"/>
        <mx:HTTPService id="getXML" showBusyCursor="true" url="catalog.xml" resultFormat="e4x" result="resultHandler(event)" fault="faultHandler(event)" />
        <mx:HBox paddingTop="20" id="can" width="600" height="200" backgroundColor="white" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundAlpha="0.2"  >
        <mx:Repeater id="rep" dataProvider="{xml}" >
            <mx:VBox id="comp" horizontalAlign="center" horizontalGap="200" width="200" height="200" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                             <mx:Image source="{rep.currentItem.image}" width="150" height="100" maintainAspectRatio="false" />
                             <mx:Text text="{rep.currentItem.name}" fontWeight="bold" />
                             <mx:Text text="{'$ '+ rep.currentItem.price}" fontWeight="bold" />
                             <mx:LinkButton label="Add cart" color="blue" />
             </mx:VBox>
        </mx:Repeater>
        </mx:HBox>
    </mx:VBox>

    you have posted a VBox component code so it will be the part of your parent Application are you injecting data into this component from the main application ? and your
    httpService requires catalog.xml so you need to attach that file so i can run on my side successfully . instead of doing this you can tell the problem you are having so i can guide you on that
    regards,
           ATIF.

  • Suppress the enter-query mode when no-data-found after execute a query.

    HI,
    Greetings of the day, Can any one suggest me that how to Suppress the enter-query mode when no-data-found after execute a query on the form by a button.
    whenever i execute query on form and result is no data found then form :system.mode is still in enter-query mode.
    i want that if result is no data found then form comes back it initial state.
    i will thank full of him who will help me..
    Thanks in Advance..

    Put this in your Key-ExeQry trigger:Execute_Query;
    If Get_block_property(:System.current_block,query_hits)=0 then
      Exit_form; --this cancels the Enter-Query mode; Does not exit the form.
    End if;You may want to trap and prevent the "FRM-40353: Query cancelled" message, and change the "FRM-40301: Query caused no records to be retrieved. Re-Enter" message. To do that, you need an On-Message form-level trigger:Declare
      Msg_Code Number        := MESSAGE_CODE;
      MSG      Varchar2(150) := SUBSTR('   '||MESSAGE_TYPE||'-'
                             ||TO_CHAR(Msg_Code)||': '||MESSAGE_TEXT,1,150);
    BEGIN
      If Msg_Code=40301 then
           -- 40301: Query caused no records to be retrieved. Re-Enter
        Message('  NO RECORDS FOUND',No_acknowledge);
      Elsif Msg_Code=40353 then -- Query cancelled.
        null;
      Else
        MESSAGE(MSG,NO_ACKNOWLEDGE);
      End if;
    End;

Maybe you are looking for

  • Making photo galleries fit screen sizes in fluid grid layout

    Is it possible to have photo gallery images fit within the width of a device (such as smart phone) when a fluid grid design is being used?

  • People complain they cannot hear me clearly when I put them on speakerphone

    I just upgraded from the 3G to the 3GS, and all of the sudden people are telling me that they cannot hear me clearly when I place them on speakerphone. They describe it as if I am losing service, and the phone is breaking up. I never had this problem

  • SAP Transction to see the Man Hours/ Order

    Hi Experts, In process Order we had a standard Value Man Hours. Is there any Standard Transaction through which i can see the man hours per Order. Or Any body having any ides about the BADI. So through BADI I can fetch the field of man hours and see

  • Function Modul RV_SALES_DOCUMENT_VIEW_3

    Hi all i have a problem with the functionmodul RV_SALES_DOCUMENT_VIEW_3, when i run it, i became none data. I have enough authority, what's wrong? Greezzzz Moderator message: too vague, help not possible, please describe problems in all technical det

  • Last Login Time

    <p>Trying to create a report which would include the last logintime of each user. I can see that value is being stored somewherebecause when you select users in EAS it gives you a column 'LastLogin Time'.</p><p> </p><p>Is there any way to have that d