Execute one cursor with and without different filter condition

I want to execute one cursor with and without different filter condition
example :-
if the account no is null;
     cursor cur is select * from account_master;
if account no is not null
     cursor cur is select * from account_master where account_no = p_acc_no;

Braam wrote:
I want to execute one cursor with and without different filter condition
example :-
if the account no is null;
     cursor cur is select * from account_master;
if account no is not null
     cursor cur is select * from account_master where account_no = p_acc_no;Use Refcursor:
DECLARE
  refCur     SYS_REFCURSOR;
BEGIN
  open refCur for 'select col1, col2 from your_table';
  loop
  --Your process logic here
  end loop;
  close refCur;
  open refCur for 'select col1, col2 from your_table where some_condition = is_satisfied';
  loop
  --Your Process logic here.
  end loop;
END;

Similar Messages

  • 2 same surrogate keys with different filter conditions in one report

    how do we put 2 same sr keys with different filter conditions in one single report??
    for example, we have to get the 'count' for tm_sr_key:
    1. count(tm_sr_key) where past_due_flag = Y
    2. count(tm_sr_key) where past_due_flag = Y and N
    to be displayed in one single report.
    it happens that both sr_keys will display the same measure (which is the 1st filter conditions)
    and the filter under criteria tab in anwer will show as :
    tm_sr_key where {filter condition 1}
    AND
    tm_sr_key where {filter condition 2}
    instead of :
    tm_sr_key where {filter condition 1} for 1st measure
    tm_sr_key where {filter condition 2} for 2nd measure
    d only option i could think right now is to duplicate the tm_sr_key data in the same table but with different name say, tm_sr_key_2..
    kindly pls help.
    thanx

    i'm sorry, not really understand.
    could you pls explain a bit more about the filter column? how do we do it? coz i'm really new in this tool.
    r u talking about editing the filter located under the column on the right side of the OBIEE answers?
    or is it by editing the 'edit column formula' for required column; that is by replacing the 'column formula' expression with this:
    FILTER(EXPS_FACT.FAC_SR_KEY USING EXPS_FACT.PAST_DUE_FLAG = 'Y') <----if it is like this, i tried it already & its giving me an error message..
    thanx.
    Edited by: rezza.nasha on May 28, 2009 1:26 AM

  • HT1918 is it possible to have two different password within one iTunes account?  one to log in with and a different one to use when making a purchase?

    Is is possible to have two different passwords within itunes? one to log in with and a different one to make purchases with?

    The system is not setup to provide that kind of sservice.  If making certain purchases it does ask for an answer to one of your security questions, so that provides a little more security for some purchases, just not all.

  • Bex Report with and without BIA . . Fails with a dump EXPORT_TOO_MUCH_DATA

    Hi Folks,
    We have a report thats has been running well in production for more about 18 months. This month it did not complete execution.
    We did implement BIA couple of 4 months back and the run times have drastically reduced after the BIA. Now this query execution results in a Dump with and without BIA.  FYI the underlying cube has 195,876,020 records only.
    Name of Runtime error: EXPORT_TOO_MUCH_DATA
    Short text:     Too much data for export.
    What happened?     Runtime error
        The current ABAP program "CL_RSR_CACHE_DO_SPID==========CP" had to be
         terminated because one     of the statements could not be executed at runtime.
    Error analysis: The dataset stored under an EXPORT/IMPORT ID is restricted
    by
    1. The maximum possible size of 2 GB
    2. The length of a data record and the capacity of the sequence counter. This error occurs only if the capacity of the
    sequence counter does not go beyond 255.
    Source Code Extract:
        1 METHOD if_rsr_cache_data_object~get_xstring.
        2
        3   FIELD-SYMBOLS:
        4     <l_xstring>            TYPE xstring,
        5     <l_sp>                 TYPE ANY,
        6     <l_spinfo>             TYPE ANY.
        7
        8   CREATE DATA r_r_xstring.
        9   ASSIGN r_r_xstring->* TO <l_xstring>.
       10   ASSIGN n_s_spid-r_sp->*     TO <l_sp>.
       11   ASSIGN n_s_spid-r_spinfo->* TO <l_spinfo>.
       12
       13 *... Sp has to be the first component
    >>>>>   EXPORT sp = <l_sp> spinfo = <l_spinfo>
       15          TO DATA BUFFER <l_xstring> COMPRESSION ON.
       16
       17 ENDMETHOD.
    Referred to the below note 0001232573
    which says to have 'RSRCACHE_ITAB_COMPR'  parameter using report SAP_RSADMIN_MAINTAIN
    Note say the below (It might be a little tricky, to find an appropriate value for 'RSRCACHE_ITAB_COMPR' as it heavily depends on the query-specific data structures that are stored in the cache. The general recommendation would be to start with a value of about 5000. Test this with a query, that dumped previously. In case the dump persists reoccurs, reduce the value of the parameter significantly. Otherwise, if no dump occurs but you face noticeably longer runtimes, increase the parameter.)
    We are trying not able to get to the right parameter value. (changed it from 5000, 4000, 3000, & 1000) without much  help.  Did any of you had to change this parameter. How low or High can this parameter be changed?
    We would like to understand if changing any other parameters would help in RSADMIN table would help?
    Any thoughts from the experts would be appreciated
    Thanks,
    FHF

    Hi,
    Are you running the report for all the selections(all the data )?
    execute the report with data selection and check?
    Is the data in the Ic - compressed?
    Regards
    KP

  • Difference between with table name with * and without *

    Hi..
    I had seen some of the standard abap that the table name had *, like *ekpo. What is the meaning? What is the difference between with * and without * ? 
    Thanks and Regards,
    Rishika

    Hi rishika,
    1. This is actually a facility provided in abap syntax.
    2. It is usually checked while saving a record.
    3. For eg.
    If we have one variable
    EKKO
    and another *EKKO
    (They both are same only, with same structure)
    (but two different variables)
    4. The functional meaning, for usage purpose,
    of *EKKO is OLDEKKO.
    5. While saving the transaction,
    the data is saved only if there is any change
    in the values.
    IF EKKO <> *EKKO.
    *--- SAVE
    ELSE.
    MESSAGE 'NO DATA CHANGED'
    ENDIF.
    6. We can aswell use any other variale
    eg. oldekko
    oekko
    myekko
    etc,
    7. But for business meaning,
    R/3 has the facility for *
    1. we can use almost everywhere.
    2. just copy paste
    report abc.
    TABLES : T001.
    TABLES : *T001.
    DATA : ITAB LIKE EKKO.
    DATA : *ITAB LIKE EKKO.
    DATA : NUM TYPE I.
    DATA : *NUM TYPE I.
    regards,
    amit m.

  • VA01: Creation of SD order with several material codes,with and without VAT

    hi guys,
    could someone tell me how to set up the system to not be able to create an SD orders with a mix of VAT condition?
    We don't want a sales order with an combination with and without VAT.
    Pls advise. Thanks.

    could someone tell me how to set up the system to not be able to create an SD orders with a mix of VAT condition?
    We don't want a sales order with an combination with and without VAT.
    H i
    1.The Vat ( Tax ) is applicable on basis of Customer and Mareial Tax classification.
    2. So as far as material is concerned , group all VAT applicable material in One Division
    Say in FMCG Company
    Divisions are Soaps , Skin Care , Shampoo etc
    Create Sub Divsions say for Eg Soaps-------Soaps 1( Taxable) & Soaps 2 .( Non Taxable ) and acordingly for other divisions
    And then Create Sales Areas accordingly.
    All this will need Reorganisation of your Sales Area
    Regards
    Rohit

  • Camera wont capture when Tethering Canon T5i in Lightroom 4.4. Tried with and without card.

    I just unboxed a Canon T5i (700D). I've been shooting with a T2i for the past three years tethered to LR4 with no problem. Now with the T5i, i connect the camera, set up a new tether session and LR detects the camera in the pop up bar, but the sections for Shutter Speed, Aperture, and ISO are blank. The capture button is able to be clicked, but the camera does not respond. When the shutter on the camera is pressed, also no response. I have tried this with and without the SD card. I have used three usb cable and two different computers. I have checked for updates and my firmware is current. The camera is set to manual mode in the on position NOT the video position and I am tethering to a Windows 7 computer. Please help!

    You will need LR5 for that camera to be supported for direct tethered capture.  Or you can use the LR "Watched Folder" feature and use the EOS Utility or other tethering software packages.  Here is a list of some options - http://www.tethertools.com/plugging-in/software/

  • Physical inventory with and without handling unit managment

    Hello all,
    I would like to know what is the difference between physical inventory with and without handling unit management.
    Pl. advise.
    Thanks,
    Maxx

    Assuming you are referring to WM inventory, it is very similar.  Inventory is conducted at the SU level in WM if you are HU managed.  One of the most widely known issues is the lack of ability to post differences of nested HUs at the WM level.  If you are not using nested HUs, the process is the same as storage unit management without handling unit management.

  • STO with and without delivery

    Hi All,
           sorry for troubling you all again. last question on STO.
    1) when STO is required to be with delivery only then only we use IMG > step up stock transport order> Assign Document Type, One-Step Procedure, Underdelivery Tolerance
    there is no need to assign document type in the step--> Assign Document Type, One-Step Procedure, Underdelivery Tolerance,  if it is without delivery in step --  ?  is it like this?
    i created a document type <b>zubd</b> by copying the std UB. and did the setting in the STO with the help of SD consultant.
    i assigned the new STO document type  ZUBD in step
    Assign Document Type, One-Step Procedure, Underdelivery Tolerance
    now when i am trying to assign document type UB in the step;
    Assign Document Type, One-Step Procedure, Underdelivery Tolerance
    <b>the system is giving me error message : an entry already exists with the same key</b>
    am i right if i make the interpetation for STO with and without delivery like this:
    1) for STO without delivery there is no need to do IMG in the step Set up stock transport order. we can use the std doc type UB or the one created by copying UB.
    2)  for STO with delivery we have to do the settigs in IMG for set uo stcok transport order
    thanks and regards
    Kavita

    Hi Kavita,
    You are Right,
    Assign Document Type, One-Step Procedure, under delivery Tolerance
    In this step, you define which document type is to be used for a certain combination of supplying plant and receiving plant.
    <b>There is no need to maintain IMG setting forStock Tranfer Order  Without SD delivery</b>. because main moto of assignment of Document type is to specify which delivery type is to be used.
    for this we allready maintain IMG setting before this srep >Assign Document Type, One-Step Procedure, Underdelivery Tolerance at
    <b>Assign Delivery Type and Checking Rule</b>:
    In this step, you specify whether an SD delivery is to be created in the case of a PO with a certain combination of supplying plant and document type. You can also specify which delivery type is to be used.
    The delivery determines how a delivery is handled.  I.e. stock transfers without a billing document or for stock transfers with a billing document.
    Regards
    Sanjay l

  • Place one order with Products from different sales orgs

    Hello,
    We are in CRM 7.0 EHP2 connected to ECC 6.0. We have Internet
    sales/Webchannel Application.
    We are rolling out Internet sales for a new country but they want the option to
    place one single order with products from different sales
    organizations.
    Currently Customers send fax/email to customer
    representative(CR) with list of products. The CR identifies and places
    multiple orders if products belong to different sales orgs.
    Currently customers don't have idea about sales orgs and they don't
    have a clue which product belongs to which sales orgs. So, for them to
    use Internet sales, we have to provide them an option to place one
    order with products from different sales orgs.
    I understand SAP doesn't support this. But, is there any way we can achieve this through some custom/out of the box solutions?
    Thanks,
    Ravi

    Hi Ravi,
    Please have a below help link, it may help you to explain the role of Distribution Channel and if it fits to your requirement.
    Organizational Data Determination in CRM E-Commerce - E-Commerce - SAP Library
    Thanks,
    Hamendra

  • When I am abroad (living in Norway) the phone only temporarily  connects to a network. Most of the time is says "no service" in top left corner...I have tried to turn it on/off...with and without sim installed...roaming makes no diff. Can anyone help me?

    When I am abroad (living in Norway) the phone only temporarily (and seldom) connects to a network. Most of the time is says "no service" in top left corner...From advice I have tried to turn it on/off...with and without sim installed...roaming makes no diff. Can anyone help me?

    You're welcome.
    If she has full reception and connection with the same cell phone carrier where you don't - with you both using a SIM card provided by the same carrier while in Norway with an unlocked iPhone, then make an appointment at an Apple Store if there is one nearby to have a diagnostic test run on your iPhone.
    In the interim, I would contact this cell phone carrier in Norway to ensure your iPhone is provisioned properly. They can run a reset for your account that will require powering your iPhone off, so call them with your wife's iPhone for this.

  • SAPU with and without Modi As..!

    From which table and with what filter we can get the list of with and without modification assistance objects which will get listed in SAPU?

    Hello Dhamodaran,
    You can do it by simply selecting the check boxes in the SPAU transaction. In the SPAU Transaction screen you will be able to select objects which can be modified with and without modification assistant.
    If you are trying to download this list you can so it by System->List->Save.
    Thanks,
    Sai

  • Is there an issue going on with the iPhones? And iPads? I cannot send text pics.  I can't get on Facebook, and I can't get on anything that uses Facebook ex Slotomania.  This has been going on for a few days!!!  It is happening with and without upgrades.

    Is there an issue going on with the iPhones? And iPads? I cannot send text pics.  I can't get on Facebook, and I can't get on anything that uses Facebook ex Slotomania.  This has been going on for a few days!!!  It is happening with and without upgrades.

    Contact facebook to address the facebook issues.

  • T450s screen size? (with and without bezel/border)

    Hello, May I ask the exact dimensions of the screen, with and without the bezel (in metric system)?Here is an image of the 4 coords I would need: http://ximg.fr/view-23376686df3969b67183003635c63a4f.htmlThank you very much

    the attached image is a t550 indeed but that's because it was the only decent image i could find on google, so I confirm I require these infos for the T450s.
    Thanks

  • TS3406 I have a connection in the top left hand corner and can access the internet with and without internet on my iphone 5c but I can't receive and create texts and calls, someone please help have tried everything!

    I have a connection in the top left hand corner and can access the internet with and without internet on my iphone 5c but I can't receive and create texts and calls, someone please help have tried everything!

    YOu will need to contact your cell phone provider to resolve those issue, those are carrier features.

