GP - post condition loop block

Hi there,
I developed two web dynpro applications that implement the Callable object interface. Let's say they are called wdpA and wdpB.
wdpA has  output parameter id with multiplicity (0..1)
wdpB has input parameter id with multiplicty (0...n = list)
Is it possible to do wdpA in a post condition loop block (execute it at least once) and after that block go to the next block that contains wdpB. In going from wdpA (possibly executed multiple times) to wdpB, i want to consolidate wdpA-output_id to and wdpB-input_id so that the id's that were generated in the loop can be processed in wdpB.
Kind regards,
J.

Hi Joren,
I don't think it's too difficult. You can find a description and an example here:
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/82/0e6f4132f15b58e10000000a1550b0/frameset.htm">Implementing Callable Objects for Background Execution</a>
In any case you need some references/public parts to determined GP DCs, if you have a NWDI, than it should no problem to reference to them. If not, perhaps the following blog describes a good workaround:
<a href="/people/andre.truong/blog/2006/06/26/working-with-the-apis-of-caf-guided-procedures-nwdi-or-local-development">Working with the APIs of CAF Guided Procedures: NWDI or Local Development?</a>
Regards,
  Jan

Similar Messages

  • Delay/Timer only in a conditional loop.

    Hello,
    I want to use a delay(or some kind of timer) within my
    program. I intend to use to it within a conditional loop. Specifically,
    if a particular condition is true, then I want to wait for 50ms and
    then check another condition, which if true, I want to stop my program.
    I have used wait vi in the timing section. But this vi pauses my
    whole program. Specifically, when the above mentioned condition is met,
    I want the delay vi to execute along with my data acquistion vi. At
    present, when the delay vi executes, everything (data acquisition, peak
    detetction, plotting etc) in the program pauses. I guess its correct
    functionality of wait vi but it does not suit my need.
    Does someone have any alternate for pausing (delay/timer) a
    particular condition loop without affecting the other parts of my
    program? Specifically, only the conditional loop delays for a certain time while other features like data acquisition, peak
    detetction, plotting etc excute normally.
    Message Edited by Neuropotential on 02-22-2010 12:47 PM
    Message Edited by Neuropotential on 02-22-2010 12:48 PM
    Solved!
    Go to Solution.

    Yes. This is exactly what I was looking for. But, there is a issue. In practise, i will not be looking at 10 sec delay but a very small number like 50 ms. With this approach, when I set a value of 50ms, my program stops after close to 90-93ms (After 50ms, there is a AND gate, when true stops the program; Refer to the attachement).
    There are multiple reasons which I see. First is obvious I am using a windows xp with lot of other stuff going on simutaneously. Also. elapsed time vi is an "express vi". Do you think this can be one of the primary reason for such a delay? Finally, I intend to use this program on RT based machine.
    Do  you see it working exactly as expected on those machines or do I have to modify my code? Please guide me. 
    Also, how to I mark your post as answer and other good things. 
    Thanks 
    Attachments:
    Image.JPG ‏60 KB

  • Conditional Loop doesnt work correctly.

    Hi There,
    If you analyze my code, its all about parsing a dictionary.
    Im checking the dictionary for the "aardvark" word. It gives me
    false all the time. When "aardvark" is the first word in the array,
    i.e my_dictionary[0] is "aardvark". I wonder why the conditional
    loop isnt working fine. Im checking if the user string aardvark is
    == my_dictionary
    ; it should be giving me the true value.
    Is there any error in the code? Can anyone explain me where
    im going wrong?
    P.S -> The traces put everywhere gives me the right
    output. Except for the result of the if().
    Regards and thanks a lot in advance.
    Roshan Kolar

    Hi Raymond,
    Thanks for the reply. I got the problem, actually the
    conditional loop was perfect, the parsing was not. The reason
    being, some words in the dictionary had a Space/NewLine/Carriage
    Return at the last index after the word. It was all random, so some
    words were taken, but some were not like "vicious" == "vicious " -
    gave INVALID WORD.
    So I redesigned the parser, where I removed the unwanted last
    char - now the condition worked fine. Thank god I was working even
    after posting the query.
    Thanks a lot Raymond.
    Regards,
    Roshan

  • Phase calculation in conditional loop

    I collect data from 2 channels on an Agilest oscilloscope (DSO-X-2004A) using the IVI Scope Acquire block. After acquiring those signals, I want to know the phase difference, which I calculate in the following manner: Tone Extraction CH1, Tone Extraction CH2, Formula (detect phase1 - detect phase 2). 
    I want to run this in a loop, and store the phase difference each loop. For that I have a conditional loop (set to 10 iterations for now), and after each phase difference calculation I save the new data point to a txt file. Is there another way of storing/saving the phase difference calculation from each loop, besides saving it to file?
    The next problem I have is that after all the loops are finished, I want to look at the phase difference data and plot it vs iteration number. This is a problem because I get the error: "The selected file does not contains any Signals that could be imported" when trying to load the data at the end. I have the load ascii block outside the conditional loop that generates the data file, so I don't know why the load ascii is trying to excecute before the loop is done. I tried splitting everything into Sequence conditions with execution delays, but that hasn't worked either.
    Is there a better way to save the calculation from each loop, or how do I appropriately load by text file after creating it in the same signal express project?
    Thanks,
    John Oxaal

    Thanks for sending the the project.  For now if you would like to easily integrate the setup that you have in SignalExpress into LabVIEW you can actually convert the project into LabVIEW code.  As long as the LabVIEW version is as late or later than your SignalExpress version, you can do this.  Please refer to document below on how to convert signal express project into a LabVIEW VI.
    How Can I Generate a LabVIEW VI From My SignalExpress Project?:
    http://digital.ni.com/public.nsf/allkb/96C01D2680084AAA86256F33007D98FA
     Once you figure out how to take in your data in LabVIEW, you can start placing your data in the array that I mentioned from which you can process the data.
    Cameron T
    Applications Engineer
    National Instruments

  • BPM finishes when reaching exception in loop block

    Hi everybody,
    we got a loop block in BMP. In the loop block we catch mapping errors by using an exception branch.
    What we can see is that when an exception is thrown the process steps into the exception branch an than is leaving the loop block!! So the remaining single messages are not processed!
    Is there a workaround?
    Regards Mario

    Hi Mario,
    Have you used the local correlation for block step.
    Can you please give steps you used in BPM, also try to see the below threads
    What is the use of block step in BPM? Please help!
    BPM ParforEach Loop
    BPM loop
    also,
    BPM Block step
    Using BPM (Blocks) when Incoming message has multilple rows
    Doubt in BPM
    BPM: Block Processing: ParForEach
    Regards
    Chilla

  • Getting a mapping error to propogate from loop block within I.P.

    OK I kinda asked the question as a sub topic under a different heading SXMB_MONI_BPE -> Message Payload not visible in container but didnt really get an answer I'm happy with, so here goes as a main topic!
    The short description:
    I have a mapping step that must reside in a loop block, any mapping errors I want propogated back up to the main container so that they error and appear in the trace within SXMB_MONI in the same visibly obvious way as a mapping step that is not inside a block does.
    The long description:
    I have an Integration Process which splits a source message, then maps the individual messages produced within a forEach block. Unfortunately when there is a mapping error within the block, it does not propogate any meaningful information back to the message trace. Instead it just fails in smq2 with permanent error in inbound bpe processing.
    When I search in SXMB_MONI_BPE there are no process steps returned, as though the  IP was never called by the BPE.
    When I put the whole thing inside a block with an exception path that has an alert step, I do get process steps returned in sxmb_moni_bpe. When I examine the list with technical details I cannot see any "payload" under the table of messages that has been split out, therefor I cannot debug the mappings of individual messages I am looping on.  I have LOGGING, LOGGING_PROPOGATION and LOGGING_SYNC set to 1, and TRACE_LEVEL set to 3 for my IE.
    I have 2 scenarios/requirements:
    1) I put the uncaught mapping exception in the loop blook, and the error is propogated back up and the smq2 error is subsequently not produced (like it would behave if the mapping step was not inside any blocks).
    2) I catch exceptions and raise an alert and then the logging is enhanced sufficiently to enable the individual messages the loop block is looping on to be viewed within the container in sxmb_moni_bpe->list with technical details. 
    The only place I can see the error is in the defaultTrace log file, which is obviously not a suitable method for productive use.  Any solution needs to be usable in day-to-day administration of a production system, even though this is a dev issue at present!
    Thanks,
    James.

    James
    I have used this for throwing smart exceptions in SXMB_MONI
    http://agportal.goldeye.info/index.php?option=com_content&task=view&id=30&Itemid=40
    Not sure if it would work in this instance...
    Barry @ Axon!

  • IR not balance was posted but not blocked for payment

    Dear all,
    Kindly help.
    I have PO , with GR amount of 1000, then tried to post IR amount higher than the 5%  tolerance limit
    PO/GR amount = 1,000
    IR amount  =  1,500.00
    in this case when i simulate and check, i get the message Balance Not Zero , so I cannot post.
    But when i use the function in this path  EDIT > ACCEPT and POST  , i am able to post and NOT Blocked for Payment.
    Why is this so?
    Please help. Hope i explained this clearly.
    thanks in advance.

    Hello
    Please note that in MIRO if you post invoices choosing Edit- >Accept and
    Post, then this procedure overwrites all other settings. Your invoice
    will be posted regardless of the tolerances, etc.
    Please, check the attached notes:
    394370   FAQ: Invoice release - frequently asked questions
    333930   MR3M/MIR4: Display of payment block
    377306   MIRO/MRBR: System behavior in the case of invoice
    SAP's explanation on this is as follows:
    The system design is such that it only checks the blocking reasons at
    the initial invoice verification. This was to avoid the release
    functionality being too complicated and hence difficult to design. In
    this case, the system still recognises the block as being valid as it
    is referring to the initial invoice and it will have to be manually
    released only. I hope this has cleared up any confusion you may have
    regarding this issue.
    In conclusion, it is only possible to automatically release invoices
    if their blocking reasons are no longer valid. This can be the case for
    invoices blocked due to quantity, price, or schedule variances, or due
    to quality inspection.
    You can only use the function Release automatically for the blocking
    procedure Blocked due to variances.
    However, please note that if the 'GR-Based IV' indicator is set in the
    line item of the PO, the invoice can not be released automatically.
    The reason behind this s that with GR-based IV the system only
    makes checks against each individual goods receipt rather than
    against the invoice as a whole. If you need to use GR-based IV, then the
    invoice will have to be released manually in MRBR.
    I hope this clarifies the system behaviour
    regards
    Ray

  • Non standard Post Conditions

    Hi All,
    I would like to know if it is possible with a post condition or something else, to skip and go to another step from another jobchain and not its own jobchain. Here is an example, let's say we have :
    - a jobchain A contains 2 steps
    step 1: jobchain B
    step 2: jobchain C
    I want for a particular status of B's script jump into a particular step of C.
    The allowed actions within post conditions are restricted to its jobchain.
    Any great ideas ?
    Thanks for your help.
    Regards,
    Yi Jiang

    Hi Yi,
    So you have a chain A calling two chains B and C sequentially.
    If I got your question right, you want chain B to stop in certain situations, and then let chain A continue with chain C but from a certain step in C.
    The easiest way to do this, if possible, is to break up chain B and C in smaller parts all called by chain A. Then you can use postconditions in chain A to do the jump to a different step. You would only need to break up B and C at the points where you need a postcondition.
    Another approach could be to have preconditions in chain C that determine what happened to chain B. Depending on the result of B, the first step(s) or call(s) in chain C could then be skipped. The result of chain B could be derived from the job statuses.
    You could also have each step in chain B set a certain out parameter of chain B, which can then be used in chain C to determine which steps to skip. This should make the preconditions on C easier, but it requires some effort in chain B.
    Is this what you were looking for ?
    Regards,
    Anton.

  • Bug: CCDoc fails with method group in Contract.ForAll/Exists in pre/post conditions

    When Contract.ForAll or Contract.Exists is used in a pre/post condition, and the predicate given is a method group instead of a lambda, CCDoc fails with the following error:
    CCDoc failed with uncaught exception: Object reference not set to an instance of an object.
    Stack trace:    at CCDoc.CCDocCSharpSourceEmitter.TraverseChildren(IMethodCall methodCall)
       at Microsoft.Cci.CodeTraverser.Traverse(IMethodCall methodCall)
       at CCDoc.XContract.WriteCSharpFromAST(IExpression expression)
       at CCDoc.XPrecondition.WriteTo(XmlWriter writer)
       at CCDoc.XmlTraverser.WriteEndElement(XmlReader reader, XmlWriter writer)
       at CCDoc.XmlTraverserBase.WriteNodeSingle(XmlReader reader, XmlWriter writer)
       at CCDoc.XmlTraverserBase.Transform(XmlReader reader, XmlWriter writer)
       at CCDoc.CCDoc.WriteContracts(IDictionary`2 contracts, Options options, DocTracker docTracker)
       at CCDoc.CCDoc.RealMain(String[] args)
       at CCDoc.CCDoc.Main(String[] args)
    Stack trace can vary, but its always the same method at the top.
    Example code that produces this error: 
    public static class Program
    public static void Main(string[] args)
    Contract.Requires(Contract.ForAll(args, ValidateArg));
    public static bool ValidateArg(string arg)
    return arg != null;

    Hi Lev,
    To your question to clear the track
    You can delete your track as described in the below link, and then recreate the track and reimport.
    Link: [Deleting Track|http://help.sap.com/saphelp_nw70/helpdata/EN/33/71fe94e1834af8b5bd3c0e1de5ab41/frameset.htm]
    Do not forget to delete DTR workspace.
    Do reward points if you find the link useful.
    Cheers,
    Sandeep

  • Multilevel dynamic approval process using precondition loop block

    HI,
    I am trying to create a multivel dynamic approval process using a precondition loop block. The structure of my process is,
    Process->1)Sequential Block containing requestor action->processor of requestor action is initiator
                2)Precondition Loop Block containing
                        i)Loop Decision action containing a business logic callable object
                        ii)Loop Body Block containing Approver action-processor of approver action is filled from context parameter
    The loop decision action implements the logic for loop decision. Can anybody help me by suggesting the proper target of each of these actions, and the processor for loop decision action?
    Whenever I am initiating the process, the requestor action is getting executed,  On completion of this action I am getting a message "No activity is currently selected", that is, it is not entering the precondition loop block.
    Please guide me with the proper process flow of this and how to adjust the roles and parameters
    Thanks,
    Swaralipi

    Posted another thread on the same issue

  • Checking pre and post conditions for a method

    if precondition is satisfied then method executes
    after executing
    we need to check post conditions
    i used java.lang.reflect
    to get informatio of fields , parameter types (for methods) etc.
    so after executing the method i.e after coming out can we access the latest values for checking the post condition ?

    Ok, stop posting the same question, please. This is the 3rd one. I gave you an answer here: http://forum.java.sun.com/thread.jspa?threadID=690687
    Please continue there.

  • END CONDITIONS IN BLOCK STEP

    In approval process  how many agents are determined at run time in multiline container, i used block for this  if any one rejects i should come out of block i created one container element in local container of the block  , in rejected branch i assigned some value using container operation, the same thing i given as a end condition  in block,  when i checked if any one rejected it is not coming out of the block can any one sugge

    why end condition is not working in block step i have given like this
    In rejected branch   container operation -
    flag = x (local container of block)
          end condition is flag = x.
    I tried like this also  flag = x,
       I Binded to workflow container  flag -
    > flag1(workflow container).
       i have given end condition is  flag1 = x.
    both are not working, I have seen in the workflow log it is executing till the container operation when i click on reject.

  • Able to post Invoice for Blocked stock from quality

    Hi
    I did GR for material against PO for 50 pcs, During QA32 stock posting i posted 30 pcs to Unres. stock(101) and 20 pieces to blocked stock(350) storage locations.
    Now when I am trying to  create  MIRO invoice verification, I am getting all the 50 pcs and available to post also for the entire quantity. How the system is allowing me to carryout Invoice verification for the blocked stock 20 pcs also ???
    It should allow me to process the 30 pcs only which are in unres. stock .
    How do I block the blocked stock from getting invoiced ?
    Please help
    Thanks
    Samuel

    Dear Jurgen
    Thanks for the reply,  master does contain the control key, I also have the inpsection set_up for the materials. During PO in delivery tab at item level I am getting stock type as Quality Inspection. During GR, lot is getting generated and we are able to Stock post it using QA11. Every thing works fine till the stock is there in Quality till the run of Txn QA11. But once stock is out of quality we are having the issue for the stock posted to blocked, I can understand MIRO picking up Unrestricted Quantity of the Lot but why it is also picking the quantity posted to blocked stock as we do not want to pay the vendor for this stock quanitity till we clear it.
    Is there any normal config setting to stop it form geting picked during MIRO.
    Thanks

  • Inspection Lot Stock: Post to GR blocked stock

    Hi Experts,
    During the IQC process (inspection type 01), first I use the 103 to post the stock to GR Block stock (100 pcs), then after the Usage Decision, I post the stock 80 to  unrestricted use stock, 20 remain in the GR blocked stock.
    So, the 20 stay in the GR Blocked stock, and what can I deal with them? Manually create a inspection lot?

    >
    kiran kumar wrote:
    > > Dear GR blocked stock is not plant's own stock.It's a non valuated stock and there are no accounting data for GR blocked stock and it is not possible to post GR blocked stock to QI.
    >
    > Release the GR blocked stock with 105 mvt type.
    >
    > Cheers
    > KK
    Dear KK,
    The GR Blocked stock could be released to unrestricted stock by the 105 type while doing the usage decision.
    However, in this occassion, this 20 is remained in the GR blocked stock by using the "GR blocked stock" field in the Inspection Lot Stock tab of the QA14.
    Edited by: Veryhanhan on Dec 18, 2010 9:15 AM

  • Posting condition type as noted item through RERAPP

    HI Experts
    I want to post a condition type as a noted item through RERAPP.
    Can this be done. I see that there is only a provision for advance payment. My requirement is that the condition should be posted as a noted item which will then be used as a reference for incoming payment in Finance.
    Awaiting your expert opinion.
    Regards
    n_nn
    Edited by: n_nn on Oct 8, 2009 2:52 PM

    Hi,
    it is not possible to post noted items with RERAPP.
    Regards, Franz

Maybe you are looking for