Trigger workflow when PR changed and copmlete activ workflow for same PR

Hi,
i am triggering the workflow for all line item of PR when PR is created. now i want to create workflow when PR change also.
but before triggering the workflow i have to check the any in process workflow for the same and if then complete is and delete all its work item.
for Ex.
PR -4500000001 created with item 10 workflow triggerd ,
suppose i changed it and agan save next workflow trigged now before triggerin this workflow we have to complete the 1 instance of workflow , delete all workitem of that instant
Please suggest how can i achive this .
Thanks in Advance
Deepanker Dwivedi

Hello,
We have already implemented this in our old  project.Please find below the solution.
No config change is required.
1.Go to tcode SWETYPV
2. Double click on your linkage.
3. You will see there check function module.
4. MAke a custom custom function module of yours and it will have CDPOS and CDHDR as its component.
5. When so pr is changed or created this function module will be triggered there you can identify whether pr is changed or not using cdpos and cdhdr.
6. If it is change raise two events one for completeion of old worklfows which are in process second for creation of new workflow instance.
7. Create a wait step in your workflow which will wait for the completion event to be raised.
Hope it helps.
Regards,
Nabheet Madan

Similar Messages

  • Consolidation Group Change and Consolidation Activity

    Hi Experts,
    I am new in SAP consolidation, I have a question regarding the difference between the function "consolidation group change" and "consolidation activity".
    If I read in the sap library, these 2 functions are separated, but if I look at the content, I saw some similarity where the consolidation group change also included the investment activity like acquisition and divestiture.
    Could anyone explain what are the difference between these 2 function?
    When I was a user, if the group acquiered a new cons unit, I just add a new cons unit in the consolidation group hierarchy, assign consolidation method, add the additional financial data for the ownership percentage (activity = first consolidation), enter the reported financial data, run CI function and add one more column in my report painter.
    When I read SAP library, I saw the "consolidation group change" function talking about the consolidation activity, now I wonder, what are the difference? What is the business scenario for using the "normal" CI activity and the "consolidation group change"? Please anyone advise. Thank you.
    regards,

    Normal C/I is a regular acquisition or divestiture.  Cons Group Change could be movement of a company from one consolidation group to another (i.e., parent A sells company 1 to parent B).  Or you own a company 20% and purchase an additional 60% and must switch accounting technique from Equity to Purchase.  BCS will need to book Cons Group Change entries to account for the acct technique change.  (In the past, at 20%, you would only book equity pickup, or equitization entries, to the parent as PL30 adjustments in the CoI.  Now you must bring in the complete balances of the company due to purchase method of consolidation.  BCS books consolidation-group specific adjustments to do this.)
    Example....
    "Normal C/I activity"
    New company A needs be consolidated in Cons Group 1 starting in 03/2007.  Add the company to the Cons Group master data, set the accounting technique, update additional financial data w/ activity First consolidation and load data for the new company.  Run COI
    "Cons Group Change"
    Company A is consolidated in Cons Group 1, but starting in 06/2007 they will be sold to a parent in Cons Group 2.  Update the Cons Group master data...setting company A to divest in 06/2007 from CG1 and to First Consolidate in CG2 starting in 06/2007.  If using Org Change logic, create an Org Change number and define a sender/receiver relationship for CG1 --> CG2.  In additional financial data, create a total transfer activity w/ org change logic from CG1 to CG2.  Run Org Change task and BCS will zero out balance sheet related to company A in CG1 on posting level 02/12/22.  In CG2, similar postings will book "catch up" entries in 06/2007 to bring full balance sheet into CG2.  In CoI, company will be transferred to new parent.
    Hopefully that makes sense...
    Chris

  • [svn:fx-trunk] 10075: Cleanups from the spark text changes and some bug fixes for VideoElement.

    Revision: 10075
    Author:   [email protected]
    Date:     2009-09-08 18:01:58 -0700 (Tue, 08 Sep 2009)
    Log Message:
    Cleanups from the spark text changes and some bug fixes for VideoElement.  Also some PARB changes for UIComponent.
    TitleBar: Changing the skin part type from Label to Textbase
    UIComponent: skipMeasure()->canSkipMeasurement() to be in line with GraphicElement.  This has been PARB approved.
    UIComponent: same with hasComplexLayoutMatrix...this replaces hasDeltaIdentityTransform.  This has been PARB approved.
    StyleProtoChain: cleanup around what interfaces to use
    TextBase: clean up code that?\226?\128?\153s no longer needed.
    VideoElement: Fixing 4 bugs:
    SDK-22824: sourceLastPlayed keeps track of what video file we?\226?\128?\153ve called play() with last.  This way if a user pauses the video and wants to start it up again at the same point, we can call play(null) on the underlying FLVPlayback videoPlayer.  However, anytime the souce changes, we want to null out sourceLastPlayed.  This was causing a bug when someone set the source to null and then reset it to it?\226?\128?\153s previous value.
    SDK-23034 (GUMBO_PRIORITY): This deals with some FLVPlayback quirks around sizing.  I had put in a fix so we weren?\226?\128?\153t setting width/height on the underlying videoPlayer too many times, but apparently we need to make sure it always gets called once.  Hopefully when switching to Strobe we can cleanup this logic...I put a FIXME in to do this.
    SDK-21947/ SDK-22533 - some video files don?\226?\128?\153t always send out a metadata event.  I?\226?\128?\153m not quite sure why this is, but in case this happens, we do a check in the ready handler to see whether we should call invalidateSize() to make sure it gets sized properly.
    QE notes:-
    Doc notes:-
    Bugs: SDK-22824, SDK-23034, SDK-21947, SDK-22533
    Reviewer: Glenn, Corey
    Tests run: checkintests, Button, GraphicTags, VideoElement, and VideoPlayer (some VideoPlayer were failing, but I think it should be fine)
    Is noteworthy for integration: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22824
        http://bugs.adobe.com/jira/browse/SDK-23034
        http://bugs.adobe.com/jira/browse/SDK-21947
        http://bugs.adobe.com/jira/browse/SDK-22533
        http://bugs.adobe.com/jira/browse/SDK-22824
        http://bugs.adobe.com/jira/browse/SDK-23034
        http://bugs.adobe.com/jira/browse/SDK-21947
        http://bugs.adobe.com/jira/browse/SDK-22533
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleB ar.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
        flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AddActionInstan ce.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransfor mInstance.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/RemoveActionIns tance.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicEleme nt.as

  • My MacBook Pro, running 10.7.3, does not recognize when my iPhone and iPad are on the same network, thus it does not synch.  Any ideas?

    My MacBook Pro, running 10.7.3, does not recognize when my iPhone and iPad are on the same network, thus it does not synch.  Any ideas?

    Try the basics first:
       Change your router channel number.  Most times this works & is all you have to do.
    Disconnect & reconnect your modem.  unplug it for about 10 seconds.  Plug it back in.  Do the same for Apple’s routers.  Wait for everything to reboot.
    System Preferences>Network
    Click the Assist Me button.
    In the next window that pops up, click the Diagnostic button & do the necessary.
    Research Knowledge Base for network problems that pertain to the OS that is currently installed on your computer.   See these basic networking KB Articles:  http://support.apple.com/kb/HT1401 AirPort troubleshooting guide
    http://support.apple.com/kb/HT2712 Using network locations in Mac OS X
    Manually provided DNS server addresses are higher priority than DHCP's
    http://support.apple.com/kb/HT1714 Solutions for connecting to the Internet, setting up a small network, and troubleshooting
    ============================
    What to do when you can't connect to the Internet
    Also, run the Airport Utility app which is located inside the Utilities folder.
    =====================
    If using a  Linksys router, contact LinkSys Customer Support and/or post in their forums.
    If using Apple's Airport, please re-post over in one of the AirPort Forums.

  • So my iPhone 4S started draining battery after recent update, battery got changed and it worked perfect for 3 days, all of a sudden the phone won't stay on unless connected to mains... Cannot receive any signal "searching" constantly. HELP

    So my iPhone 4S started draining battery after recent update, battery got changed and it worked perfect for 3 days, all of a sudden the phone  shut down and now won't stay on unless connected to mains... Claims its at 100% battery but thats impossible as it was at 30% before it shut down randomly.
    Cannot receive any signal "searching" constantly.
    Turns off as soon as removed from usb ... wont stay on connected to laptop!
    HELP!

    The iPhone includes a one year warranty. If an Apple store is not nearby, you can call AppleCare and handle an exchange under warranty over the phone. The exchange will be shipped to your door - someone must sign for the delivery so if no one will be at home, have it delivered where you work. You use the same box to return the existing iPhone back to Apple. Return shipping label and tape to reveal the box incuded - call the carrier with number incuded when the box is ready to be picked up. AppleCare will request a credit card in the event the existing iPhone is not returned within 10 days after the exchange under warranty is received.
    Hardware can fail - it happens, which is why there is a one year warranty.

  • HT201240 I just got my Mac yesterday.  My kids want to access sites that need the adobe player.  When I try and download it asks for a password.   I do not even remember setting one up?  How do i find out what it is?

    I just got my Mac yesterday.  My kids want to access sites that need the adobe player.  When I try and download it asks for a password.   I do not even remember setting one up?  How do i find out what it is?

    FYI this is the legitimate Flash Player installer:
    This one is bogus:
    As X423424X wrote do not download it from any site other than the one he linked.
    Adobe does not require a password to download the Flash installer. Generally speaking passwords are not required to download software, unless you must register with the website so as to log in. In that case you should never use the same name and password you use to administer your Mac.

  • Why I can't see the button fuse, when I drag and drop a folder into same name folder

    Why I can't see the button fuse, when I drag and drop a folder into same name folder
    I saw the option only one time, and i reseach in the internet and I find fuse option, but now never saw again.
    And Yes, I drag folders with the same name.

    Ok, Gracias por su pronta respuesta, yo necesito arrastar una carpeta a otra ubicacion con una carpeta del mismo nombre, entiendo que lion te advierte si desea reemplazar el contenido o fusionar (mexclar el contenido)
    como lo dice aqui :
    http://www.cioal.com/2011/06/29/las-cinco-novedades-mas-importantes-de-mac-os-x- lion/
    3. Podrás combinar tus archivos y carpetas. Seguro que alguna vez has perdido algún archivo al combinar carpetas o archivos del mismo nombre pero distinto contenido. Ahora, cuando intentes mover una carpeta a un lugar con otra de idéntico nombre, tu equipo te preguntará si prefieres combinar ambas o cambiar una por otra. Los archivos serán tratados de una manera similar: Cuando coincidan archivos con el mismo nombre, el sistema te preguntará también si quieres mantener ambas copias.
    y en muchas otras paginas que tratan el tema.
    mi problema es que esa opcion no me aparece. solo la opcion de reemplazar (o no reemplazar o detener)
    Lo increible es que alguna vez el mismo dia de hoy si me aperecio la opcion.

  • Gain/loss posting in Group Curr when local cur and doc cur is the same

    When posting payment via F-28 we are getting currency gain/lost in group currency. The transaction and local currency are CLP. We are selling and receiving payment in CLP. Our group currency is USD. We are wanting to not see a currency gain/lost in USD when receiving payment. We would like the system to use the CLP:USD exchange rate in place at the time of the sale when we post the payment. Does any one have any advice on how to have the system to not calculate a currency gain/lost in group currency when document currency and local currency are the same AS the currency used for the sales and cash payment?

    Hi
    I have an query. Normally we will use the group currency for reporting at the Company level. So the gain/ loss for USD should have impact at CCo level. And practically fromt eh business point of view, it seems to be correct to valuate your payments or receipts when you actually book them. Doesn't it?
    Thanks
    Nikhil

  • I have macbook pro w existing iPhoto library. Now have Canon printer and loaded Canon software for same. Cannot access iPhoto library from Canon software, but prints fine from iPhoto. How can I use iPhoto library w Canon software?

    I have a macbook pro w exisitng iPhoto library. I now have Canon printer and loaded Canon software for same. I cannot access iPhoto library for use from Canon software. I can print from iPhoto directly to new printer without problem. How can I use iPhoto library with Canon software? I would like to try the software to see which I prefer...

    Simply export some photos from iPhoto to a folder on the desktop and experiment.
    Without telling us even what this program is, not to mind what it does, that's the best anyone can suggest.
    Regards
    TD

  • Pa40 mail trigger when startdate changed and save,

    in pa40
    when changing the startdate for corresponding pernr..
    after click on save button
    one mail should be sent to that corresponding pernr mail id.
    that mail should contain
            contract extension letter(this i did as zcontract_letter using smartform here i given pernr and begda manually).
    this letter will generate based on the pernr and startdate that to dynamically(which pernr and begda updated previously)..
    so here how can i get the values from database to smartform parameters and
    how can i trigger that mail to that pernr..
    can anybody help me ..
    here iam new for this hr abap..
    Edited by: anil.neegineni on Nov 10, 2010 12:29 PM
    Moderator message: "spec dumping", please work yourself first on your requirement.
    Edited by: Thomas Zloch on Nov 10, 2010 1:54 PM

    Hello,
    We have already implemented this in our old  project.Please find below the solution.
    No config change is required.
    1.Go to tcode SWETYPV
    2. Double click on your linkage.
    3. You will see there check function module.
    4. MAke a custom custom function module of yours and it will have CDPOS and CDHDR as its component.
    5. When so pr is changed or created this function module will be triggered there you can identify whether pr is changed or not using cdpos and cdhdr.
    6. If it is change raise two events one for completeion of old worklfows which are in process second for creation of new workflow instance.
    7. Create a wait step in your workflow which will wait for the completion event to be raised.
    Hope it helps.
    Regards,
    Nabheet Madan

  • When orientation change and soft keyboard is activated, return wrong value

    Hello,
    in a View, when the orientation change and the soft keyboard is activated, this.navigator.height return wrong value.
    systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
    public function orientationChangeHandler(event:StageOrientationEvent):void {
    inp.text=String(this.navigator.height);
    thanks.

    Can you attach a simple sample application that demonstrates this?  What device are you seeing this issue on?

  • Executing workflow when Date Changes in CRM 2011

    Hi,
    I want to execute workflow and get count of all records when year changes . For example if year changes from 2015 to 2016 then workflow should automatically trigger and get count of all system users in CRM. I can do same thing using .NET batch job and putting
    it into window schedular. But i want to achieve same thing in workflow , is it possible?
    Thanks,
    Abhishek
    Abhishek

    Hello,
    To calculate anything you will have to write code. But for periodical execution you can use workflows -
    http://gonzaloruizcrm.blogspot.com/2011/05/quite-often-we-have-business-process.html
    Dynamics CRM MVP/ Technical Evangelist at
    SlickData LLC
    My blog

  • Problem with WHEN-CHECKBOX-CHANGED and ON-POPULATE-DETAILS

    I have a detail block with a relationship set up to a second block. In my first block, if I cause an error but the next action I take is to press a checkbox on another record, my error will display and the raise form trigger failure is triggered but the checkbox changes it's value and the cursor is displayed on the record with the error. I didn't want the checkbox to change if an error occurred. I tracked this through the trace and saw the on-populate-details is fired between the error and the when-checkbox-changed trigger. I went through debug and saw because of the erorr, the system will do a 'return' back to the sending action. I beleive this return is causing the when-checkbox-changed to fire. I'm just guessing here. I tried a similar action on another form without a relationship set up. That would eliminate the on-populate-details trigger. When I did a similar error, I got exactly what I was looking for. I caused the error but pressed the checkbox on another record. The error displayed but the checkbox did not change and the cursor returned to the error record. I need the record to have this relationship. Consequently, I need the on-populate-details trigger. Can anyone think of a solution? I'm currently on Forms 6I. We are going to forms 10G in the next few months. But I really need a solution on my current set up. Thanks.

    The getNextDatabankRecord() call is at the beginning of my run code. I use one step just for this line code.
    Code :
    public void run() throws Exception {
              beginStep("CHARGEMENT DES DONNEES SUIVANTES");
                   info("Chargement des prochaines données...");
                   getDatabank("NouvellesIA").getNextDatabankRecord();
              endStep();
    Stop the user after this step and goto the finish section should not be a problem...
    If I use the "When out of records" option, does it jump directly to the finish section ?
    Thanks,
    Benoit.

  • CRM ORDER CHANGE AND STATUS MANAGEMENT - workflow

    Hi,
    We have created a Changed method for bus2000120 which is configured to fire when the Order is saved via Status Management.  We have added an entry to BSVW for the object, bus2000120.changed with no restrictions.  We have also created a function module that checks to see if the user status is E0005 or E0007 or it deletes the object from the Event table.  I see that this works correctly, however, a given SAVE of a transaction is firing 2 bus2000120.changed for the exact same user and system status.  (I know that it is firing 2 bus2000120.changed because I ran swels and swel. The event was listed twice. Please remember that the Event table when read directly after the save only lists bus2000120.changed one time.)
    There is only 1 entry in the event linkage(swetypv) for bus2000120.changed and it has a condition of the same user status, e0005 or e0007.  No real problem here, however, since there were 2 firings it runs the workflow twice.
    When you look at the extras-change documents you can see that the Header is changed twice, once for a system status and once for the user status.  I am assuming that since there are 2 changes, this is what is doing both firings.
    The funny thing is that if I fall into our custom code in debug where we are reading the status and event tables I only see bus2000120.changed.
    Any ideas on how I might solve this problem?  Do you believe I am correct in assuming that the 2 status changes to the header of the transaction is how both events are being fired?  If not, any guidance you might give would be greatly appreciated.

    see post stream, solved via sap note 1063138

  • Why Module level trigger contains "WHEN-CHECKBOX-CHANGED" trigger in Forms 6i?

    Hi,
    Why Module level trigger contains triggers like "WHEN-CHECKBOX-CHANGED", "WHEN-BUTTON-PRESSED" etc.? "WHEN-CHECKBOX-CHANGED" trigger is present in CheckBox & "WHEN-BUTTON-PRESSED" trigger in Button. Then why these triggers are also presnt in Module?
    Can anyone please clarify my doubt?

    There's a lot of triggers that are present at different "scopes". Like they exist at the item level, the block level,
    the module level...
    The idea is if you have an action that should only occur at that one single item it can do in the item trigger. If
    it's for all of them on the block, in the block level trigger. If for all of them ever, at the module level.
    For example suppose you wanted it to do a next_item after the trigger executed you can put that logic in the module
    level trigger. A key thing to notice here is the trigger hierarchy. That is essential to know about.
    Right click on one of these triggers in the object navigator. The execution hierarchy is override, before and after.
    since each of these levels of the same trigger has this execution hierarchy this is, well, potentially not easy to
    understand what is going to happen. I would typically have a per-item trigger be before and a higher level trigger
    be after.
    And this execution hierarchy thing is something I'd love to see enhanced in the gui. I wish it was a lot easier to see
    what the execution hierarchy is when editing a trigger text. I wish one could see and modify the execution hierarchy on the
    same screen as the trigger text and what would be really great is some way to tell how the trigger hierarchy will sort out
    at run time. For example if one is looking at an item level trigger it would be fabulous to know that as is, that trigger will be
    overridden by a higher level trigger and so on. Or vice versa if one is looking at a block level or form level trigger that it is
    overridden by a lower level trigger, or it will execute before or after some other trigger. I don't know what is defined to happen
    with various levels of triggers that have the same execution hierarchy. Like suppose they are all override,before,after.. then
    what happens? It'd be good to know.

Maybe you are looking for

  • Error in starting Hyperion Reports

    Hi I always have a problem in starting the reports. Most of the times I will get the error Could not connect to GSM server servername:6800 why I am getting this error all the time. What exactly this GSM server do . Thanks M.V..

  • How billing Doc (Invoice) get mapped to accounting doc

    Hi, I want to know how the billing doc get mapped to the accounting doc (FI Module) How the customerization is done. How it mapped through SD Doc. Thanks Uwanthi

  • How to sort files on my mac automatically?

    I have a Macbook Pro which i installed a second hard drive in for media files. Every time I turn my Macbook off the files unsort themselves in each folder. So every time I'm turn it on have to press clean up by Name, Size etc. I know its not a big jo

  • Filevault enabled under yosemite

    Hi. I was running the latest Mavericks with a Zotac-Nvidia GeForce-GTX video card on a Macpro from 2008. Everything was fine under Mavericks. I upgraded to Yosemite and the machine would not shutdown. I read a lot, did a lot of the suggestions, but n

  • Cell color

    Hello, I am using the ALV OO for the display. I need to color a particular cell. How can i do it ? CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY   EXPORTING     I_STRUCTURE_NAME              = 'gt_STRUCT'     I_SAVE                        = X_SAVE