Maybe you are looking for

  • Short Dump While Accessing RSA1 in BI7.0 with SP 21

    Hi, The following short dump occurs, while Accessing RSA1 in BI7.0 Runtime Errors SYNTAX_ERROR Date and Time 26.10.2010 10:19:35 Short text      Syntax error in program "CL_RSTRAN_STAT================CP ". What happened?      Error in the ABAP Applic

  • Connection timed out when accessing BPEL middle tier

    I'm having fits over communicating with a Solaris middle tier PM from the PC JDev during construction, build, and deploy time and just can't make this out. I get a 'connect timed out' message immediately when a reference to the Solaris middle tier PM

  • How do I burn a pdf file onto a CD?

    I have tried to export a pdf file created in pages to a CD in order to take to a local kinkos for printing. I am a new apple (macbook) owner and just can't figure out how to do it. Any suggestions? thanks

  • Small issue in dialog program

    Hello all, i have a requirement in dialog programming. I have to modify a record a record which exist in zatble. For each record , i have a header info, item details. for header iam ok , i can use modify. for item details i have like itemno    materi

  • Text distortion when converting from QuickTime to Flash

    I am converting a QuickTime video to Flash format. Both have the same pixel dimentions - 200 x 150 - so I don't need to resize. I am using the default "flash 8 - high quality" settings. However, there is some large text on the opening screen of the v