SE97 issue with ME22N calling itself

Hi all,
we have created a transaction variant (ZME22N) which calls ME22N. Our goal is just change one field on PO.
As yet indicated in other posts in the forum, transaction variants have some truobles with ENJOY tcodes.
We are in a loop: ZME22N calls ME22N and it seems that, during the navigation, ME22N calls itself again.
I have debugged and found that in code CL_PO_HEADER_HANDLE_MM========CP there is:
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
Looking at the variables with the debugger, it's clear that the calling transaction is the same as the called one (in both case is ME22N).
Parameter auth/check/calltransaction is equal 2.
This means:
tcode = sy-tcode           | auth/check/calltransaction, default = 2
                           |       0       1       2       3
tcdcouples-okflag = X      |       n       j       j       j
tcdcouples-okflag = N      |       n       j       n       n
tcdcouples-okflag = ' '    |       n       j       n       n
kein Satz in tcdcouples    |       n       j       n       n
Looking into table TCDCOUPLES (with SE16) we have the couple ME22N - ME22N with X flag.
The solutions seems to be easy: just set as N the couple ME22N - ME22N in tcdcouples.
Even if the record for couple ME22N-ME22N in table TCDCOUPLES exists (looking with SE16), we are not able to maintain it with SE97 since the record is not displayed at all.
In a SAP IDES system, we have done a "trick" in order to set as N the couple ME22N-ME22N and all is working as expected: the transaction variant works perfectly.
Now, is there a good reason  for not forcing the flag as N for couple ME22N-ME22N ?
Why SE97 does not show the record when called and calling tcode are the same ?
Andrea
Edited by: Andrea Cavalleri on Jan 14, 2011 6:47 PM
Edited by: Julius Bussche on Jan 14, 2011 6:51 PM
Subject title made more meaningfull

On the right track, but wrong conclusion..
Take a look here --> Authorization missing for tcode ME22N.
Enjoy transactions are different. The transaction is not of much importance, but rather the application objects should be used consistently.
The SE97 mechanism was invented for the application coding to be able to react faster to a "call transaction" scenario than what the kernel functions can (e.g. via the ok-code field) but the check must be at the correct location on the application code - ideally the initialization events.
ME22N does "trust" some transactions (such as ME23N...) but if the tcode called = the current tcode, then it checks it again in the kernel. This special case is described in some SAP Notes (358122 and 1373111 and a few others about "Enjoy" transactions).
That SAP populated TCDCOUPLES for values which the function module reacted to anyway was not necessary (hence removed so that the kernel did not check them either at the time). Later, information type messages were corrected as well so that you could not just hit "Enter".
Conclusion: You cannot use variant transactions to obfuscate security for Enjoy transactions without disclosing that the user must have had some authoritity to get in there in the first place...
Here is a code snippet if you want to protect applications via a transaction authorization, regardless of how the user gets into running any of the code.
* User is calling from the outside...
  IF sy-tcode NE 'ZXITING_TOOLS'.
    CLEAR: sy-msgid, sy-msgty, sy-msgno,
           sy-msgv1, sy-msgv2, sy-msgv3, sy-msgv4.
    CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
      EXPORTING
        tcode  = 'ZXITING_TOOLS'
      EXCEPTIONS
        ok     = 0
        not_ok = 1
        OTHERS = 2.
    IF sy-subrc 0.
      IF sy-msgid IS INITIAL OR sy-msgty IS INITIAL.
* External caller --> tell them to bugger off ... :-)
        MESSAGE i172(00) DISPLAY LIKE 'I' WITH 'ZXITING_TOOLS'.
      ELSE.
* They are on the inside, but should not be... so bugger off against all messages as well.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
           DISPLAY LIKE sy-msgty
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LEAVE PROGRAM.
    ENDIF.
  ENDIF.
* Upfront authority-checks for the subsequent BAPI's, otherwise there is no sense in continuing further..
Cheers,
Julius

