Can a flag field be used in a procedure to determine prior block success

I have a below stored procedure that has a IN and OUT parameter. The block
has structure as below.
In this procedure there are multiple inner blocks each with an individual
exception handler. I need to modify this to pass a flag field as a additional parameter
to this procedure such that should any of the inner block execution were to fail, the next execution should pass the control to the failed block (as in the previous successfully executed INNER blocks should not be re-executed).
How can I acheive this?
CREATE OR REPLACE PROCEDURE procname(some_in_variable IN datatype1,
                                             some_out_variable OUT datatype2)IS   
var1 datatype;
var2 datatype;
cursor cursorname IS
BEGIN
  IF some_condition then
     RAISE main_exception_encountered
  ELSE
     DECLARE -- BEGIN OF INNER BLOCK 1
     BEGIN
      IF CONDITION THEN
      ELSE
        raise some_excep;
      END IF;
     END;   -- END OF INNER BLOCK 1
     DECLARE  -- BEGIN OF INNER BLOCK 2
     BEGIN
      SELECT statements here
      exec some_procedure_name(param1, param2);
     exception
     END;   -- BEGIN OF INNER BLOCK 2
  EXCEPTION
    when some_excep then.....
EXCEPTION
  when main_exception_encountered...do something
END procname;

steve2312 wrote:
Ok. I plan on use the below code snippet inside every block prior to an exception being raised. This will set flag value to N when a block fails.
UPDATE processlogtable           
SET flagfield = 'N'
WHERE pk_field = 'somevalue';
COMMIT;The next time a new block is read it'll check for the flag, if it is Y then the block is executed. However, if the flag is N due to a failed block how can I make the procedure go back to that failed block?Do you really want to COMMIT all DML changes that caused an EXCEPTION?

