How to handle the unsuccessful execution of a procedure through exception

I have to run a sequence of procedures through a procedure. The execution of a succeeding procedure depends on the successful execution of the preceding procedure.What i want is that a procedure is only executed when the preceding
procedure is successful.

I wonder which is the best practice ...
1) to pack all exceptions - occured in the sub-procedures - in the main procedure
or
2) to pack all exceptions - occured in the sub-procedures - locally , in the body of these sub-procedures....???
In other words....
procedure main
as
   begin
      procA;
      procB;
      exception
         when ......
         when .....
         when .....
    end;
procedure A
as
  begin
      return;
  end;
procedure B
as
  begin
      return;
  end;
OR
procedure main
as
   begin
      procA;
      procB;
    end;
procedure A
as
  begin
      exception
        when ...........
        when ...........
      return;
  end;
procedure B
as
  begin
      exception
        when ...........
        when ...........
      return;
  end;Thanks...
Sim

Similar Messages

  • How to handle the OK button of the parameters prompt of a crystal report

    Hi,
    how to handle the OK button of the parameters prompt of a crystal report in vba.NET?
    I want to use the parameter prompt from the crystal report itself and I want to know when the report is ready. I need to export programatically by sending email to a list of employees after the parameters has been set. The emails I send depends on the results of the report.
    Im using a CrystalReportViewer control  in VS2010 and Crystal Report for VS2010 v13.0.1.220.

    Right. But the parameter screen is driven by the viewer. Unless you create your own parameter screen and pass the parameters to the report via code.
    Another thing I am not sure about:
    "Then by code I want to read all the employees id from the report and send email to them with specified pages of the report. (1 page per employee)"
    How do you plan on reading the employee ID from the report? I am not aware of any API that will read a value in a report so that you can then decide what page to send to whom.
    I think you're approaching this kinda backwards. A question to ask is; can you do what you are trying to do in code in the CR designer? If not, using APIs will not work either. I suspect your approach should be a report that uses an employee filter. Run the report for employee x, get the report populated with the data for that employee and email it. Repeat for employee x1, employee x2, etc.
    - Ludek

  • How to get the total execution time from a tkprof file

    Hi,
    I have a tkprof file. How can I get the total execution time. Going through the file i guess the sum of "Total Waited" would give the total time in the section "Elapsed times include waiting on following events:"
    . The sample of tkprof is given below.
    SQL ID: gg52tq1ajzy7t Plan Hash: 3406052038
    SELECT POSTED_FLAG
    FROM
    AP_INVOICE_PAYMENTS WHERE CHECK_ID = :B1 UNION ALL SELECT POSTED_FLAG FROM
      AP_PAYMENT_HISTORY APH, AP_SYSTEM_PARAMETERS ASP WHERE CHECK_ID = :B1 AND
      NVL(APH.ORG_ID, -99) = NVL(ASP.ORG_ID, -99) AND
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'ALWAYS' OR
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'CLEARING ONLY' AND
      APH.TRANSACTION_TYPE IN ('PAYMENT CLEARING', 'PAYMENT UNCLEARING')))
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute    442      0.08       0.13          0          0          0           0
    Fetch      963      0.22       4.72        350      16955          0         521
    total     1406      0.31       4.85        350      16955          0         521
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 173     (recursive depth: 1)
    Number of plan statistics captured: 1
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
             1          1          1  UNION-ALL  (cr=38 pr=3 pw=0 time=139 us)
             1          1          1   TABLE ACCESS BY INDEX ROWID AP_INVOICE_PAYMENTS_ALL (cr=5 pr=0 pw=0 time=124 us cost=6 size=12 card=1)
             1          1          1    INDEX RANGE SCAN AP_INVOICE_PAYMENTS_N2 (cr=4 pr=0 pw=0 time=92 us cost=3 size=0 card=70)(object id 27741)
             0          0          0   NESTED LOOPS  (cr=33 pr=3 pw=0 time=20897 us)
             0          0          0    NESTED LOOPS  (cr=33 pr=3 pw=0 time=20891 us cost=12 size=41 card=1)
             1          1          1     TABLE ACCESS FULL AP_SYSTEM_PARAMETERS_ALL (cr=30 pr=0 pw=0 time=313 us cost=9 size=11 card=1)
             0          0          0     INDEX RANGE SCAN AP_PAYMENT_HISTORY_N1 (cr=3 pr=3 pw=0 time=20568 us cost=2 size=0 card=1)(object id 27834)
             0          0          0    TABLE ACCESS BY INDEX ROWID AP_PAYMENT_HISTORY_ALL (cr=0 pr=0 pw=0 time=0 us cost=3 size=30 card=1)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                       350        0.15          4.33
      Disk file operations I/O                        3        0.00          0.00
      latch: shared pool                              1        0.17          0.17
    ********************************************************************************

    user13019948 wrote:
    Hi,
    I have a tkprof file. How can I get the total execution time.
    call count cpu elapsed disk query current rows
    total 1406 0.31 4.85 350 16955 0 521TOTAL ELAPSED TIME is 4.85 seconds from line above

  • How to handle the control records in case of file to idoc scenario.

    Hi All,
    can you please clarify me how to handle the control records in case of file to idoc scenario.

    Hi,
    In File to Idoc scenario even though you selected apply control record values from payload and you are not getting those correct values which you have provided in the mapping.
    Also check the checkboxes Take sender from payload and Take receiver from payload along with the Apply control record values from payload checkbox
    Regards
    Seshagiri

  • How to handle the different pricing conditions changes in BI.

    Dear Friends
    can any one send me  Regarding
                    How to handle the different pricing conditions changes in BI.
    Thanks & Regards
    Ramana

    Hi,
    Take a look at the 0sd_o06 ODS and 2lis_13_vdkon datasource for sales billing conditions.
    http://help.sap.com/saphelp_nw70/helpdata/EN/36/8188408bc0bb4de10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/7f/0f8c4037fba62be10000000a1550b0/frameset.htm
    Regards.

  • How to handle the stale cheques in EBRS

    Dear Guru's
    Can any bady explain me how to handle the stale cheque cases in EBRS, and what are the possible transaction codes using for that.
    Any help can be greatly appreciated.
    Regards,
    kishroe

    Hi
    any bady know about this plz respond.
    Thanks in Advance
    kishore

  • How to handle the extended vo in the extended controller

    Hi,
    I want to know how to handle the extended vo attributes in the extended controller.
    I extended CompetenceElementsVO as 'CompetenceElementsEx' with 2 transient attributes called col1 and col2.
    Here i want to pass value according based on some condition. for this i want to know how to handle these attributes.
    I tried by using the extended vo name in the controller, if i use means then it is throwing error after the extended controller is implemented.
    Same time if i try to refer this attributes from the original vo definition, jdev itself showing error.
    please tell me how to handle this?
    Thanks in advance,
    SAN

    Hi San,
    You have to extend the controller where your region is associated with,
    And in that controller you get the AM(if there is more than one AM and your VO is associated with a child AM, first you have to get your required AM) and then
    get the ViewObject(standard).
    Then you should be able to get your newly added attributes.
    Please find the below sample code to get the AM handle and VO from there, update the code according to your requirement,
         Get all the VOs under the Root AM
         writeLog(pageContext, "Room AM"+ pageContext.getRootApplicationModule());
    String[] rootViewNames = pageContext.getRootApplicationModule().getViewObjectNames();
    /* writeLog(pageContext," Length of the VOs from Rootm AM "+rootViewNames.length);
    for (int j =0 ;j<rootViewNames.length ;j++ )
    writeLog(pageContext,j +" Value "+rootViewNames[j]);
         // Get requested AM from Root am
    public OAApplicationModule getRequestedAM(OAPageContext pageContext, String requestedAMName)
    writeLog(pageContext,"Requested AM called to check the AM "+requestedAMName );
    String amName = "";
    String objectivesAMName = requestedAMName;//"ObjectivesAM";
    String nestedAMArray[] = pageContext.getRootApplicationModule().getApplicationModuleNames();
    pageContext.writeDiagnostics(this,"Root AM=>"+pageContext.getRootApplicationModule().getName() + " Child AMs=>"+ nestedAMArray.length,1);
    OAApplicationModule currentAM = null;
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule();
    for(int i = 0; i < nestedAMArray.length; i++)
    amName = nestedAMArray;
    pageContext.writeDiagnostics(this,"Nested AM Name=>"+amName + "and amName.indexOf(objectivesAMName) "+amName.indexOf(objectivesAMName),1);
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule().findApplicationModule(amName);
                        //Get the view names
                   String[] viewNames = currentAM.getViewObjectNames();
    for (int i =0 ;i<viewNames.length ;i++ )
    writeLog(pageContext,i +" Value "+viewNames[i]);
    if(!(amName.indexOf(objectivesAMName)==-1))
    pageContext.writeDiagnostics(this,"Found Handle to My Nested AM " + amName ,1);
    break;
    return currentAM;
    Get the VO from the AM
    OAViewObject objAssessmentVO = (OAViewObject)yourAM.findViewObject("yourVO");
    Thanks.
    With Regards,
    Kali.
    OSSi.

  • How to handle the call transaction in method of a custom business object

    Hello all,
    There is a custom report " RPTCORAPP" for approving leaves . As per my requirement i have develop a copy of leave workflow and for approval process i have call  "RPTCORAPP" in Custom method of custom object. i have made a transaction for this custom report for approving attendances. I am calling this method though call transaction statement within method.
    Problem: while approving the attendance workitem is not disappearing from the portal. Problem is due to call transaction statement.
                   once workitem come to the user, user click on it. control goes to the report, which display all the leave to approve on
                   the portal.
                   If after approving/ rejecting attendance user close the screen.workflow remain in the "process" status.Control wont come  back after call transaction statement in the method.
                 At the same time if user clicks on back button inspite of closing the screen. it is working fine. workitem disappears from the portal.
    How to handle the scenarion. if after approving/rejecting, i want the control to come back to the NEXT STATEMENT after call transactionstatement in my method.
    Please help it out........:)

    Hi swami,
    thanks for reply. but i am not using BDC in my method. iam just calling a custom transaction thriugh statement
    Call transaction 'ZHR_APPROVE_CLINOUT'. This transaction directly run the report RPTCORAPP and display all the request.

  • How to handle the table control in bapi?

    how to handle the table control in bapi? example va01.
    i pass multiple line item what is the procedure?
    header detail same .
    eample ship to party
           sale to party.
    line item mulptiple
    10 mat1
    2o mat2
    30 mat3.
    in bapi we can pass sinle line item.
    any way to handle multiple line item pass through the bapi.
    Message was edited by:
            Karthikeyan Pandurangan

    BAPI is not going through the screen flow logic so you need not to worry about the table control. Just check in the BAPi there must be one table parameter for line items just pass one int table with your data to that table parameter it will automatically update the tables.
    Regards
    shiba dutta

  • How to handle the #error in ssrs expression

    hi 
    Please any one help me to resolve this #error ,
    I have a calculated filed in that expression i given a if condition like below 
    data of column is coming like this 0 , 0.0 
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/( Fields!Column1.Value)))
    how to handle the #error 
    Please let me know any one 

    Hi deepuk23,
    According to your description, when you use the IIF() function in the report you got some error,right?
    The issue can be caused by the column1 and column2 have different datatype, I assumed that one is integer and another is float, when the Column1 is 0 or null,  because IIF() function always evaluates both the true part and the false part, even
    though it returns only one of them, it will throw out the error. 
    To resolve the issue, you should use a nested IIF() function to avoid the zero-divisor in any rate like below:
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/(IIF(Fields!Column1.Value=0,1,Fields!Column1.Value))))
    For more information, please refer to this article:
    FAQ: Why does the “Attempted to divide by zero” error still happen?
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to handle the errors in transformations

    Hi
    I am using SOA, JDev 10.1.3.3.
    How to handle the exceptions in transformations.
    If any thing goes wrong in transformation then how to handle that situation.
    I am not getting any kind of instances like errored out..
    Please help me out
    Regards
    Pavankumar

    I think your issue is that your process is going into manual recovery.
    In the console click on the tab BPEL processes. There is a link on the left for manual recovery. Do you see your processes there?
    What happens if you put your transformation into a scope. The in that scope you have a catch All. In this catch All routine just do a terminate. This will error your process but you should see it appear in the console.
    cheers
    James

  • How to handle the multiple line items in the Inbound idoc FM

    Hi ,
    Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
    Thanks in Advance,,,,
    Regards,
    Bharani

    Hi ,
    Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
    Thanks in Advance,,,,
    Regards,
    Bharani

  • How to handle the 500 Internal Server Error + ADF

    Hi,
    How to handle the 500 Internal error ADF application? I tried with giving the error page in web.xml but it does not work
    Please advice

    i'm not sure if this is related, but we also have the following in the web.xml file
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jsp</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jspx</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>

  • How to capture the first execution of a report

    Hi,
    I am executing a report in background. The first time the report is executed I have to do a different processing. After the 1st execution I have to different processing.
    Someone please tell me how to capture the 1st execution of a report. Is there a system variable ?
    Appreciate your <removed by moderator> response.
    Thanks,
    Dikshitha G
    Edited by: Thomas Zloch on May 12, 2011 11:36 AM

    Keshav.T wrote:
    Are you going to create a Z table for this ???? ... Is there nobody to advice you in your firm ???
    Hello Keshav,
    A couple of years ago i would have recommended using the INDX table, but it has got it's demerits.
    Maintenance of Z-table is easier than the INDX table. Say there is some error in the program & you want to override the flag. Will it be easier to do so in the INDX table or via SM30 for the Z-Table?
    As a matter-of-fact i will recommend using the solution provided by Florian the TVARVC technique.
    1. Create a parameter(specific to your program) & transport it.(See the trxn STVARV)
    2. In your program check the value of this param & set it accordingly.
    Using TVARVC you will 2 birds with one stone:
    1. You don't have to create a custom table.
    2. Easy maintenance via STVARV trxn.
    Hope you get the point!
    Cheers,
    Suhas
    PS: In our system we have a Z-table designed specifically for this particular purpose. All the programs having this kind of requirement refer to this table.

  • How to handle the java.policy file ?

    Can somebody tell me how to handle the java.policy file?
    I always get java.net.SocketExceptions and java.security.AccessControlExceptions while connecting to an appserver from an applet.
    What do I have to write in the java.policy file, where do I have to place it and do I have to call it in some way form my applet?
    Thanks in advance.
    don call

    The java.policy file goes in your jre installation directory in .../jre/lib/security (there should be one there already).
    I used it to allow otherwise restricted permissions for an applet using javax.comm. Add something like the following to the file:
    grant codeBase "URL:http://yourDomainName/rootDirectoryOfYourApp/*" {
         permission java.security.AllPermission;
    This will give the applet downloaded from your site all permissions. You might want to give only certain permissions, I don't know.
    Teri

Maybe you are looking for