Similar Messages

  • How to I contact Apple about a support issue with Game Center--itself, directly. I changed my Apple ID and now I cannot access my game center account that I had previously. It created a new one for me with my new apple ID instead of keeping the old one.

    I want to submit an issue with Game Center--itself, directly. I had an account set up that I used to play online games. I changed my appleID and then I no longer could access my game center account. I, apparently, had a new game center account created for me (which is friends with my old account) and now I cannot access my original game center account.
    If I can't get access to email apple directly (which seems ridiculously difficult to do), then someone please tell me how to FIX the issue.
    Thank you

    Yes. I have tried that. When I use the ID I had before, it sets it up as a new account and I don't want to lose my stats attached to my old account.
    Let's say that my old nickname was "user10" and I used the email, "[email protected]" for my apple id. I changed my apple id to "[email protected]" and it changed my game center account to "mynew" and somehow I am friends with my old acct, "user10". I tried getting a password reset for "user10" but I apparently don't know my own birthday, which is possible because I usually give a false one, but the same false one each time.

  • Having issues with phone calls on my new phone.

    Having issues with phone calls on my new phone. Other user is hearing echoes or nothing at all. This seems to be a common issue on here. VERY annoying! Anything seem to fix this problem?

    I had similar issues - Turns out it was a hardware problem or bad antennae - Call the tech support number and they can do some testing to determine the issue.  They might be able to give you a replacement if you do it quickly.

  • Issue with transferring calls to VM for the correct DN Unity Connection 9.1.2

    Hi all
    I have been facing an issue with a Unity Connection Server v9.1.2. Every time an internal extension (assigned to VM profile and to Unity as a user) which is configured to be transferred to VM after 20 sec or so NoAN,is called , Unity treats the call as the extension of the calling party and not the called party. Furthermore , I dont know if this has any relation with the problem I am facing but when I check the voicemail port status in RTMT its seems like that regardless it is a direct call to the Unity from an extension (dial the pilot number or press the messages button on the IP phone) or a redirected call from an extension to Unity due to NoAN configuration, the Reason is Direct and the caller party number is always the extension initiated the call and not the one redirected to the Unity (second case).
    I have changed the Use Last (Rather than First) Redirecting Number for Routing Incoming Call  Unity parameter in the
    System Settings > Advanced >Conversations -> checked   and
    Redirecting Diversion Header Delivery - Outbound CUCM parameter ->checked
    in the SIP Trunk configuration used for the integraton of the CUCM with Unity but none of those seem to address this issue. Is there any guidelines you can give me to overcome this issue?
    The servers I am using are
    CUCM v9.1.2 BE
    CUC    v9.1.2 BE
    Thank You in Advance

    Hello again,
    The Voice Mail Box Mask was blank before. However I tried XXXX (I use 4-digit extension for the VM pilot) but this did not seem to fix anything to the system....Same situation as before. Any more suggestions?
    Thank you

  • Issue With Receiving Calls. PLEASE HELP!!!!

    For the past couple of months both lines on my account have been experiencing issues. Randomly, when someone attempts to call one of the 2 lines (me or my wife), they receive the "Thank you for calling Verizon Wireless. The number you have reached has been changed, disconnected, or no longer in service." They then have to call back (sometimes multiple times before they can get through). I experience it when I call from my mobile to my wife's phone as well. It is become quite a pain and VZW has been NO help at all!!! They claim I am in a marginal service area. There are multiple problems with that statement.
    1. I am in a great service area and I always have full service.
    2. The problem does not always occur in my home service area!!!
    The rep then changed her mind and said it must be equipment, however my wife has been through 3 different phones within the past couple of months.
    She then recommended I changed carriers!!!!! This really upset me as I have Verizon service for everything (VZW and FiOS).
    Can someone please recommend any kind of solution????

    jnd1020 wrote:
    For the past couple of months both lines on my account have been experiencing issues. Randomly, when someone attempts to call one of the 2 lines (me or my wife), they receive the "Thank you for calling Verizon Wireless. The number you have reached has been changed, disconnected, or no longer in service." They then have to call back (sometimes multiple times before they can get through). I experience it when I call from my mobile to my wife's phone as well. It is become quite a pain and VZW has been NO help at all!!! They claim I am in a marginal service area. There are multiple problems with that statement.
    1. I am in a great service area and I always have full service.
    2. The problem does not always occur in my home service area!!!
    The rep then changed her mind and said it must be equipment, however my wife has been through 3 different phones within the past couple of months.
    She then recommended I changed carriers!!!!! This really upset me as I have Verizon service for everything (VZW and FiOS).
    Can someone please recommend any kind of solution????
    First, you really should consider calling another representative and report your disatisfaction with that prior rep. Advising you to switch carriers was in poor taste. They are trained quite thoroughly to assist customers to the fullest and not advise leaving VZW. Secondly, if the issue has transcended the device in that it has happened through multiple esn changes (your wife has been through 3, you wrote), then it obviously is not the device. Next, if you are experiencing intermittent issues with this in an area that otherwise works fine, it probably has nothing to do with the service coverage; if the coverage was a problem, you either would be unable to make a call at all, would have multiple dropped calls, or would experience an increasingly degraded call quality. This tells me that it has to do with the phone's connection to the network, which an over-the-air program attempt might resolve (*228, option number 1 - you could even possibly get away with option number 2) like the prior individual explained above. The likelihood is that you are going to need to file a trouble ticket with your lines, which can only be done through technical support after going through the initial level of troubleshooting through customer care. You really should call them again, with this knowledge backing you up.

  • Issue with using call transaction CJ9F and F.M  BAPI_PROJECT_MAINTAIN

    Hello All,
    In my custom program for a given project in selection screen we are getting all the related data as shown in CJ20N, in this screen I first created the WBS element and during save we used F.M BAPI_PROJECT_MAINTAIN to update the data, and next called transaction CJ9F to update BLC, after this we are comming back to selection screen 1000.
    Now from selection screen if i enter again into that project details screen and try to create a new WBS it is showing below information msg.
    Changing the contents of the field is not permitted
    Message no. CJ727
    If i remove the call transaction CJ9F part during save i am not getting the above error msg.
    I think i am getting this error when we call the function module BAPI_PROJECT_MAINTAIN twice in the program.
    Please help me to resolve this issue, as this msg is not allowing to save or create anything. 
    But i found that if i come totally out of my custom transaction and enter once again into that Z transaction it is working fine with out that message
    Please help me to resolve this issue.

    Hi,
    Not sure, but if it is possible, complete your project update using the custom transaction and do the CJ9F afterwards seperately.
    Regards
    Sreekanth

  • E3000 issue with VOIP caller ID

    Hi,
    I have a E3000 with newest firmware that has a VOIP by Velcom. It's a Grand stream HT–286.
    My device is working perfectly with the router. Can call and recieve calls. the caller ID (Name and number that appears is accurate). The only problem is the caller ID's time and date are always wrong.
    When I unplug device, it goes back to Jan 1 and time 12:00am.
    Any call I then get is wrong.
    In the router, I've enabled SIP ALG. And the firewall is only filtering ident (port 113) and Anonymous Internet requests.
    The device has a hard coded internal IP (192.168.123.110). and I reserve the IP using mac filtering.
    The device has an administration page that is unavailable to users as it's locked by a password. On this page has an NTP server setting that the de vice uses to get it's time/date.I see on the information page of the device that iot's registered to a sip server.
    The company is saying that it's a firewall issue. I'm not too sure how to proceed. I've searched the forums and haven't found anyone with this specific issue.
    Anyone has had this problem before can could point me in the right direction?
    Thank you.
    Solved!
    Go to Solution.

    It's difficult to tell without knowing the configuration. But from what you write your voip device doesn't know the correct time. Thus, either it is supposed to use NTP but the NTP server isn't reachable or it is not even using NTP and the time is supposed to be set manually in the device. Maybe it's the latter and it has "lost" its time because of low running buffer battery in the device which keeps the clock going while switched off...
    Whatever it is, so far is sounds to me like a problem with the device. Only if the router blocked access to that NTP server it would have been caused by the router. But I kind of doubt that...

  • 1.3.5.1 Updated, and Now Issue With Incoming Calls

    Since updating to 1.3.5.1, any time I mute the ringer on an incoming call, it mutes the ringer until right before the missed call notification, but then plays the ringer again briefly.  This defeats the purpose of being able to mute the ringer in the first place.
    Post relates to: Pre p100eww (Sprint)

    This occurrs any time I press the volume rocker key to mute the ring of an incoming call.  After the initial time when it played an extremely brief snippet of my ringtone (factory installed "Older Phone" ringtone), it has randomly switched between the short ringtone and a electronic squeal noise.
    Since I know the slightest software change can kill a seemingly unrelated feature, I'll try to be as detailed as possible.  For my phone setup, it is completely stock (phone no.5 after misc. slider/screen/charger door issues, haven't had time to change anything yet) My ringtone volume is set to maximum with vibrate also on, system sounds are also set to maximum with the default tone. I have no non-app catalog programs or patches installed.  I use a Touchstone back cover, although the phone was not on the charger when I noticed the issue.  
    The only downloaded apps on the phone are Pandora, Tip 'em!, Stop Watch, Fandango, Good Food, Mileage Monitor and gDial Pro (which has not been set up yet).  With the exception of Pandora, none of these apps have been used since I received this replacement phone.  They were all just automatically downloaded because my previous phone had them.  I have e-mail accounts through Cox, Yahoo, and Gmail, none of which are synced to contacts, calendars, messaging or tasks.  I do have my Palm profile and EAS through my work in a full sync capacity.
    Hope this helps. 
    Message Edited by kx250ryder on 01-07-2010 07:29 AM
    Message Edited by kx250ryder on 01-07-2010 07:30 AM

  • Facing issue with tRFC (CALL FUNCTION in BACKGROUND TASK DESTINATION

    In transcation CJ20N there is aBADI call ZCL_IM_CL_IM_PROJ_UPDATE in which there is a method
    IF_EX_PROJECTDEF_UPDATE~AT_SAVE.  My requirement is that when the status of the project is changed and saved then after the SAVE some actions are to be performed (BDC for transcation CJ30 & CJ9FS are to be called).
    Since this method is called AT SAVE and i need to call the bdc after the comit (of SAVE) is done. So I have made a RFC FM in which I am calling the bdc. and then calling the FM as
    CALL FUNCTION <FM> in BACKGROUND TASK DESTINATION <sy-sysid>.
    For the txn. CJ9FS bdc this method is working fine and bdc is called after SAVE but for txn. CJ30, at times,the bdc  is not working though if I run the BDC FM seperately using SE37 then its working fine.
    Can any body guide me where I am going wrong.

    The scenario works fine for me. The issue was unable to create a proper test condition in the RFC.
    CALL FUNCTION 'ZMY_RFCASYNC'
       IN BACKGROUND TASK
       EXPORTING...
       TABLES...
       EXCEPTIONS...
    Simulated error condition in 'ZMY_RFCASYNC'
    and got entry in SM58 by simply making an exception. 
    Thank you all.

  • Issue with Video Calling

    I recently bought a Kindle Fire HD and I downloaded Skype. My boyfriend also has Skype for his Samsung Galaxy Note. Whenever we try to use video calling the audio works fine but we can only see a black screen, unable to see each other and cant even see ourselves on the screen. Has anyone experienced this before? And what did they do to fix it? 

    its seems that thusand of well informed well knonw I-T specialist have not a answer of some simple questions....
    what a joke... skype have huge platform but not single specialist to answer me ..

  • Adobe Camera Raw 8.6 issue with Nikon D810 files

    Just installed ACR 8.6 with D810 support.
    A huge amount of moire is introduced when selecting the following profiles: camera standard, camera landscape, camera vivid, and camera monochrome.
    All other profiles (adobe standard, camera neutral, camera flat, and camera portrait) seem ok.
    The problem exists in Photoshop (via ACR) and in Lightroom 5.6. Please note that Nikon Capture NX-D doesn't have this issue.
    Example: Check the upper portion of the following image:

    I have experienced the same, although having never owned a camera without the olpf, I did not realize that what I was seeing was moire -- I was calling it "color banding" as if shooting with a low bit rate or very small color gamut.
    I think the same issue is referred to in the following post: http://www.dslrbodies.com/accessories/software-for-nikon-dslrs/software-news/acr-86-and-li ghtroom-56.html but he is vague as to just what the "issue" is.
    I noticed this issue not only with acr, but on the back of the lcd of the 810 itself.  Wondering if I was doing something wrong in terms of settings or if it was a bad copy of the d810, I contacted nikon support. They were not helpful and told me to return the unit for repair.   I saw this to a great degree on the lcd, to a small degree even in the raw images processed via Capture NX-D and to some extent via acr 8.6 as you say, when using he following profiles: camera standard, camera landscape, camera vivid, and camera monochrome.  Since I was not able to convince myself tat it was not an issue with the camera itself, I returned the d810, so I was not stuck with a problematic unit or having to wait for a repair.  Now of course I just have to wait for a replacement unit!!
    Again, I am curious as to the extent others are seeing this problem.  I am seeing nothing but superlatives posted by others.  I am hoping that this is some raw processing issue and a bad lcd screen on my original d810, but it seems too big of a coincidence.  If it is a matter of Adobe racing to keep up with the new profiles ok, but if this is the extent that I am going to see moire on a camera of this price then it is not worth the upgrade.
    What are others experiencing?

  • Notebook screen issues with green stains

    Hello:
    I currently own an
    HP G62-355DX Notebook PC
    [Personal Information Removed]
    P/N: XH068UA#ABA
    running Windows 7 64-bit
    All of sudden (not gradually) green "stains" appeared on my notebook's screen as 3 circles one around the other, sort of like a "bulls-eye" and when I try to run a program in full-screen mode the screen goes bezerk and nothing is readable. I thought it was an issue with the cable connecting the screen to the main-board but I've been told the issues would be different.
    These green "stains" or pixels affect any program running or the screen itself, even the Windows 7 starting screen and the HP logo when the notebook is turned on by making the letters on the bottom-left corner unreadable.
    After contacting HP at Peru, where I currently reside, I was told the model was not sold here and that I had to contact US support. They said that it could be an issue with the screen itself that could require maintenance at an HP office. And also told me that it was unlikely for remote support to be able to fix the issue.
    It is still not over a year before I got the notebook so I'm guessing the warranty is still available.
    Would I be required to e-mail the computer back to headquarters in hopes of it being repaired? Is it possible that it could be dealt with at your offices at Peru (I will still be residing here for quite some time).

    Better call the hp tech support at 1-800-474-6836. HTH
    Click the White Kudos Star to say Thanks
    Please mark Accept As Solution if it solves your problem

  • Laundry list of issues with my N9.

    I *love* my phone but there are many rough edges. I'm hoping I can fix a few here.
    Phone:
    1. Does not always wake on double-tap
    2. I both love and hate swype keyboard. I hate it because swiping from Q or P swipes out the keyboard. Can this be disabled?
    Feed screen:
    1. Weather on the feed screen always says "Vienna". I'm no where near any "vienna"
    2. Despite showing the right map, on two occasions I've had weather not show me the proper radar.
    3. I can't figure out how to retun to my feed screen after launching an item from it. I always have to start at the top?
    4. My feed screen only sometimes shows my calendar
    Dialer:
    1. has trouble matching phone numbers without the +1
    2. Why do I have to swipe up to answer o ignore a call, then choose to answer or ignore it? Can't we skip a step?
    3. Why are the buttons so small?
    Video:
    1. I can't play high def video from the Ovi store.
    Drive:
    1. Has no sound.
    Maps:
    1. Has no traffic overlay
    2. Cannot found local outbakc steak houses by searching on "outback" like in google.

    Scorp1us wrote:
    I *love* my phone but there are many rough edges. I'm hoping I can fix a few here.
    Phone:
    1. Does not always wake on double-tap
    SOMETIMES THIS HAPPENS TO ME TOO.  IT USALLY HAS TO DO WITH ME.  MY HANDS ARE COLD, I AM PARTIALLY COVERING THE SENSOR, I TAP TOO QUICKLY, ETC.  SEEMS THAT ONCE IT WAS TRIED, I TOOK A SPLIT SECOND AND HAS TO RESET,,,AND PATIENCE IS NOT MY MIDDLE NAME.
    2. I both love and hate swype keyboard. I hate it because swiping from Q or P swipes out the keyboard. Can this be disabled?
    NOT REALLY.  I WOULD LOOK AT WHERE EXACTLY YOU ARE ACTUAULLY STARTING YOUR TOUCH.  THERE USED TO BE A DIFFERENT BUG WHEN STARTING WITH THE P BUTTON, BUT THAT WAS FIXED.
    Feed screen:
    1. Weather on the feed screen always says "Vienna". I'm no where near any "vienna"
    DID YOU SET UP YOUR CITIES?  THE CITY YOU SELECT LAST SHOULD BVE TTHE CITY YOU SHOW ON THE FEED SCREEN.
     I HAVE HAD ISSUES WITH THIS RESETTING ITSELF SINCE I STARTED OVER-CLOCKING, WHERE IT DELETES ALL MY CITIES AND SOMETIMES WHEN I OPENS, IT STARTS LIKE THE FIRST TIME AND SHOWS HELSINKI
    2. Despite showing the right map, on two occasions I've had weather not show me the proper radar.
    YOURE ON YOUR OWN HERE.  I HAVENT NOTICED ANY ERRORS LIKE THIS
    3. I can't figure out how to retun to my feed screen after launching an item from it. I always have to start at the top?
    I THINK YOU ARE SAYING THAT IF HAVE SCROPLLEDD DOWN AND THEN TAPPED ON A TWEET, IT OPEN TWITTER APP TEN WHEN YOU GO BACK IT STARTS AT THE TOP OF YOUR FEED???  ARE THERE MORE NEW ITEMS WHEN IT GETS THERE, OR THE SAME.
    4. My feed screen only sometimes shows my calendar
    ARE YOU TALKING ABOUT THE TOP LEFT OR A CALENDAR APP THAT ALLOWS IT TO SHOW YOUR ITEMMS AS THE TOP OF THE FEED?
    IF SO, WHICH ONE ARE YOU USING?
    Dialer:
    1. has trouble matching phone numbers without the +1
    MINE SEEMS FINE SO LONG AS THEY ARE INMY CONTACTS WHEN I USES JUST 7-DIGIT NUMBERS IN USA. BUT, IT DOESNT DO THE MATCH UNTIL AFTER I HAVE TAPPED THE CALL BUTTON.
    2. Why do I have to swipe up to answer o ignore a call, then choose to answer or ignore it? Can't we skip a step?
    YES.  IF YOU JUST DONT WANT TO ANSWER, EITHER HOLD YOUR HAND OVER THE LIGHT SENSOR, OR FLIP YOUR DEVICE TO SCREEN-DOWN.  THIS WILL IGNORE THE CALL.  YOU WILL HAVE TO SWIPE TO ANSWER IT, OR YOU COULD USE EASY ANSWER
     AND IT WILL AUTO TAKE THE CALL USING A COMBONATION OF YOU COVERING THE SENSOR AND THE ACCELEROMETER.  I USE IT AND IT WORKS FINE.
    3. Why are the buttons so small?
    WHICH BUTTONS?  CALL/END?  I FIXED THAT IN MY THEMES.   I THOUGHT THEY WERE TOO SMALL TOO.
    Video:
    1. I can't play high def video from the Ovi store.
    SORRY, HAVENT TRIED.
    Drive:
    1. Has no sound.
    I KNOW IFT SOUNDS DUMB....BUT IS YOUR VOLUME DOWN?  IF NOT, THEN I WOULD CHECK TO BE SURE THAT YOU HAVE INSTALLED SOME AUDIO VOICES.  YOU HAVE TO OPEN MAPS, THEN MENU, THEN SETTINGS, VOICES...MAKE SURE THAT YOU HAVE SOME THERE, IF NOT, DOWNLOAD SOME.  THEN MAKE SURE YOU SELECT A VOICE TO BE USED.  I HAD THIS ISSUE A WHILE AGO AND THAT WAS WHAT IT WAS....USER ERROR ON MY PART.
    Maps:
    1. Has no traffic overlay
    HAVENT TRIED THIS MYSELF.  WILL HAVE TO LOOK AT IT LATER.
    2. Cannot found local outbakc steak houses by searching on "outback" like in google.
    NO IDEA, SORRY.

  • Performance issues with pipelined table functions

    I am testing pipelined table functions to be able to re-use the <font face="courier">base_query</font> function. Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? The <font face="courier">processor</font> function is from [url http://www.oracle-developer.net/display.php?id=429]improving performance with pipelined table functions .
    Edit: The underlying query returns 500,000 rows in about 3 minutes. So there are are no performance issues with the query itself.
    Many thanks in advance.
    CREATE OR REPLACE PACKAGE pipeline_example
    IS
       TYPE resultset_typ IS REF CURSOR;
       TYPE row_typ IS RECORD (colC VARCHAR2(200), colD VARCHAR2(200), colE VARCHAR2(200));
       TYPE table_typ IS TABLE OF row_typ;
       FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
          RETURN resultset_typ;
       c_default_limit   CONSTANT PLS_INTEGER := 100;  
       FUNCTION processor (
          p_source_data   IN resultset_typ,
          p_limit_size    IN PLS_INTEGER DEFAULT c_default_limit)
          RETURN table_typ
          PIPELINED
          PARALLEL_ENABLE(PARTITION p_source_data BY ANY);
       PROCEDURE with_pipeline (argA          IN     VARCHAR2,
                                argB          IN     VARCHAR2,
                                o_resultset      OUT resultset_typ);
       PROCEDURE no_pipeline (argA          IN     VARCHAR2,
                              argB          IN     VARCHAR2,
                              o_resultset      OUT resultset_typ);
    END pipeline_example;
    CREATE OR REPLACE PACKAGE BODY pipeline_example
    IS
       FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
          RETURN resultset_typ
       IS
          o_resultset   resultset_typ;
       BEGIN
          OPEN o_resultset FOR
             SELECT colC, colD, colE
               FROM some_table
              WHERE colA = ArgA AND colB = argB;
          RETURN o_resultset;
       END base_query;
       FUNCTION processor (
          p_source_data   IN resultset_typ,
          p_limit_size    IN PLS_INTEGER DEFAULT c_default_limit)
          RETURN table_typ
          PIPELINED
          PARALLEL_ENABLE(PARTITION p_source_data BY ANY)
       IS
          aa_source_data   table_typ;-- := table_typ ();
       BEGIN
          LOOP
             FETCH p_source_data
             BULK COLLECT INTO aa_source_data
             LIMIT p_limit_size;
             EXIT WHEN aa_source_data.COUNT = 0;
             /* Process the batch of (p_limit_size) records... */
             FOR i IN 1 .. aa_source_data.COUNT
             LOOP
                PIPE ROW (aa_source_data (i));
             END LOOP;
          END LOOP;
          CLOSE p_source_data;
          RETURN;
       END processor;
       PROCEDURE with_pipeline (argA          IN     VARCHAR2,
                                argB          IN     VARCHAR2,
                                o_resultset      OUT resultset_typ)
       IS
       BEGIN
          OPEN o_resultset FOR
               SELECT /*+ PARALLEL(t, 5) */ colC,
                      SUM (CASE WHEN colD > colE AND colE != '0' THEN colD / ColE END)de,
                      SUM (CASE WHEN colE > colD AND colD != '0' THEN colE / ColD END)ed,
                      SUM (CASE WHEN colD = colE AND colD != '0' THEN '1' END) de_one,
                      SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
                 FROM TABLE (processor (base_query (argA, argB),100)) t
             GROUP BY colC
             ORDER BY colC
       END with_pipeline;
       PROCEDURE no_pipeline (argA          IN     VARCHAR2,
                              argB          IN     VARCHAR2,
                              o_resultset      OUT resultset_typ)
       IS
       BEGIN
          OPEN o_resultset FOR
               SELECT colC,
                      SUM (CASE WHEN colD > colE AND colE  != '0' THEN colD / ColE END)de,
                      SUM (CASE WHEN colE > colD AND colD  != '0' THEN colE / ColD END)ed,
                      SUM (CASE WHEN colD = colE AND colD  != '0' THEN 1 END) de_one,
                      SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
                 FROM (SELECT colC, colD, colE
                         FROM some_table
                        WHERE colA = ArgA AND colB = argB)
             GROUP BY colC
             ORDER BY colC;
       END no_pipeline;
    END pipeline_example;
    ALTER PACKAGE pipeline_example COMPILE;Edited by: Earthlink on Nov 14, 2010 9:47 AM
    Edited by: Earthlink on Nov 14, 2010 11:31 AM
    Edited by: Earthlink on Nov 14, 2010 11:32 AM
    Edited by: Earthlink on Nov 20, 2010 12:04 PM
    Edited by: Earthlink on Nov 20, 2010 12:54 PM

    Earthlink wrote:
    Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? Well, we're missing a lot here.
    Like:
    - a database version
    - how did you test
    - what data do you have, how is it distributed, indexed
    and so on.
    If you want to find out what's going on then use a TRACE with wait events.
    All nessecary steps are explained in these threads:
    HOW TO: Post a SQL statement tuning request - template posting
    http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
    Another nice one is RUNSTATS:
    http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551378329289980701

  • Issue with windows movie maker

    Hi Team,
    I am a windows 7 enterprise user working with Dell. My OS is an OEM/corporate image and I am unable to install movie maker and get an error code 0x80070643. I have tried multiple times to install and been unsuccessful. Please help me as this important tool
    for my presentations @ work. My IT team confirmed that this is not an issue with the system itself and it is an issue with either the app or the config. 

    Any updates on this?
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

Maybe you are looking for

  • How to add some days to the current system date

    can anyone help how to add some days to the current date i.e if today is 3-12-2007 and if v add 15 more days then the output should be 18-12-2007

  • Webservice to JDBC BPM scenario

    Hi Experts, I have created the below objects for the Webservice to JDBC BPM scenario. Data Type 1. DT_SOAPRequest 2. DT_SOAPResponse 3. DT_JDBCRequest 4. DT_JDBCResponse MessageType 1. MT_SOAPRequest 2. MT_SOAPResponse 3. MT_JDBCRequest 4. MT_JDBCRes

  • Linked line charts

    I have another question, I hope this makes sense. I am making two line charts - one line in each chart. I plan to have in one fex file (is this then called a dashboard?). These charts will be side by side and both share the same XML file. 1. When the

  • RDS 2012 - Session Collection Timeout vs Group Policy Timeout

    Which policy applies? The RD Session Collection timeout or the group policy? My Remote desktop servers are in an OU at a top level with all of my other servers, so I have a administrative timeout group policy which is extremely strict to keep our adm

  • Is there any way to combine Google Calendar and iCal?

    Is there any way to combine Google Calendar and iCal?