Similar Messages

  • I am unable to create a form that I can move the fields in - using Adobe Acrobat XI Pro on a PC

    I need to make fill-in forms with little space between questions.  Adobe Acrobat XI Pro does not allow me to alter fields and sizes as I need to.  Advice?

    Is the Snap to Grid option ticked under View - Show/Hide - Rulers and Guides? If so, un-tick it.

  • Why does Apple refuses to use the activation procedure in iTunes to block a stolen iPhone 4S

    My iPhone was stolen in Buenos Aires by two, male and female, professional culprits roaming the tourist areas.
    Blocked the iPhone (SIM card), filed a police report and activated "Find my iPhone".
    Called Apple support with proof of ownership and asked them to put this iPhone on the blacklist in order to avoid activation on iTunes.
    Thieves and people trying to buy cheap iPhone's will end up having just a heavy iPod touch. That will learn the fat bastards.
    Hope Apple will soon introduce a new App; Explode my iPhone in the face of a thief.

    Because Apple is not a law enforcement agency and they have no legal right to do so.

  • My original iPad2 was stolen, can I prevent thieve to use it with iTunes?

    My original iPad2 was stolen, can I prevent thieve to use it with iTunes?
    Unit was blocked by code and Find My Phone enebled but appears offline..

    There is something wrong really. I could not locate my second iPhone2 (replacement for the stolen one) with cover closed (and pin locked). Impossible to locate it at all. I had to turn the location services off and on again and since this it started to work. But even so, it does not update the location - it just show the last located place (like one hour ago) until is pin unlocked. This is useless. By BB bold 9900 is possible to find on map even when is in holster and pinlocked. All it need is GSM signal. It show circle where it may be and when is on GPS signal, it update the ring diametre automatically - all without need to unlock the phone with pin code.
    Please try to check it, if it does not work when the iPad is pinlocked, then it does not have sense.

  • How to find how much memory used by particular procedure or function.

    Hi,
    How can we find out memory used by particular procedure or function?
    If procedure or function is called many times in particular interver, wil it be cached in memory?
    and how will it affect performance?
    what type of pl/sql statement will take more time than normal sql statement?

    Hi
    There are several different memory issues to consider:
    - the code itself (stored in the shared pool)
    - simple variables defined in the code
    - complex variables (eg VARRAY, TABLE etc)
    There's a helpful note on PL/SQL profiling here - http://www.oratechinfo.co.uk/tuning.html - which mentions how to measure memory use (session PGA and UGA - that's program and user global areas)
    You can find out more about shared pool memory structures here - http://download-east.oracle.com/oowsf2005/003wp.pdf.
    Calling a function many times - yes, the function code will be cached (if possible). Session state (for a package) will also be retained (ie global package variables).
    If many users call the same function, there will be one copy of the code but many copies of the private state.
    Finally: PL/SQL statements that can take a long time include:
    - anything that does heavy processing inside a tight loop;
    - anything that waits (select for update; read from a pipe or dequeue from AQ etc)
    Probably the most common mistake is to use PL/SQL for relational processing that can be done from SQL itself (eg writing nested PL/SQL loops to join data that could have been queried in a single SQL statement. Try to minimise context switches between PL/SQL and SQL:
    - use bulk collect where possible
    - use set operations in SQL
    Good luck, HTH
    Regards Nigel

  • FM-update of tax using the net procedure

    Hi everyone!
    How should the tax be updated in FM during payment of an invoice? I chose the net procedure and assigned a statistical commitment item to the tax account (the tax amount shouldn't spend the budget). When I post an invoice tax is updated to the statistical commitment item and the net value of an invoice to the correct commitment item of expenditure, but when I post a payment of that invoice it is updated in whole amount on the commitment item of expenditure...I don't know if this is correct.
    Please help...

    Doesn't anyone know answer to this question??? Is it really that hard? I can't believe that nobody used the net procedure regarding tax update before...

  • Which sequence used in which procedure/procedures?

    how can i know which sequence used in which procedure/procedures?
    can i get it from any system view?

    855516 wrote:
    how can i know which sequence used in which procedure/procedures?
    can i get it from any system view?You can search DBA/USER/ALL_SOURCE for each sequence name. Logic could look something like
    foreach sequence name in dba_sequences
      search dba_source for sequence nameRemember that code can be written using upper or lower case :)

  • Reg. can we display alv grid using field groups (extracts)

    Hi,
    can we display alv grid using field groups (extracts). is this possible. i have to develop a blocked alv.
    tnks
    Yerukala Setty

    No, you will need the data in an internal table to use ALV.
    Cheers
    Allan

  • I can not use the tab key to move to the next field or use the shift and tab to move to the prior field in forms.

    After updating to 7.0.1 I can not always use the tab key to move to the next field or use the shift and tab to move to the prior field in forms. This always worked in previous versions and it's much needed for my type of work. Does anyone know of a setting to activate this? If not can the Firefox developers work on this issue (please). I love Firefox but desperately need this feature to work correctly. Thanks!

    I tried in safe mode and the tab key worked just fine. I'm not sure about all web forms I've only recently updated to 7.0. The wen form I was using was for appraisal purposes and it has multiple data fields to fill in and also drop down menus to select from. Might I always have to use Firefox in safe mode to be able to utilize the tab between field feature? Thanks for your help!

  • Can't drag the currency key in local currency to the pool of fields not use

    Hi everyone,
    Hopefully you can enlighten me with this issue coz im trying to drag the currency key in local currency to the pool of fields not used (UCWB<Data Model<Data Basis<Data Model(TAB)) but nothing happened, i can't transfer it to the pool of fields not used.
    Note:I came with this decision(transferring the currency key in local currency to the pool of fields not used ) because SAP prompt me with this:
    The currency key in local currency is not required in the data basis. It is merely an implicit part of the data model
    I really dont have any idea why i can't drag it to the pool of filed not used, i tried to look for some sap notes but i can't find one.
    thanks in advance

    Hi Dan,
    Actually it is not really an error, i just would like to pattern the configuration of our newly upgraded BI server  to our BW server.
    In our BW server, the currency key in local currency is mapped to the pool of fields not used. I can't seem to do the same in the BI server because everytime I try to drag the currency key in local currency to the pool of fields not used, nothing happens, it isn't mapped.

  • How i can find flag for edit/display in CO01?

    hi,
    how i can find flag for create/add in CO01 ?
    please note that we don't want to use the sy-tcode for checking.
    please revert back if you have any clue.
    thanks,
    sanjay

    Thanks for that reply.
    To get TRTYP we need to pass the TCODE which we don't want.We wanted to avoid using TCODE since our code gets executed from several TCODEs and during the process for few TCODEs it actually looses the actual TCODE..
    So the alternate solution is a check on the if AUFK-AENAM is INITIAL....this field will be empty only at the first instance(when the prod order gets created) and later you can't find this empty in the whole life cycle of this prod order as this will be filled by the value "Last Changed by"..
    Hence this covers our requirement.

  • Custom Flag field show's blank value by default instead of yes or no

    Hi TechNet users.
    I see this behaviour in a number of my environments (RTM, CU April, ProjectOnline). I have a Flag custom field on task level, these should alway's have a value (No or Yes).
    So I create a Project schedule using the browser and add some auto scheduled tasks by just filling in the taskname column. I can view the flag field being populated with a No. Now I publish this project and check it in to the server.
    If I now look at that new project schedule using the PWA interface and I do not edit the project but just view the schedule with that flag column I just see a blank cell with the new task.
    If I edit the project and Manually change the flag field to say No and publish/check in the project the value is correctly displayed.
    But is this by design? To my knowledge a flag field always have a "No" value by default and should be "No" already when I just fill in the task name field. I think this is something the Schedule webpart on PPM doesn't do correctly? Can
    any of you reproduce the situation?

    Hello Erik
    Until you choice a value, the value is NULL.
    cheers!
    Michael Wharton, MVP, MBA, PMP, MCT, MCTS, MCSD, MCSE+I, MCDBA
    Website http://www.WhartonComputer.com
    Blog http://MyProjectExpert.com contains my field notes and SQL queries

  • How to create a report in Form line Style and can display Image field?

    Hi,
    In Report builder 10g, I would like to create a Report with Form Line Style and this report included a Image field.
    I can choose this Style only when Select Report type is Paper Layout. Because, If I choose Create both Web & Paper Layout or Create Web Layout only then in the next Style tab 03 option Form, Form letter and Mailing Label be Disabled.
    But in Paper Layout, my report can not display Image field.
    I tried with Web layout and all the other Styles (Except 03 mentioned be Disabled) then all Styles are displayed Imager field OK.
    How to create a report in Form line Style and can display Image field?
    I was change File Format property of my Image field from text to Image already in Property Inspector. But report only showed MM for my Image field.
    Thanks & regards,
    BACH
    Message was edited by:
    bachnp

    Here you go..Just follow these steps blindly and you are done.
    1) Create a year prompt with presentation variable as pv_year
    2) Create a report say Mid report with year column selected 3 times
    - Put a filter of pv_year presentation variable on first year column with a default value say @{pv_year}{2008}
    - Rename the second time column say YEAR+1 and change the fx to CAST(TIME_DIM."YEAR" AS INT)+1
    - Rename the second time column say YEAR-1 and change the fx to CAST(TIME_DIM."YEAR" AS INT)-1
    Now when you will run Mid Report, this will give you a records with value as 2008 2009 2007
    3) Create your main report with criteria as Year and Measure col
    - Change the fx for year column as CAST(TIME_DIM."YEAR" AS INT)
    - Now put a filter on year column with Filter based on results of another request and select these:
    Relationship = greater than or equal to any
    Saved Request = Browse Mid Report
    Use values in Column = YEAR-1
    - Again,put a filter on year column with Filter based on results of another request and select these:
    Relationship = less than or equal to any
    Saved Request = Browse Mid Report (incase it doesn't allow you to select then select any other request first and then select Mid Report)
    Use values in Column = YEAR+1
    This will select Year > = 2007 AND Year < = 2009. Hence the results will be for year 2007,2008,2009
    This will 100% work...
    http://i56.tinypic.com/wqosgw.jpg
    Cheers

  • Hello, I have created a distribution kit for my program.The problem is that the when the program is installed onto another computer, it fails to communicate with field point (Using FP-AO-200 and FP-AO-1000). Help is greatly appreciated, Thanks faen9901

    Hi Everyone,
    I have a program that sends information(analog output) to lab windows cvi in the form of a text file or user input.
    The program runs on the computers that I have the field point explorer and lab windows cvi installed on. In order to run the program without always installing labwindows/cvi and field point; I wanted to create an executable file that could be load on another computer.
    I used the create distribution kit part of labwindows/cvi to do this.After creating the distribution kit, I then installed it
    to another computer.
    My user interface appears on the screen, when the user clicks on the exe. file, but no data is sent to the field point module. I know that the data is being read from the user and textfile because in it appears in the uir.
    The following are some details about the problem:
    1. On another computer without labwindows/cvi and field point explorer not installed - no data is sent to field point module
    I know this because a current is being read on the current meter connected to field point module.
    My questions are the following:
    1. What are the possible reasons for the data not being sent to the field point module?
    2. Do I still need to create an iak. (Installing Field point Explorer) file stored on any new computer that I install my created distribution kit file too?
    Thankyou very much for any help that you can provide. I greatly appreciate it.
    Faen9901

    Re: Hello, I have created a distribution kit for my program.The problem is that the when the program is installed onto another computer, it fails to communicate with field point (Using FP-AO-200 and FP-AO-1000). Help is greatly appreciated, Thanks faen9901Faen9901,
    1) If you do not install FieldPoint Explorer, the FieldPoint Server is not installed so there is nothing on the target computer that knows how to talk to the FieldPoint system.
    2) Yes, you need an IAK file on the target computer. Assuming the settings (i.e. com port#) are identical you can simply include the iak file as part of the distribution.
    3) You also need to include as part of your installer the file "fplwmgr.dll". If this file is not installed, your program will not be able to access the FieldPoint Server. Alternatively, this file is installed automatically if FieldPoint Explorer detects LabWindows/CVI or Measurement Studio Development versions on the target computer or if you choose to do a custom FieldPoint Explorer installation and
    choose to provide LabWindows/CVI support.
    Regards,
    Aaron

  • I have a fillable form that we send to contractors - when the form is opened on a computer the contractor can view the fields we have completed, however when viewing from a mobile device or cell phone those fields appear blank. Any suggestions? I am at a

    when the form is opened on a computer the contractor can view the fields we have completed, however when viewing from a mobile device or cell phone those fields appear blank. Any suggestions? I am at a total loss as it works when viewing from the computer. I am assuming it is a setting or maybe we need to save it a special way?

    What version of Reader are they using, exactly? And are you sure they're
    using Reader itself and not opening the file inside a browser window, for
    example?
    On Fri, Feb 6, 2015 at 5:24 PM, jessicao96457206 <[email protected]>

Maybe you are looking for

  • Flash Player not loading in IE

    I have reinstalled IE and also Flash Player, still the flash does not work, I can only see a blank space where the flash has to load, anyone had this issues?

  • How do I customize my Discussions iViews?

    Hi all, I am using EP6.0 SP2 Patch2 HotFix2. I want to customize my KM Discussions iViews. In every such iView, there is a heading "Discussion" at the top and a short description of the discussion below that. This is standard for any Discussions iVie

  • Asset material code

    Dear Expert in our system presently we open asset code through as01 and in the PO we select the account assignment category A but now we want to create material code for the asset PO i.e with account assignment category A and material code how it eff

  • Imessage hack?

    I handed in my iphone 5 to a service company because the speaker wasn't working, they needed my passcode etc but I made sure to outlog myself from all apps and iMessage. However, when I got it back now, my apple laptop asks me if I want to add this n

  • Cant share by email attachment

    When I try to share a photo by email attachment, action stalls and will not complete. Any ideas will be appreciated.