Replacement for REJECT Statement

Hi Experts,
I have used REJECT statement in the code :
REJECT< DBTAB>.
But when i am doing extended chek, it is giving me an obsolete statement error .
Pleae tell me any replacement statement for REJECT statement.
Thanks and Best regards,
Sahil

Hi Sahil,
May be this link helps you in getting some information:
http://www.sdn.sap.com/irj/scn/advancedsearch?query=reject+statement
Regards,
Swarna Munukoti

Similar Messages

  • Process for Replacement for rejected parts by vendor

    Dear All,
    We are facing a problem in mapping the process of Replacement for rejected parts by vendor.
    Scenario:
    In case of import vendors, material is received in stock and payment is made to vendor thru Invoice.
    Now in case of defected parts vendor sends the replacement and the defected part is scrapped.
    Is there a process to receive the replacement part with proper accountability ?
    Thanks & Regards,
    Ritesh.

    Hi AP,
    We are scrapping the rejected material. Can you explain which movement type is used to put rejected stock to vendor movement type.
    Thanks & Regds,
    Ritesh.

  • Better replacement for Obsolete statement

    Hi ,
    During upgradation to ECC 6.0 , at many places in order to correct the Unicode error we need to use the Move statement. Since the Move-Corresponding is an obsolete statement now , so we can't use it any more. It is  very difficult and highly time consuming to move huge structures and internal tables field by field . Is there any alternative to this ?

    Move-Corresponding is an obsolete statement now
    Who said ????
    at many places in order to correct the Unicode error we need to use the Move statement
    What type of error ?

  • Replacement For Not Exists operator in oracle

    Hi Guys,
    I need a replacement for the statement " Where NOT EXISTS (SELECT 'X' FROM ADM_SC_SHIPPING_HEADER_FACT WHERE prod_obj = s.prod_obj AND sc_shipping_doc_num = s.sc_shipping_doc_num AND TO_NUMBER (transportation_status) > TO_NUMBER (s.transportation_status))".
    i am getting an error"literal doesnot match the formatting string" when this statement is included in my procedure.
    Please help me out..
    Thanks in advance.

    1007699 wrote:
    There is no problem with Transportation_status. It is a varchar and it's been converted to number using To_Number .There very likely IS a problem with transportation_status.
    It's supposed to be a number and you're trying to convert it to a number using to_number(), but the error message you're getting implies that there's a value in that column that isn't a valid number.
    If it's not that field, then there must be some othe implicit type conversion going on with one of the other columns in your subquery - 'cos that's what that error message means: "I'm trying to convert from one datatype to another, but it's not in the format I expect".
    Either fix your data to conform to the proper format, or explicitly specify a format that describes your data, or (best of all) use a proper and consistent datatype for your columns. If transportation_status is a number, why store it in a varchar2 column?

  • A replacement for the Quicksort function in the C++ library

    Hi every one,
    I'd like to introduce and share a new Triple State Quicksort algorithm which was the result of my research in sorting algorithms during the last few years. The new algorithm reduces the number of swaps to about two thirds (2/3) of classical Quicksort. A multitude
    of other improvements are implemented. Test results against the std::sort() function shows an average of 43% improvement in speed throughout various input array types. It does this by trading space for performance at the price of n/2 temporary extra spaces.
    The extra space is allocated automatically and efficiently in a way that reduces memory fragmentation and optimizes performance.
    Triple State Algorithm
    The classical way of doing Quicksort is as follows:
    - Choose one element p. Called pivot. Try to make it close to the median.
    - Divide the array into two parts. A lower (left) part that is all less than p. And a higher (right) part that is all greater than p.
    - Recursively sort the left and right parts using the same method above.
    - Stop recursion when a part reaches a size that can be trivially sorted.
     The difference between the various implementations is in how they choose the pivot p, and where equal elements to the pivot are placed. There are several schemes as follows:
    [ <=p | ? | >=p ]
    [ <p | >=p | ? ]
    [ <=p | =p | ? | >p ]
    [ =p | <p | ? | >p ]  Then swap = part to middle at the end
    [ =p | <p | ? | >p | =p ]  Then swap = parts to middle at the end
    Where the goal (or the ideal goal) of the above schemes (at the end of a recursive stage) is to reach the following:
    [ <p | =p | >p ]
    The above would allow exclusion of the =p part from further recursive calls thus reducing the number of comparisons. However, there is a difficulty in reaching the above scheme with minimal swaps. All previous implementation of Quicksort could not immediately
    put =p elements in the middle using minimal swaps, first because p might not be in the perfect middle (i.e. median), second because we don’t know how many elements are in the =p part until we finish the current recursive stage.
    The new Triple State method first enters a monitoring state 1 while comparing and swapping. Elements equal to p are immediately copied to the middle if they are not already there, following this scheme:
    [ <p | ? | =p | ? | >p ]
    Then when either the left (<p) part or the right (>p) part meet the middle (=p) part, the algorithm will jump to one of two specialized states. One state handles the case for a relatively small =p part. And the other state handles the case for a relatively
    large =p part. This method adapts to the nature of the input array better than the ordinary classical Quicksort.
    Further reducing number of swaps
    A typical quicksort loop scans from left, then scans from right. Then swaps. As follows:
    while (l<=r)
    while (ar[l]<p)
    l++;
    while (ar[r]>p)
    r--;
    if (l<r)
    { Swap(ar[l],ar[r]);
    l++; r--;
    else if (l==r)
    { l++; r--; break;
    The Swap macro above does three copy operations:
    Temp=ar[l]; ar[l]=ar[r]; ar[r]=temp;
    There exists another method that will almost eliminate the need for that third temporary variable copy operation. By copying only the first ar[r] that is less than or equal to p, to the temp variable, we create an empty space in the array. Then we proceed scanning
    from left to find the first ar[l] that is greater than or equal to p. Then copy ar[r]=ar[l]. Now the empty space is at ar[l]. We scan from right again then copy ar[l]=ar[r] and continue as such. As long as the temp variable hasn’t been copied back to the array,
    the empty space will remain there juggling left and right. The following code snippet explains.
    // Pre-scan from the right
    while (ar[r]>p)
    r--;
    temp = ar[r];
    // Main loop
    while (l<r)
    while (l<r && ar[l]<p)
    l++;
    if (l<r) ar[r--] = ar[l];
    while (l<r && ar[r]>p)
    r--;
    if (l<r) ar[l++] = ar[r];
    // After loop finishes, copy temp to left side
    ar[r] = temp; l++;
    if (temp==p) r--;
    (For simplicity, the code above does not handle equal values efficiently. Refer to the complete code for the elaborate version).
    This method is not new, a similar method has been used before (read: http://www.azillionmonkeys.com/qed/sort.html)
    However it has a negative side effect on some common cases like nearly sorted or nearly reversed arrays causing undesirable shifting that renders it less efficient in those cases. However, when used with the Triple State algorithm combined with further common
    cases handling, it eventually proves more efficient than the classical swapping approach.
    Run time tests
    Here are some test results, done on an i5 2.9Ghz with 6Gb of RAM. Sorting a random array of integers. Each test is repeated 5000 times. Times shown in milliseconds.
    size std::sort() Triple State QuickSort
    5000 2039 1609
    6000 2412 1900
    7000 2733 2220
    8000 2993 2484
    9000 3361 2778
    10000 3591 3093
    It gets even faster when used with other types of input or when the size of each element is large. The following test is done for random large arrays of up to 1000000 elements where each element size is 56 bytes. Test is repeated 25 times.
    size std::sort() Triple State QuickSort
    100000 1607 424
    200000 3165 845
    300000 4534 1287
    400000 6461 1700
    500000 7668 2123
    600000 9794 2548
    700000 10745 3001
    800000 12343 3425
    900000 13790 3865
    1000000 15663 4348
    Further extensive tests has been done following Jon Bentley’s framework of tests for the following input array types:
    sawtooth: ar[i] = i % arange
    random: ar[i] = GenRand() % arange + 1
    stagger: ar[i] = (i* arange + i) % n
    plateau: ar[i] = min(i, arange)
    shuffle: ar[i] = rand()%arange? (j+=2): (k+=2)
    I also add the following two input types, just to add a little torture:
    Hill: ar[i] = min(i<(size>>1)? i:size-i,arange);
    Organ Pipes: (see full code for details)
    Where each case above is sorted then reordered in 6 deferent ways then sorted again after each reorder as follows:
    Sorted, reversed, front half reversed, back half reversed, dithered, fort.
    Note: GenRand() above is a certified random number generator based on Park-Miller method. This is to avoid any non-uniform behavior in C++ rand().
    The complete test results can be found here:
    http://solostuff.net/tsqsort/Tests_Percentage_Improvement_VC++.xls
    or:
    https://docs.google.com/spreadsheets/d/1wxNOAcuWT8CgFfaZzvjoX8x_WpusYQAlg0bXGWlLbzk/edit?usp=sharing
    Theoretical Analysis
    A Classical Quicksort algorithm performs less than 2n*ln(n) comparisons on the average (check JACEK CICHON’s paper) and less than 0.333n*ln(n) swaps on the average (check Wild and Nebel’s paper). Triple state will perform about the same number of comparisons
    but with less swaps of about 0.222n*ln(n) in theory. In practice however, Triple State Quicksort will perform even less comparisons in large arrays because of a new 5 stage pivot selection algorithm that is used. Here is the detailed theoretical analysis:
    http://solostuff.net/tsqsort/Asymptotic_analysis_of_Triple_State_Quicksort.pdf
    Using SSE2 instruction set
    SSE2 uses the 128bit sized XMM registers that can do memory copy operations in parallel since there are 8 registers of them. SSE2 is primarily used in speeding up copying large memory blocks in real-time graphics demanding applications.
    In order to use SSE2, copied memory blocks have to be 16byte aligned. Triple State Quicksort will automatically detect if element size and the array starting address are 16byte aligned and if so, will switch to using SSE2 instructions for extra speedup. This
    decision is made only once when the function is called so it has minor overhead.
    Few other notes
    - The standard C++ sorting function in almost all platforms religiously takes a “call back pointer” to a comparison function that the user/programmer provides. This is obviously for flexibility and to allow closed sourced libraries. Triple State
    defaults to using a call back function. However, call back functions have bad overhead when called millions of times. Using inline/operator or macro based comparisons will greatly improve performance. An improvement of about 30% to 40% can be expected. Thus,
    I seriously advise against using a call back function when ever possible. You can disable the call back function in my code by #undefining CALL_BACK precompiler directive.
    - Like most other efficient implementations, Triple State switches to insertion sort for tiny arrays, whenever the size of a sub-part of the array is less than TINY_THRESH directive. This threshold is empirically chosen. I set it to 15. Increasing this
    threshold will improve the speed when sorting nearly sorted and reversed arrays, or arrays that are concatenations of both cases (which are common). But will slow down sorting random or other types of arrays. To remedy this, I provide a dual threshold method
    that can be enabled by #defining DUAL_THRESH directive. Once enabled, another threshold TINY_THRESH2 will be used which should be set lower than TINY_THRESH. I set it to 9. The algorithm is able to “guess” if the array or sub part of the array is already sorted
    or reversed, and if so will use TINY_THRESH as it’s threshold, otherwise it will use the smaller threshold TINY_THRESH2. Notice that the “guessing” here is NOT fool proof, it can miss. So set both thresholds wisely.
    - You can #define the RANDOM_SAMPLES precompiler directive to add randomness to the pivoting system to lower the chances of the worst case happening at a minor performance hit.
    -When element size is very large (320 bytes or more). The function/algorithm uses a new “late swapping” method. This will auto create an internal array of pointers, sort the pointers array, then swap the original array elements to sorted order using minimal
    swaps for a maximum of n/2 swaps. You can change the 320 bytes threshold with the LATE_SWAP_THRESH directive.
    - The function provided here is optimized to the bone for performance. It is one monolithic piece of complex code that is ugly, and almost unreadable. Sorry about that, but inorder to achieve improved speed, I had to ignore common and good coding standards
    a little. I don’t advise anyone to code like this, and I my self don’t. This is really a special case for sorting only. So please don’t trip if you see weird code, most of it have a good reason.
    Finally, I would like to present the new function to Microsoft and the community for further investigation and possibly, inclusion in VC++ or any C++ library as a replacement for the sorting function.
    You can find the complete VC++ project/code along with a minimal test program here:
    http://solostuff.net/tsqsort/
    Important: To fairly compare two sorting functions, both should either use or NOT use a call back function. If one uses and another doesn’t, then you will get unfair results, the one that doesn’t use a call back function will most likely win no matter how bad
    it is!!
    Ammar Muqaddas

    Thanks for your interest.
    Excuse my ignorance as I'm not sure what you meant by "1 of 5" optimization. Did you mean median of 5 ?
    Regarding swapping pointers, yes it is common sense and rather common among programmers to swap pointers instead of swapping large data types, at the small price of indirect access to the actual data through the pointers.
    However, there is a rather unobvious and quite terrible side effect of using this trick. After the pointer array is sorted, sequential (sorted) access to the actual data throughout the remaining of the program will suffer heavily because of cache misses.
    Memory is being accessed randomly because the pointers still point to the unsorted data causing many many cache misses, which will render the program itself slow, although the sort was fast!!.
    Multi-threaded qsort is a good idea in principle and easy to implement obviously because qsort itself is recursive. The thing is Multi-threaded qsort is actually just stealing CPU time from other cores that might be busy running other apps, this might slow
    down other apps, which might not be ideal for servers. The thing researchers usually try to do is to do the improvement in the algorithm it self.
    I Will try to look at your sorting code, lets see if I can compile it.

  • Change System Status of SO item dynamically based on Reason for Rejection

    Hi ppl,
    Our SAP user has raised a requirement as described below:
    In sales order (in creation mode (VA01) or change mode (VA02)), if at the item level, the reason for rejection is mentioned, then the system status for that item should be automatically set to Technically Complete SET (TECO); and if the user removes the reason for rejection for the item, then the system status Technically Complete should be RESET automatically.
    We are looking for any user-exit or BADI available which would be allow this dynamic change of system status based on the reason for rejection field. (No manual interaction for setting or resetting the system status).
    Technically, the functionality is based on the below fields:
    Reason for Rejection: VBAP-ABGRU
    System Status: JEST-STAT
    Please provide suitable inputs.
    Thanks,
    Dawood
    Edited by: Dawood.S.Ghasletwala on Jun 29, 2009 3:14 PM

    program: SAPMV45A
    User exit: USEREXIT_SAVE_DOCUMENT_PREPARE.
    loop at xvbap where updkz NE 'D'.
      if not xvbap-abgru is initital.
        "set your system state here.
      else.
       "reset your system state here.
      endif.
    endloop.
    hmmm you can as well try if you got all you need to know already in userexit: USEREXIT_CHECK_VBAP.
    Edited by: Florian Kemmer on Jun 29, 2009 11:53 AM

  • Double Factory pattern purposal as replacement for Double Check #2

    Hi All,
    Here is the code for the pattern proposal, its intended as a replacement for double checked locking, which was proved to be broken in 2001. Here is the code...
    public class DoubleFactory {
       private static Object second_reference = null;
       public static Object getInstance() {
          Object toRet = second_reference;
             if (toRet == null) {
                second_reference = CreationFactory.createInstance();
                toRet = second_reference;
          return toRet;
       private DoubleFactory() {}
    public class CreationFactory {
       private static Object instance = null;
       public static synchronized Object createInstance() {
          if (instance == null) {
             instance = new Object();
          return instance;
      }Also I have spent several months discussing this with Peter Haggar, who believes that this code is not guaranteed to work. However I have been unable to discern from his message why he believes this will not be guaranteed to work, and I am posting this here to attempt to find a clearer explanation or confirmation that the pattern I am purposing (Double Factory) is guaranteed to work.
    Thanks,
    Scott
    ---------------------------- Original Message ----------------------------
    Subject: Re: [Fwd: Double Factory replacement for Double Check #2] From:
    "Scott Morgan" <[email protected]>
    Date: Fri, January 25, 2008 10:36 pm
    To: "Peter Haggar" <[email protected]>
    Hi Peter,
    I appologize if my last response came accross as rude or something. If
    my code is not guaranteed to work ok, can you help me understand why. I
    am after all looking for a solution for all of us.
    If my solution is wrong as you say because the member variables of the
    singleton are not up to date. I understand this to mean that the
    second_reference pointer is assigned to the memory where the instance
    object will get created before the instance object even starts the
    creation process (when the jvm allocates memory and then enters the
    constructor method of the Singleton). This doesn't seem possible to me.
    Can you refrase your statments, to help me understand your points?
    If not I am happy to turn to the original wiki for discussion.
    Thanks for your effort,
    Scott
    Thanks for asking my opinion, many times, then telling me I'm
    wrong...wonderful. You are a piece of work my friend. For what it'sworth, your email below shows you still don't understand these issues
    or what I was saying in my emails. I've been more than patient.
    >
    All the best. And by the way, your code is not guaranteed to work. It's not just me that's "wrong", it's also the engineers at Sun who
    designed Java, the JVM, and the memory model, and countless people who
    have studied it. I'm glad you have it all figured out.
    >
    Peter
    "Scott Morgan" <[email protected]>
    01/18/2008 12:47 PM
    Please respond to
    [email protected]
    To
    Peter Haggar/Raleigh/IBM@IBMUS
    cc
    Subject
    Re: [Fwd: Double Factory replacement for Double Check #2]
    Hi Peter,
    Thanks I understand your position now. However am I still believe that
    it will work and be safe;
    1) the Singleton you show would be fully constructed (having exited theSingleton() method) before the createInstance() method would have
    returned.
    2) The second_reference could not be assigned until the createInstance()
    method returns.
    3) So by the time second_reference points to Singleton all of the valueswill be set.
    >
    >
    I do understand that if the createInstance method was not synchronized(at the CreationFactory class level) that my logic would be flawed, but
    since there is synchronization on that method these points are true, and
    your comments about up-to-date values are not accurate.
    >
    Cheers,
    Scott
    >In your listing from your latest email T2 does encounter a sync block
    on createInstance.
    >>>>
    No. T2 will call getInstance and see second_reference as non-null.second_reference was made non-null by T1.
    >>
    >>>>
    What are you exactly are you refering to with the phrase 'up-to-datevalues'?
    >>>>
    Assume my singleton ctor is thus:
    public class Singleton
    private int i;
    private long l;
    private String str;
    public Singleton()
    i = 5;
    l = 10;
    str = "Hello";
    T2 will get a reference to the Singleton object. However, because youaccess second_reference without synchronization it may not see i as 5,
    l as 10 and str as "Hello". It may see any of them as 0 or null. This
    is not the out of order write problem, but is a general visibility
    problem because you are accessing a variable without proper
    synchronization.
    >>
    Peter
    "Scott Morgan" <[email protected]>
    01/16/2008 11:38 PM
    Please respond to
    [email protected]
    To
    Peter Haggar/Raleigh/IBM@IBMUS
    cc
    Subject
    Re: [Fwd: Double Factory replacement for Double Check #2]
    Hi Peter,
    In your listing from your latest email T2 does encounter a sync blockon createInstance.
    >>
    What are you exactly are you refering to with the phrase 'up-to-datevalues'?
    In this code the Singleton should also be
    A) non mutable (as in the instance of class Object in the example).
    If the singleton was more complex then the code to populate it'svalues
    would go inside the sync of createInstance().
    B) mutable with synchronization on it's mutator methods.
    In your article you mention out of order writes, which doesn't occurin
    this code.
    Cheers,
    Scott
    You read it wrong.
    - T1 calls getInstance which in turn calls createInstance.
    - T1 constructs the singleton in createInstance and returns to
    getInstance.
    - T1 sets second_reference to the singleton returned in getInstance. -T1 goes about its business.
    - T2 calls createInstance.
    - T2 sees second_reference as non-null and returns it
    - Since T2 accessed second_reference without sync, there is noguarantee
    that T2 will see the up-to-date values for what this object refers to.
    - Therefore the code is not guaranteed to work.
    >>>
    If this is not clear:
    - Re-read my email below
    - Re-read my article
    - If still not clear, google on Double Checked Locking and readanything
    from Brian Goetz or Bill Pugh.
    Peter
    "Scott Morgan" <[email protected]>
    01/13/2008 05:26 AM
    Please respond to
    [email protected]
    To
    Peter Haggar/Raleigh/IBM@IBMUS
    cc
    Subject
    Re: [Fwd: Double Factory replacement for Double Check #2]
    Hi Peter,
    Thanks for the reply, I don't see how T2 would see the a referenceto
    a
    partialy initialized object before the createInstance() method had
    returned. If T1 was in createInstance() when T2 entered
    getInstance(), T2 would wait on the CreationFactory's class monitor to
    wait to enter createInstance().
    Or in other words in the line of code ....
    second_reference = CreationFactory.createInstance();
    The pointer second_reference couldn't be assigned to the singleton
    instance when the synchronized createInstance() had fully constructed,initialized and returned the singleton instance. Before that the the
    second_reference pointer would always be assigned to null. So any
    thread entering getInstance() before createInstance() had returned
    (for the first time) would wait on the CreationFactory's class monitor
    and enter the createInstance() method.
    >>>
    So T2 will wait for T1.
    Cheers,
    Scott
    PS I think I am writing requirements for my next project :)
    Sorry for the delay...been in all day meetings this week.
    You are correct...I had been reading your code wrong, my apologies.
    My explanations, although correct, did not exactly correspond to your
    code.
    However, the code is still not guaranteed to work. Here's why:
    Assume T1 calls getInstance() which calls createInstance() and returnsthe
    singelton. It then sets second_reference to refer to that singleton.
    So
    far, so good. Now, T2 executes and calls getInstance(). It can see
    second_reference as non-null, so it simply returns it. But, there
    was
    no
    synchronization in T2's code path. So there's no guarantee that even
    if
    T2 sees an up-to-date value for the reference, that it will seeup-to-date
    values for anything else, ie what the object refers to...it's
    instance data. If T2 used synchronization, it would ensure that it
    read
    up-to-date
    values when it obtained the lock. Because it didn't, it could see
    stale
    values for the object's fields, which means it could see a partially
    constructed object.
    >>>>
    In the typical double-checked locking, the mistake is to assume theworst
    case is that two threads could race to initialize the object. But
    the worst case is actually far worse -- that a thread uses an object
    which
    it
    believes to be "fully baked" but which is in fact not.
    Peter
    "Scott Morgan" <[email protected]>
    01/03/2008 06:33 PM
    Please respond to
    [email protected]
    To
    Peter Haggar/Raleigh/IBM@IBMUS
    cc
    Subject
    Re: [Fwd: Double Factory replacement for Double Check #2]
    Hi Peter,
    Thanks for responding, I am still thinking that your mis
    interpreting
    the code so I have rewritten it here (Replacing
    DoubleFactory.instance with DoubleFactory.second_reference for
    clarity). If the T1 burps (gets interrupted) in the createInstance
    method it wouldn't have returned so the second_reference pointer
    would have never been
    assigned
    so T2 would just try again upon entering the getInstance method. Orif
    it had already entered getInstance it would be waiting to enter
    (until T1 releases the lock on CreationFactory.class ) on the
    createInstance method.
    >>>>
    public class DoubleFactory {
    private static Object second_reference = null;
    public static Object getInstance() {
    Object toRet = second_reference;
    if (toRet == null) {
    second_reference =
    CreationFactory.createInstance();
    toRet = second_reference;
    return toRet;
    private DoubleFactory() {}
    public class CreationFactory {
    private static Object instance = null;
    public static synchronized Object createInstance() {
    if (instance == null) {
    instance = new Object();
    return instance;
    Does this clear up my idea at all?
    second_reference should be always pointing to
    null
    or
    a fully initialized Object
    (also referenced by the pointer named 'instance' ), I don't see howit would end up partially initialized.
    >>>>
    Thanks Again,
    Scott
    "It" refers to T2.
    Your createInstance method is identical to my Listing 2 and is fine
    and
    will work.
    Yes, the problem with your code is in getInstance.
    >I don't see how the DoubleFactory getInstance method could bereturning
    a partially initialized object at this point. If CreationFactoryalways
    returns a fully initialized object and DoubleFactory only assigns a
    new
    reference/pointer to it how could DoubleFactory getInstance return a
    reference/pointer to partially initialized object?
    >>>>>>>
    >>>>>
    The reason it is not guaranteed to work is explained in my previousemails
    and in detail in the article. However, I'll try again. Anytime you
    access shared variables from multiple threads without proper
    synchronization, your code is not guaranteed to work. Threads are
    allowed
    to keep private working memory separate from main memory. There are
    2
    distinct points where private working memory is reconciled with main
    memory:
    - When using a synchronized method or block - on acquisition of thelock
    and when it is released.
    - If the variable is declared volatile - on each read or write of
    that
    volatile variable. (Note, this was broken in pre 1.5 JVMs which isthe
    reason for the caveat I previously mentioned)
    Your createInstance method uses synchronization, therefore, the
    reconciliation happens on lock acquisition and lock release. T1 can
    acquire the lock in createInstance, make some updates (ie create an
    object, run it's ctor etc), but then get interrupted before exiting
    createInstance and therefore before releasing the lock. Therefore,
    T1
    has
    not released the lock and reconciled its private working memory withmain
    memory. Therefore, you have ZERO guarantee about the state of mainmemory
    from another threads perspective. Now, T2 comes along and accesses
    "instance" from main memory in your getInstance method. What will
    T2
    see?
    Since it is not properly synchronized, you cannot guarantee that T2sees
    the values that T1 is working with since T1 may not have completely
    flushed its private working memory back to main memory. Maybe it
    did completely flush it, maybe it didn't. Since T1 still hold the
    lock,
    you
    cannot guarantee what has transpired. Maybe your JVM is not usingprivate
    working memory. However, maybe the JVM your code runs on does or
    will
    some day.
    Bottom line: Your code is not properly synchronized and is notguaranteed
    to work. I hope this helps.
    Peter
    "Scott Morgan" <[email protected]>
    01/03/2008 12:49 PM
    Please respond to
    [email protected]
    To
    Peter Haggar/Raleigh/IBM@IBMUS
    cc
    Subject
    Re: [Fwd: Double Factory replacement for Double Check #2]
    Hi Peter,
    Thanks for your response, I don't follow what 'it' refers to in
    the
    phrase 'It can see'. So for the same reason that you state that
    example 2 from your article I believe this class CreationFactory to
    work flawlessly when a client object calls the createInstance
    method.
    >>>>>
    I see this CreationFactory code as identical to your example 2 doyou agree with this?
    >>>>>
    public class CreationFactory {
    private static Object instance = null;
    public static synchronized Object createInstance() {
    if (instance == null) {
    instance = new Object();
    return instance;
    }Then my rational in the DoubleFactory class is that it can obtain a
    reference/pointer to the fully initialized object returned bycalling the above code. I believe you think that the problem with
    my code is
    in
    the DoubleFactorys getInstance method, is this correct?
    I don't see how the DoubleFactory getInstance method could bereturning
    a partially initialized object at this point. If CreationFactory
    always
    returns a fully initialized object and DoubleFactory only assigns a
    new
    reference/pointer to it how could DoubleFactory getInstance return a
    reference/pointer to partially initialized object?
    >>>>>
    Thanks again,
    Scott
    public static synchronized Singleton getInstance() //0
    if (instance == null) //1
    instance = new Singleton(); //2
    return instance; //3
    This above code is fine and will work flawlessly.
    Annotating my paragraph:
    T1 calls getInstance() and obtains the class lock at //0. T1 "sees"
    instance as null at //1 and therefore executes: instance = new
    Singleton() at //2. Now, instance = new Singleton() is made up of
    several lines of non-atomic code. Therefore, T1 could be
    interrupted
    after Singleton is created but before Singleton's ctor isrun...somewhere
    before all of //2 completes. T1 could also be interrupted after
    //2 completes, but before exiting the method at //3. Since T1 has
    not
    exited
    its synchronized block it has not flushed its cache. Now assume T2
    then
    calls getInstance().
    All still true to this point. However, with your code the nextparagraph
    is possible, with the code above, it's not. The reason is that T2
    would
    never enter getInstance() above at //0 because T1 holds the lock. T2will
    block until T1 exits and flushes it's cache. Therefore, the code
    above
    is
    properly thread safe.
    It can "see" instance to be non-null and thus
    return it. It will return a valid object, but one in which its ctor
    has
    not yet run or an object whose
    values have not all been fully flushed since T1 has not exited itssync
    block.
    "Scott Morgan" <[email protected]>
    01/02/2008 06:10 PM
    Please respond to
    [email protected]
    To
    Peter Haggar/Raleigh/IBM@IBMUS
    cc
    Subject
    Re: [Fwd: Double Factory replacement for Double Check #2]
    Hi Peter,
    Thanks for the response I understand the rational for inventing
    the
    double check anti pattern, I am sorry I still don't understand the
    difference between your solution #2 and my CreationFactory class.
    >>>>>>
    From your article figure 2.public static synchronized Singleton getInstance() //0
    if (instance == null) //1
    instance = new Singleton(); //2
    return instance; //3
    If I understand your email correctly this figure 2 is also flawed,since...
    >>>>>>
    T1 calls getInstance() and obtains the class lock at //0. T1 "sees"
    instance as null at //1 and therefore executes: instance = new
    Singleton() at //2. Now, instance = new Singleton() is made up ofseveral lines of non-atomic code. Therefore, T1 could be
    interrupted
    after Singleton is created but before Singleton's ctor isrun...somewhere
    before all of //2 completes. T1 could also be interrupted after
    //2 completes, but before exiting the method at //3. Since T1 has
    not
    exited
    its synchronized block it has not flushed its cache. Now assume T2
    then
    calls getInstance(). It can "see" instance to be non-null and thus
    return it. It will return a valid object, but one in which its
    ctor
    has
    not yet run or an object whose
    values have not all been fully flushed since T1 has not exited itssync
    block.
    So is #2 is also flawed for this reason?
    If so please revise your article, since I interpreted #2 as a
    plausible
    solution recommended by you (which lead me to the DoubleFactory
    idea).
    If not please help me understand the difference between #2 and my
    CreationFactory class.
    >>>>>>
    Thanks,
    Scott
    #2 is in Listing 2 in the article. What I meant was to forget the
    DCL
    idiom, and just synchronize the method...that's what listing 2
    shows.
    DCL
    was invented to attempt to get rid of the synchronization for 99.9%
    of
    the
    accesses.
    The solution I outlined in my email is using the DCL idiom, but on
    a
    1.5
    or later JVM and using volatile.
    You solution is not guaranteed to work. Here's why:
    public class DoubleFactory {
    private static Object instance = null;
    public static Object getInstance() {
    Object toRet = instance;
    if (toRet == null) {
    instance =
    CreationFactory.createInstance();
    toRet = instance;
    return toRet;
    private DoubleFactory() {}
    public class CreationFactory {
    private static Object instance = null;
    public static synchronized ObjectcreateInstance()
    //1
    if (instance == null) {
    instance = new Object(); //2
    return instance;
    } //3
    }T1 calls createInstance() and obtains the class lock at //1. T1"sees"
    instance as null and therefore executes: instance = new Object() at//2.
    Now, instance = new Object() is made up of several lines of
    non-atomic
    code. Therefore, T1 could be interrupted after Object is created
    but
    before Object's ctor is run...somewhere before all of //2
    completes.
    T1
    could also be interrupted after //2 completes, but before exiting
    the
    method at //3. Since T1 has not exited its synchronized block ithas
    not
    flushed its cache. Now assume T2 then calls getInstance(). It can"see"
    instance to be non-null and thus return it. It will return a
    valid object, but one in which its ctor has not yet run or an
    object
    whose
    values have not all been fully flushed since T1 has not exited itssync
    block.
    The bottom line is that if you are accessing shared variables
    between
    multiple threads without proper protection, you are open for aproblem.
    Proper protection is defined as: proper synchronization pre 1.5,
    and
    proper synchronization or proper use of volatile 1.5 or after.
    Therefore, if you must use the DCL idiom you have one option: -
    Use DCL with volatile on a 1.5 or later JVM.
    >>>>>>>
    You can also forget about DCL and just use synchronization (listing2
    in
    my article) or use a static field (listing 10 in my article).
    I hope this clears it up.
    Peter
    "Scott Morgan" <[email protected]>
    01/02/2008 04:00 PM
    Please respond to
    [email protected]
    To
    Peter Haggar/Raleigh/IBM@IBMUS
    cc
    Subject
    Re: [Fwd: Double Factory replacement for Double Check #2]
    Hi Peter,
    I apologies for not understanding but I don't see what is
    different
    between the solution you purposed...
    2) Don't use DCL but use synchronization
    and the code that I am putting forward. Perhaps I do just notunderstand
    but you seem to be contradicting yourself in this email?
    I understand that you are saying in #2 that this will always 'work'
    with
    out any issues...
    public static Object instance = null;
    public static synchronized Object getInstance() {
    if (instance == null) {
    instance = new Object();
    return instance;
    But first you seem to say in the email that if T1 gets
    interrupted
    it
    may leave the instance pointing to a partially initialized object?
    So as far as I understand it the createInstance method in my
    CreationFactory class should be successful (always retuning a
    fully initialized object) for the same reason #2 is successful.
    Please keep in mind that there are two different instancepointers
    in
    the code I sent you, one is part of the DoubleFactory class and
    the other is part of the CreationFactory class.
    >>>>>>>
    Thanks for your time, just looking for better solutions!
    Scott
    Scott,
    Your solution is not guaranteed to work for various reasons
    outlined
    in
    the article. For example, you can still return from your code apartially
    initialized object. This can occur if T1 gets interrupted beforeleaving
    the synchronized method createInstance() and T2 calls
    getInstance().
    T2
    can "see" toRet/instance as non-null but partially initialized
    since
    T1
    has not fully flushed its values.
    As of 1.5, Sun fixed various issues with the memory model that
    were
    broken. Double Checked Locking will still break unless you usevolatile
    (which was fixed in 1.5). Therefore, the following code works:
    volatile Helper helper;
    Helper getHelper() {
    if (helper == null)
    synchronized(this) {
    if (helper == null)
    helper = new Helper();
    return helper;
    but the original DCL idiom will not work. So, your options are:
    1) Use DCL with volatile (above)
    2) Don't use DCL but use synchronization
    3) Don't use DCL, but use a static field.
    #2 and #3 are outlined in my article from 2002.
    Hope this helps,
    Peter
    "Scott Morgan" <[email protected]>
    12/26/2007 04:12 PM
    Please respond to
    [email protected]
    To
    Peter Haggar/Raleigh/IBM@IBMUS
    cc
    Subject
    [Fwd: Double Factory replacement for Double Check #2]
    Hi Peter,
    Thanks for the article on the out of order write problem. Whatdo
    you
    think of this as a solution?
    TIA,
    Scott
    ---------------------------- Original Message----------------------------
    Subject: Double Factory replacement for Double Check #2
    From: "Scott Morgan" <[email protected]>
    Date: Wed, December 26, 2007 2:55 pm
    To: [email protected]
    Hi Ward,
    Here is a pattern submission
    Double Factory
    Lazy initialization of singletons in accepted for a while usingthe
    double check pattern. However it has been discovered that the
    double
    check pattern isn't thread safe because of the out of order write
    problem. This problem occurs when Threads entering the Singleton
    Factory method return with a fully constructed, but partially
    initialized, Singleton object.
    >>>>>>>>
    Therefore: It makes sense to look for a way to initializeSingletons
    in
    a Lazy and Thread Safe manor. The following illustrates a fairly
    simple
    solution...
    package foo;
    public class DoubleFactory {
    private static Object instance = null;
    public static Object getInstance() {
    Object toRet = instance;
    if (toRet == null) {
    instance =
    CreationFactory.createInstance();
    toRet = instance;
    return toRet;
    private DoubleFactory() {}
    public class CreationFactory {
    private static Object instance = null;
    public static synchronized ObjectcreateInstance()
    if (instance == null) {
    instance = new Object();
    return instance;
    This gets around the out of order write problem because all
    Threads
    waiting on the CreationFactory's Class monitor will have a fully
    constructed and initialized instance when they actually exit the
    createInstance method.
    >>>>>>>>
    >>>>>>>>
    During runtime while the Singleton instance is getting created(constructed and initialized) there may be a few Threads waiting
    on
    the
    CreationFactory Class's objects monitor. After that period all
    the
    Treads
    accessing
    the Singleton will have unsynchronized reads to the instance,
    which
    will
    optimize execution.
    References:
    http://www.ibm.com/developerworks/java/library/j-dcl.html
    Copyright 2007 Adligo Inc.

    Scott-Morgan wrote:
    Hi All,
    Thanks for your comments, here are some more....
    jtahlborn you state that
    the only way to guarantee that a (non-final) reference assignment is visible across threads is through the use of volatile and synchronized,
    From the jvm spec
    http://java.sun.com/docs/books/jls/third_edition/html/memory.html
    17.4.1 Shared Variables
    Memory that can be shared between threads is called shared memory or heap memory.
    All instance fields, static fields and array elements are stored in heap memory.
    Since both the second_reference and instance fields are both static, they are shared and visible across all threads.Yes, all these things are shared across threads, however, if you keep reading, there is a notion of "correct" sharing. obviously these values may be visible, that's why double-checked locking was used for so long before people realized it was broken. it worked most of the time, except when it didn't, and that's what i'm trying to show. that the only way to correctly share state between threads is via synchronization points, the most common being volatile and synchronized (there are a couple of other less used ones which don't apply here). The articles you linked to below from ibm cover the "visibility" in great depth, this is exactly what i am referring to.
    You also state that volatile is a solution, but you seem to rebut your self in stating that the overhead for volatile is almost as great as synchronization.
    This article illustrates the solution, and also comments on the overhead of volatile.
    http://www.ibm.com/developerworks/library/j-jtp03304/
    linked from
    http://www.ibm.com/developerworks/java/library/j-dcl.html
    volatile is a solution, in that it is correct, and you avoid the appearance of synchronization each time. however, since the semantics of volatile were strengthened in the new memory model, using volatile will perform practically (if not exactly) the same as simply synchronizing each time. the article you link to says exactly this under the heading "Does this fix the double-checked locking problem?".
    Also could you be more specific about the example at the end of the jvm memory spec page, like a section number?It's the very last thing on the page, the "discussion" under 17.9, where it mentions that changes to "this.done" made by other threads may never be visible to the current thread.

  • IWeb - looking for replacements for 'blog' & 'photos'

    With a deep Sigh..., I am finally facing up to the fact that I must move my iWeb Websites to another hosting sight and deal with the loss of the intergrated blog & photo pages that come with iWeb.  I kept hoping for a miracle but now I must get on with it.  I would be grateful for advice from those who have dealt with this issue already. 
    My biggest concern is finding suitable replacements for the blog and photo galleries that can be embedded into iWeb having a matching 'look and feel'.
    I have developed many robust (well of 50) websites with iWeb and they are active websites.   The websites have:
    Custom layouts (i.e. not using the suppled defalut template)
    Blog pages (used as 'News' entries)
    Photo pages
    iMovie
    HTML Snipits
    Many have been designed for use with charity events and recieve quite a bit of traffic (see stats below) before and during the event.
    As for the hosting - we will use GoDaddy or other Domain Provide with Hosting services.   We have already moved some of the more less complicated websites over. 
    I love iWeb (I know it has it's faults and I have probably pushed it to it's limits but it has handled it well).  I have tried looking at other products like Rapidweaver & Freeway Pro (Dreamweaver would be out of the question for me as I'm not a programmer - I can deal with some basic html code for snippets and such - but that's my limit).  My partner has begun looking at Wordpress.  However, the biggest drawback from what I've seen from these other products is that I can't duplicate the freedom and ease of designing a template/layout the way I want it.  I have tried to duplicate a website I have done in iWeb and I simply can't do it with these other products (at least without a great deal of work - if at all).
    So, I wish to continue using iWeb for the main website desgin but desparately need to find good replacements for the blog and photo galleries to move over my existing websites.
    Please HELP!  
    This is my 1st time up on the forums so I do apologise if this has been dealt with before.  In my searches - I just haven't really found an answer which is why I'm submitting this question.
    Many thanks, MichelleSC
    P.S. I have been an Apple user since Apple began and have always raved about their products.   This is the 1st time I have been frustration with Apple.  I really wish they would continue to develop iWeb and keep Mobileme.

    Do you have visitors post comments to your blog or it is one the only includes your entries?  If it's the atter then you can continue to use the iWeb blog. If you currently have visitors comment on the entires you will have to move to a new blogging system, one of those suggested by Ethmoid and Jeff.
    As for photo albums I've just run across a new site called ZangZig which offers albums similar to MobileMe galleries with most of it's features plus one that MMe didn't have.  The capability of selling your photos. 
    One convenient feature of it is that it can move/copy photos from your existing MMe galleries as well as your iPhoto library and other sources:
    As for for iWeb can do after MMe is gone read the following:
    On June 30, 2012 MobileMe will be shutdown. HOWEVER, iWeb will still continue to work but without the following:
    Features No Longer Available Once MobileMe is Discontinued:
    ◼ Password protection
    ◼ Blog and photo comments
    ◼ Blog search
    ◼ Hit counter
    ◼ MobileMe Gallery
    Currently if the site is published directly from iWeb to the 3rd party server the RSS feed and slideshow subscription features will work. However, if the site is first published to a folder on the hard drive and then uploaded to the sever with a 3rd party FTP client those two features will be broken.
    All of these features can be replaced with 3rd party options.
    There's another problem and that's with iWeb's popup slideshows.  Once the MMe servers are no longer online the popup slideshow buttons will not display their images.
    Click to view full size
    However, Roddy McKay and I have figured out a way to modify existing sites with those slideshows and iWeb itself so that those images will display as expected once MobileMe servers are gone.  How to is described in this tutorial: iW14 - Modify iWeb So Popup Slideshows Will Work After MobileMe is Discontinued.  There's a link in the tutorial to download the file that one needs to be edited and replaced in existing slideshows and in the iWeb application for future slideshows. Once replaced in the application it's back to life as usual for iWeb.
    OT

  • Word Replacements for Non- English Characters

    Hi
    Does anyone have an idea on implementing Word Replacements for non- english characters in TCA- DQM 11i.
    We are trying to identify, capture and cleanse common accented characters like à, â , ê
    However, the default language for replacement is American English , So even if we add these in the existing lists it will not take any effect
    Is creating a new Word replacement list for every language the solution ?? any patch recommendations???
    Thanks in advance

    It seems that this is an issue that has popped up in various forums before, here's one example from last year:
    http://forum.java.sun.com/thread.jspa?forumID=16&threadID=490722
    This entry has some suggestions for handling mnemonics in resource bundles, and they would take care of translated mnemonics - as long as the translated values are restricted to the values contained in the VK_XXX keycodes.
    And since those values are basically the English (ASCII) character set + a bunch of function keys, it doesn't solve the original problem - how to specify mnemonics that are not part of the English character set. The more I look at this I don't really understand the reason for making setMnemonic (char mnemonic) obsolete and making setMnemonic (int mnemonic) the default. If anything this has made the method more difficult to use.
    I also don't understand the statement in the API about setMnemonic (char mnemonic):
    "This method is only designed to handle character values which fall between 'a' and 'z' or 'A' and 'Z'."
    If the type is "char", why would the character values be restricted to values between 'a' and 'z' or 'A' and 'Z'? I understand the need for the value to be restricted to one keystroke (eliminating the possibility of using ideographic characters), but why make it impossible to use all the Latin-1 and Latin-2 characters, for instance? (and is that in fact the case?) It is established practice on other platforms to be able to use characters such as '�', '�' and '�', for instance.
    And if changes were made, why not enable the simple way of specifying a mnemonic that other platforms have implemented, by adding an '&' in front of the character?
    Sorry if this disintegrated into a rant - didn't mean to... :-) I'm sure there must be good reasons for the changes, would love to understand them.

  • Iphone 4s front glass screen smashed. Will apple replace for free if I have Apple Care?

    Iphone 4s front glass screen smashed. Will apple replace for free if I have Apple Care? Can I do it in any Apple Store? I bought it in EEUU

    Sorry no
    the iPhone can not be serviced anywhere other than the US
    The warranty is NOT international it is only valid in the country of purchase
    AppleCare + as explained is also NOT international it is only
    valid in the US
    This is why all responders recommend against buying in USA
    you are resident in another country
    Just for reference an iPhone purchased within the European Union
    can be serviced under warranty in any member EU state
    However that does not help you

  • Replacement for FUNCTION 'DYNP_VALUES_UPDATE'in ecc 6.0

    Hi all!
    Can any one please tel me the replacement for FUNCTION 'DYNP_VALUES_UPDATE'which is oboselete in ecc 6.0. I need the revised function module for this in ecc 6.0.

    Where do you have the information from that this function module is obsolete in ECC6. Neither the shortext nor any comments in the code nor the function module documentation states that this is obsolete (which is usually does if it is).
    The only thing that the function module documentation says is that the solution was revised as well as the docu, therefore I can't see why this function module would be obsolete.
    Hope that helps,
    Michael

  • Tuning PL/SQL - tkprof shows much more work for RECURSIVE STATEMENTS

    Hi,
    Firstly I'm not sure if this should be in "Database - General" or "SQL and PL/SQL". Since it's more of a performance tuning question than specifically about the PL/SQL, I'm going to put it here in "Database - General". I hope that doesn't offend anyone.
    I've just started looking at a reported performance problem in our app. One of the developers set me up a procedure that replicates the issue, I ran it while tracing the session and then fed the trace file to tkprof. The results at the bottom of my tkprof output file look like this:
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        3      0.01       0.07         10         60          0           0
    Execute      3      0.01       0.01          0          3          0           3
    Fetch        0      0.00       0.00          0          0          0           0
    total        6      0.03       0.08         10         63          0           3
    Misses in library cache during parse: 1
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       5        0.00          0.00
      SQL*Net message from client                     4        1.68          1.70
      db file sequential read                        18        0.01          0.10
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      416      0.00       0.01          0          0          2           0
    Execute   1456      0.71       0.75         26       1739        425         590
    Fetch     2932      0.12       2.21        337       6338          0        3061
    total     4804      0.84       2.98        363       8077        427        3651
    Misses in library cache during parse: 25
    Misses in library cache during execute: 24
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                       343        0.08          2.09
      db file scattered read                          1        0.00          0.00
       47  user  SQL statements in session.
      888  internal SQL statements in session.
      935  SQL statements in session.
       31  statements EXPLAINed in this session.I'm looking in particular at that relatively high activity for RECURSIVE STATEMENTS, because to me, the NON-RECURSIVE (ie the actual submitted statements that form our code) looks pretty harmless. This is my first experience of trying to tune some complex looking PL/SQL and I've no idea what could be considered more "normal", but from what I think I know, and google searches, the results look quite odd to me.
    Is this high activity for RECURSIVE STATEMENTS a problem, and if so, what should I start looking at to reduce that activity?
    Regards,
    Ados

    If you have a PLSQL block or stored procedure running SQL statements, the SQL statements, too, will appear as RECURSIVE STATEMENTS in the trace file and tkprof.
    It is a misconception that RECURSIVE STATEMENTS are only SYS statements doing data dictionary lookups / updates.
    For example, I ran this :
    SQL> create or replace procedure test_procedure as
      2  begin
      3  insert into my_emp_table select * from my_emp_table;
      4  dbms_output.put_line('Rows Inserted :  ' || sql%rowcount);
      5  insert into my_emp_table select * from my_emp_table where emplid=1;
      6  dbms_output.put_line('Rows Inserted :  ' || sql%rowcount);
      7  end;
      8  /
    Procedure created.
    SQL> alter session set events '10046 trace name context forever, level 8';
    Session altered.
    SQL> execute test_procedure;
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL> select 'x' from dual;
    x
    SQL> exitThe tkprof shows ;
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        3      0.00       0.00          0          0          0           0
    Execute      3      0.00       0.00          0          0          1           1
    Fetch        2      0.00       0.00          0          0          0           1
    total        8      0.00       0.00          0          0          1           2
    Misses in library cache during parse: 2
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       5        0.00          0.00
      SQL*Net message from client                     5        5.31         11.97
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        4      0.00       0.00          0          2          0           0
    Execute      4      0.00       0.00          2         16          7           5
    Fetch        2      0.00       0.00          0         14          0           2
    total       10      0.01       0.01          2         32          7           7
    Misses in library cache during parse: 2
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                         2        0.00          0.00
        7  user  SQL statements in session.
        0  internal SQL statements in session.
        7  SQL statements in session.Which were the Non-Recursive statements ?
    BEGIN test_procedure; END;
    commit
    select 'x' from  dualWhich were the RECURSIVE statements (which you can identify by the keywords : (recursive depth) ?
    SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
      NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
      NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),:"SYS_B_0"),
      NVL(SUM(C2),:"SYS_B_1")
    FROM
    (SELECT /*+ NO_PARALLEL("MY_EMP_TABLE") FULL("MY_EMP_TABLE")
      NO_PARALLEL_INDEX("MY_EMP_TABLE") */ :"SYS_B_2" AS C1, :"SYS_B_3" AS C2
      FROM "MY_EMP_TABLE" "MY_EMP_TABLE") SAMPLESUB
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          7          0           1
    total        3      0.00       0.00          0          7          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 64     (recursive depth: 2)
    INSERT INTO MY_EMP_TABLE SELECT * FROM MY_EMP_TABLE
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          1          0           0
    Execute      1      0.00       0.00          2          8          4           3
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          2          9          4           3
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 64     (recursive depth: 1)
    SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
      NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
      NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),:"SYS_B_0"),
      NVL(SUM(C2),:"SYS_B_1")
    FROM
    (SELECT /*+ IGNORE_WHERE_CLAUSE NO_PARALLEL("MY_EMP_TABLE")
      FULL("MY_EMP_TABLE") NO_PARALLEL_INDEX("MY_EMP_TABLE") */ :"SYS_B_2" AS C1,
      CASE WHEN "MY_EMP_TABLE"."EMPLID"=:"SYS_B_3" THEN :"SYS_B_4" ELSE
      :"SYS_B_5" END AS C2 FROM "MY_EMP_TABLE" "MY_EMP_TABLE") SAMPLESUB
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          7          0           1
    total        3      0.00       0.00          0          7          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 64     (recursive depth: 2)
    INSERT INTO MY_EMP_TABLE SELECT * FROM MY_EMP_TABLE WHERE EMPLID=1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          1          0           0
    Execute      1      0.00       0.00          0          8          3           2
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          9          3           2
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 64     (recursive depth: 1)The INSERT statments are recursive depth 1 while the SELECTS they cause are recursive depth 2.
    Note that neither of these are are actually SYS statements agaisnt the data dictionary !!
    Edit :
    IF you read the last few lines, it would become evident that some (in my case all) the RECURSIVE STATEMENTS are non-SYS statements, actually being my code, not Oracle's code.
           1  session in tracefile.
           7  user  SQL statements in trace file.
           0  internal SQL statements in trace file.
           7  SQL statements in trace file.
           7  unique SQL statements in trace file.
          87  lines in trace file.
           6  elapsed seconds in trace file.I have 3 non-recursive and 4 "RECURSIVE" statements. All 7 are correctly identified as "user SQL statements in trace file".
    Hemant K Chitale
    http://hemantoracledba.blogspot.com
    Edited by: Hemant K Chitale on Jul 29, 2009 11:44 PM
    Edited by: Hemant K Chitale on Jul 29, 2009 11:47 PM

  • Replacement for Underscore - Hexadecimal '1F' in Unicode System

    Hi gurus,
    Can anyone provide the replacement for hexadecimal value '1F' in a Unicode system? Is there any table available?
    Regards,
    Lijo Joseph

    Hai
    Check the following Statements
    data v_var1 type x value '1F'.
    data v_len(5) type n.
    constants:
    c_ecc6_tab(1) type c value cl_abap_char_utilities=>horizontal_tab.
    constants:
    c1(3) type c value 333.
    data: begin of itab occurs 0,
    line(20) type c,
    end of itab.
    data: begin of itab1 occurs 0,
    line1(20) type c,
    line2(20) type c,
    line3(20) type c,
    end of itab1.
    concatenate c1 c_ecc6_tab c1 c_ecc6_tab c1 c_ecc6_tab c1
    into itab-line.
    concatenate c1 v_var1 c1
    into itab-line.
    open dataset c1 for input in text mode encoding default.
    describe field c1 length v_len in character mode.
    do 5 times.
    append itab.
    enddo.
    data xtab1 like itab1.
    data v_newvar like itab1-line1.
    do 10 times.
    itab1-line1 = 'abc'.
    itab1-line2 = 'def'.
    itab1-line3 = 'ghi'.
    append itab1.
    clear itab1.
    enddo.
    v_tabix = sy-tabix.
    Thanks & regards
    Sreenivasulu P

  • Popup for entering Reason for Rejection

    Hi Experts,
    I have a workflow which has a user deciision step for approval and rejection.
    On rejecting i want a popup to appears where in user can select the reason for rejection and then exceute the workitem.
    I have tried using POPUP_GET_VALUES . I created a method in my BO and it works fine over there, but when i call it in the workflow i dont c any popup and the wokritem disappears.
    When i check the log, this step is still in READY state and thw rokflwo is hanging.
    Any other approach that any1 can suggest.
    Thanks.

    Hi Aarvi,
    I have similar requirement. Could you please provide some more info on the solution. I am using FM 'CATSXT_SIMPLE_TEXT_EDITOR' to get the popup. I have added this FM in a method and this method is attached to "Method AFTER Work Item Execution" section in Method tab in User decision task.
    Problem I have is, even if I approve or reject, popup still appears. But I need only the popup during rejection.

  • ITunes Connect: Can't get out of "Prepare For Submission" state

    My app is currently stuck in "Prepare For Submission" state.
    I click "Submit For Review", then answer the 3 questions, then click "Submit".
    Then it just spins for 5 minutes or so and reloads and I'm back where I started.  "Prepare For Submission" again.  I have already uploaded a binary and everything seems good to go.
    The previous version of my app was rejected, so I updated the version number and am attempting to resubmit a new binary on top of it.  Perhaps this is related to the issue?  I tried this in Chrome as well as Safari with the same result.
    Any help would be greatly appreciated.
    Thanks!

    Update:  I created a new build, bumped the version and tried again.  This time it worked.  Who knows...

Maybe you are looking for

  • Date format dd-MMM-yyyy

    Hi Friends, I would be getting the date format in yyyyMMdd and i have to display it in dd-MMM-yyyy. I could not see suck option in 'date trans' function. Could some one shed somelight on this.

  • Printing the same picture several time on the same paper

    I use to be able to print the same photo on 1 paper , often to create ID photos but i cannot succeed anymore with the latest version of my i photo !!!! any help is welcome

  • Wired guest config error: Learn Client IP Address

    Hi I get the following error message when I want enable a wired guest lan on WiSM2

  • Error rebulding Oracle Forms/Reports

    Hi ppl, I'm trying to rebuild oracle forms and reports but when i try the command make -f ins_forms.mk sharedlib install the output is this... make -f ins_forms.mk sharedlib install for libs in libfrmjsl.so.0 libd2f.so.0 libia.so.0 libic.so.0 libicg.

  • Modify "All My Files" in Lion

    Hi! In "All My Files" i can see only PDF, document, music and video... How can i set "all my files" to view also pictures and other type of file? Thanks