RAISE statement is behaving inconsistently in my FM!

Hello,
I wrote my FM as below w/ some EXCEPTIONS,
* 1st Block
From 1 to 10 line of code
  RAISE exception_1. " Invalid_inco_terms.
* 2nd Block
From 11 to 20 line of code
  RAISE exception_2. " Invalid_payment_method
* 3rd Block
From 21 to 30 line of code
  RAISE exception_3. " Invalid_partner
* 4th Block
From 31 to 40 line of code
  RAISE exception_4. " Invalid_customer_group
* 5th Block
From 41 to 50 line of code
We are calling this FM from workflow as a background step, hence we don't have much chance to check its behaviour / debugging
We noticed its behaving not consistently!
1) In first case: When this FM is executed, when the control comes to the 3rd block, validation failed and EXCEPTION_3 got triggred, but still 4th block piece of code and 5th block piece of code got triggered
2) In 2nd case: When this FM is executed, when the control comes to the 1st block, validation failed and EXCEPTION_1 got triggered, immediately control extted, I mean, the any one of the below blocks are not excuted
Pls. let us know why this inconsistency is?
Pls. let us know ideally how RAISE statement behaves in any FM? Actually, I did F1 and I red the SAP Help but didn't understood it
Thank you

Hi,
I think there must be something wrong in your code lines for block 3.
Have you debugged it ? Can you please post it here ?
Regards,
Klaus

Similar Messages

  • The use of a stand alone RAISE statement

    What is the point of having a standalone RAISE statment (ie a RAISE statement without arguments).
    BEGIN
    DECLARE
    e_UserDefinedException EXCEPTION;
    BEGIN
    RAISE e_UserDefinedException;
    END;
    EXCEPTION
    WHEN OTHERS THEN
    /* Just re-raise the exception, which will be propagated to the
    calling environment */
    RAISE;  --the standalone RAISE statement
    END;
    /When i create a package with several functions and procedures inside I always create a caller procedure called callProcs, which will execute various procedures in the appropriate order.
    procedure callProcs(p_ship_type in varchar2)
         is
                 --execute proc1
                     procedure1();
              --execute proc2.
              procedure2();
              --execute proc3.
              procedure3();
              --execute proc4.
              procedure4();
           --commit the transaction.
              commit;
                  exception
                        when others then
                        err_msg:=SQLERRM;
                       --dbms_output.put_line (err_msg);
                      dbms_output.put_line('Rolling Back');
                          rollback;
    end package_name;
    /proc1,proc2 and proc3 has Exception handling like the following
    exception
    when others
    THEN
    error_message :='My custom message for the particular proc '||SQLERRM;
    dbms_output.put_line(error_message);
    logerror(error_message); --an autonomous error logging proc
    end;According to the documentation, i should include a standalone RAISE statement like below so that the error is propogated out to calling environment ie.callProcs procedure. But this RAISE statement is not necessary. Right?
    exception
          when others
          THEN
          error_message :='My custom message for the particular proc '||SQLERRM;
          dbms_output.put_line(error_message);
          logerror(error_message); --an autonomous error logging proc
          RAISE;
    end;

    The RAISE is used inside the exception handler_.
    If you "handle" the error and are satisfied that it has been handled then there is no need to RAISE it back up to the calling code.
    If you are just capturing the error i.e. to log it, but you aren't handling it then you should RAISE it back up to the calling code. Somewhere up the chain of calls the error should get handled or, if not, it will exit out of the top of the code and the error will be given to the program that called the code e.g. SQL*Plus etc. which can choose what it does with the error (usually displaying it to the user).
    PL/SQL 101 : Exception Handling
    PL/SQL 101 : Exception Handling

  • Tcode VF02 RAISE statement in the program "SAPLCSS3" raised the exception.

    Hi,
          I am getting a short dump in my smartform attached with vf02. For few of invoice no. its working perfectly but giving dump in few invoice no.
    Below is short dump statement. Pls guide me for this issue.
    A RAISE statement in the program "SAPLCSS3" raised the exception
    condition "CALL_INVALID".
    Since the exception was not intercepted by a superior
    program, processing was terminated.
    Short description of exception condition:
    invalid call
    Regards,
    Ranu`
    Edited by: ranu sharma on Feb 6, 2010 2:55 PM

    Hi Dipesh,
    In background SAP GUI functionalities are not available.
    This question has been asked many times on scn:
    CNTL_ERROR
    CNTL_ERROR while running a report in background mode
    Regards,
    Ashvin

  • Raise statement in a package.

    I am just curious about the raise statement used in plsql.
    exception
    when others then
    dbms_application_info.set_module('', '');
    dbms_application_info.set_client_info('');
    x_err_code := sqlcode;
    x_err_message := sqlerrm;
    log_message(p_message => x_err_message,
    p_proc_name => lc_proc_name,
    p_event_status => constants_pkg.event_error);
    log_message('excpt5', lc_proc_name);
    raise; ------------------------------------------------------------------------------------------------------------what does it do?it is not associated with any exception.
    end apply_payment_by_vtxn;

    Whatever caused the code to enter the exception block will be re-raised, it does not matter what it was that caused it, or where in the code it came from. Consider:
    SQL> create procedure p (p_num in number, p_str in varchar2) as
      2     l_v varchar2 (2);
      3  begin
      4     if p_num is not null then
      5        select dummy into l_v
      6        from dual
      7        where 1 = p_num;
      8     else
      9        select p_str into l_v
    10        from dual;
    11     end if;
    12  exception
    13     when others then
    14        raise;
    15  end;
    16  /
    Procedure created.
    SQL> exec p(2, null);
    BEGIN p(2, null); END;
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OPS$ORACLE.P", line 14
    ORA-06512: at line 1
    SQL> exec p(null, 'Hello');
    BEGIN p(null, 'Hello'); END;
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "OPS$ORACLE.P", line 14
    ORA-06512: at line 1Note that the line number for the error is at the raise, not where the original error occurred.
    John

  • Deployment Issue: The saved State dictionary contains inconsistent data and might have been corrupted.

    Hi,
    I have been working on a C# project. It all works fine except the installer. I can install the project but if I then repair it and then try to un-install it I get the following error:
    "An exception occured while uninstalling. This excepion will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete --> The saved State dictionary contains inconsistent data and might have been corrupted."
    This error happens whenever I try to un-install/repair/modify it having previously tried to repair it. It seems that in repairing it the .InstallState file becomes corrupted. I can un-install it by replacing the .Installstate file with a working version. However the end users will not know how to do this. Is there any way of fixing this?
    Just in case it is important: It's a Framework 2 project, built in VS2005, it consists of a windows service and a forms application the service relies heavily on SOAP.
    Thanks for any help,
    Joe

    I've got almost the same problem
    I can't uninstall service that was just installed with install util. Error message is
    An exception occurred during the uninstallation of the .Service.WindowsService.ProjectInstaller installer.System.ArgumentException: The savedState dictionary contains inconsistent data and might have been corrupted.
    There was no repair or modify after install.
    Then I had removed .InstallState file and installUtil did not find any problem in savedState dictionary ;-)
    I checked InstallState file but have not found any visible problem with it
    Please take a look if you know what is InstallState file
    https://onedrive.live.com/redir?resid=5622404b58b0055f!132&authkey=!AA0PsRyTJUTdPgk&ithint=file%2cInstallState
    Regards

  • Help with error select case statement (ORA-00932: inconsistent datatypes)

    Hi,
    I'm struggling to get my sql query work on Oracle..
    I have a table MyTable with 5 columns ( Column1, Column2, Column3, Column4, Column5 ) all are of type NVARCHAR2.
    I need to check whether Column 3, Column 4 are empty or not in that order..and if they values then I wanna append it to Column2.
    For example
    If a row contains the following values,
    Column 2 = a.b
    Column 3 = 123
    Column 4 = xyz
    then column CA = a.b/123/xyz where column CA = temp column
    If either Column 3 or Column 4 is empty/null, then I don't need to append value for that column..
    For example
    Column 2 = a.b
    Column 3 = either NULL or ''
    Column 4 = xyz
    then CA = a.b/xyz where column CA = temp column
    similarly..
    Column 2 = a.b
    Column 3 = 123
    Column 4 = either NULL or ''
    then CA = a.b/123 where column CA = temp column
    Here is my query..
    select MyTable.Column1 as CA0,
    MyTable.Column2 as CA1,
    MyTable.Column3 as CA2,
    MyTable.Column4 as CA3,
    MyTable.Column5 as CA4,
    MyTable.Column2 + CASE WHEN MyTable.Column3 > '' THEN '/' + MyTable.Column3 ELSE '' END + CASE WHEN MyTable.Column4 > '' THEN '/' + MyTable.Column4 ELSE '' END CA
    from MyTable;
    This query works just fine against SQL Server db, but gainst Oracle I'm getting
    ORA-00932: inconsistent datatypes: expected NUMBER got CHAR
    00932. 00000 - "inconsistent datatypes: expected %s got %s"
    Could you please let me know what I'm doing wrong. I need to get this query working on both SQL Server and Oracle..
    Please let me know your suggestions and thoughts..
    Cheers,

    I need to check whether Column 3, Column 4 are empty or not in that order..and if they values then I wanna append it to Column2. In Oracle, you can do it this way - no need to do all kinds of difficult things:
    select col2||col3||col4
      from tbl

  • Exe behaves inconsistently with input data into a cluster

    I'm on Labview 2011, SP1, so this may have been updated, but here's a quirk I discovered.
    I was reading a network shared variable on a remote machine (with 7 integers) into a labview built app (exe) and passing those integers to a cluster used for control.  Sometimes it worked, sometimes it didn't, so I figured I didn't understand shared variable enough (even though I had used them in the same situation many times).
    I switched to writing a file on that remote system, then reading that info into the same cluster.  Sometimes it worked, sometimes it didn't.  Tried all kinds of tricks, but any time there was a direct connection between that variable input data and the cluster, it was inconsistent.
    Turns out that the problem seemed to be the exe halting without error upon bundling the data into the cluster, but not every time. 
    So what finally got around the problem was writing the integers to a duplicate cluster, then using a local variable of that cluster to bundle those values into the  controlling cluster. 
    Once the path between network passed input data and controlling cluster was "double blind" to the application builder, the problem was gone.
    In case it makes some difference, the controlling cluster originated as a user control.

    Do you have a simple example that demonstrates the problem. I would like to test it on later versions.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Items in session state not behaving as expected

    And again...
    (I hope I'm not asking too much, posting 2 new questions in under 5 min....)
    This is something new I experienced: I need to show the value of an item (P210_EXTERNAL_ID) on a page (P215)
    ... not a big thing I thought... BUT when I tried to do this I hit the ground pretty rough (I thought I had actually gained some knowledge about html-db.)
    My problem is that I pass on a lot of values from P200 (the report) to P215 (the form) and I reached the limit of characters, that can be used to specify the link (to P215).
    So I thought to myself: Well, lets do it different!
    I tried:
    - specifying a default for the item on P215: P215_EXTERNAL_ID,
    - specifying the source for P215_EXTERNAL_ID,
    - creating a computation on P215_EXTERNAL_ID,
    - filling P215_EXTERNAL_ID 'manually' with a process...
    none of these did play the trick for me.
    (By the way, I used both syntaxes to reference :P210_EXTERNAL_ID and &P210_EXTERNAL_ID.)
    I used Display as Text (saves state) for the item on P215: P215_EXTERNAL_ID,
    the item on P210: P210_EXTERNAL_ID is a Text Field.
    The unexpected thing I experienced, was that the Item on P215 stayed empty or lagged behind:
    - visit P210 with P210_EXTERNAL_ID = 1234
    --- branch to P215 (P215_EXTERNAL_ID is empty)
    - revisit P210 with P210_EXTERNAL_ID = 5
    --- branch to P215 (P215_EXTERNAL_ID = 1234)
    - revisit P210 with P210_EXTERNAL_ID = 66
    --- branch to P215 (P215_EXTERNAL_ID = 5)
    After realizing this I took a look at the session (with the link at the bottom of each page).
    And in the Session State the value of P210_EXTERNAL_ID was the old value (always one behind)!!!
    Has anybody ever seen something like this??
    I'm really running out of ideas here.
    -David-

    Bill,
    Usually I use the pass-on-only-the-PK method too, but here I built something like a consolidated view on a table: one row in the report doesn't correspond to one row in the table, but a group of rows, that are located in the same freezer, same shelf, same rack and same box. So the PK woun't work here b/c I don't have one in the first place... But the thing with referencing other pages items might do the trick to bring down the number of other values I pass on.
    Another thought with the example:
    - visit P210 with P210_EXTERNAL_ID = 1234
    --- branch to P215 (P215_EXTERNAL_ID is empty)
    - revisit P210 with P210_EXTERNAL_ID = 5
    --- branch to P215 (P215_EXTERNAL_ID = 1234)
    - revisit P210 with P210_EXTERNAL_ID = 66
    --- branch to P215 (P215_EXTERNAL_ID = 5)
    When I click on the edit button on P210 to go to P215, is the page P210 not submitted?
    If that's the case, I understand why P210_EXTERNAL_ID in Session State has the last, but not the current value.... Since I branche off that page before submit, the items current values are not written to session state.
    Anyone any thoughts to that???
    -David-

  • Animation Window state save is inconsistent

    Photoshop 10-E does not consistently save the state of the animation window. Often it opens in Timeline mode, which means I have to set it to Frames mode, change the loop mode, and change the default frame timing, before I can even start work. I'm guessing that it's designed to save state because it does so about half the time. This is not a big issue but it's annoying and it's just one of many small annoyances that are making this version a pain in the *** to use.
    I've tried saving a workspace but it doesn't appear to save the state of the animation window, at least not consistently.
    Any suggestions about how to fix this?

    If your solution works for you, then thats all good. However, i'll add this for completion...
    Actually, the invokeLater in componentMoved does not always work in this case... it might seem to work all the time, but in reality, it's just luck that it's working. If you test it in enough environments, or with slower machines, you'll see what I mean.
    Basically, you are trying to time it so that the test for frame maximization occurs after the window state change event. However, the window state change events are caused by asynchronous native window events.. and if the machine is slow enough (or perhaps fast enough), the invoke later is executed too sonn, and it says the frame is not maximized when it is.
    You need to save the window location in componentResized, and rollback the save transaction when you hear a window state changed event from NORMAL -> BOTH_MAXIMIZED.

  • State Button behaving like Photoshop Smart Object?

    I've created a State button which I have copied across three panels in a tabbed panel widget. I assigned a link (file download) to the first button before duplicating the button across the next two panels. When I change any one instance of the link, the other two change with it. Is this the expected behaviour?

    Hi David,
    This is not the expected behavior. I have created the state button and applied a link to it and then paste it to the other tabs and then change the links and it seems to be working fine. I will recommend that you try to recreate another button and see if the same thing happens with the other button too.
    - Abhishek Maurya

  • User Administration behaving inconsistently,while Querying!

    Hi,
    I have installed a new EP6 SP9 instance with SR1 CD.I have also installed content management and collaboration.
    At the time of installation I got no error at all.The Portal,was installed and I was able to view the different feature in Portal.
    But,when I make a query for role(under User Adminstration),sometimes I get the result and sometimes,I see the following error message:Internet open the internet site http://......,i.e.the Portal url/irj/portal.Can you please tell me what I am to do and why this happens.This does not happen always even for the same query like when I search for a user under roles of User Administration.

    There are UME bugs in SPS 9.  I have Upgraded to SPS 11 Patch 3 and those bugs are gone.  MAKE SURE YOUE SAVE YOUR UME SETTINGS!  I lost them in the upgrade.  All user mappings, custom front page, GONE.  READ THE NOTES!
    SPS 12 is out.  I'm staying here at Patch 3 SPS 11 until I have to move, it is very stable and it fixed the bugs I had at SPS 9.

  • NODE_KEY_EXISTS" raised in /SAPAPO/CONSCHK

    Hello,
    We are running transaction /SAPAPO/CONSCHK in our SCM system v. 5.0.  When I click the "Object Selection" button using any selection criteria, I get the following short dump:
    Short text
        Exception condition "NODE_KEY_EXISTS" raised.
    Error analysis
        A RAISE statement in the program "CL_SIMPLE_TREE_MODEL==========CP" raised the
         exception condition "NODE_KEY_EXISTS".
        Since the exception was not intercepted by a superior
        program, processing was terminated.
    Information on where terminated
        Termination occurred in the ABAP program "CL_SIMPLE_TREE_MODEL==========CP" -
         in "ADD_NODE".
        The main program was "/SAPAPO/SAPLMVM_CONS ".
        In the source code you have the termination point in line 38
        of the (Include) program "CL_SIMPLE_TREE_MODEL==========CM001".
    The exception is raised in method add_node_int of Class CL_TREE_MODEL.
    Thank you for any help and suggestions.
    Kind regards,
    Chris

    The root cause seems to be inconsistency in the WorkArea selected.
    Quick of checking it is goto /SAPAPO/CONSCHK transaction enter the Planning version, Work Area and Consistency Profile and then click on Object Selection button. It should display the location-product combinations added in the WorkArea if it does not display that (most likely will generate a short dump) you need check the Work Area going into /SAPAPO/SCC02.
    Hope this helps.
    Somnath

  • Inconsistent behavior.. Unable to Unapply Prepayment

    Hello
    Im finding it hard to understand the reason why sometimes my Applied Prepayment was able to unapply and sometimes not.
    I've been testing a lot of invoices and guess what, it is so inconsistent with the result.
    can someone tell me what are the restrictions for applying prepayments? When in can be Unapply and when cannot to unapply?
    thanks
    jann

    Hi,
    There is no prerequisite for unapplying prepayment.
    Only issue can be if the prepayment was applied before upgrading then you have to use program "Unapply Preupgrade
    Prepayment".
    If its not before upgrade and system is behaving inconsistently, kindly raise SR.
    Regards,
    Chirag

  • How can i get the error message from the thrown/raised exception?

    DB version:10gR2
    Examples for this thread taken from
    Want Stored Procs to get exectuted regardless of preceeding SPs Success or
    I have a package with several functions and procedures inside.I created a caller procedure called callProcs, which will execute various procedures within the package in the appropriate order.
    In the below example i cannot get the error message thrown from line 20
    create or replace package body mypackage
    is
    variable_proc1 number;
    variable_proc2 number;
    variable_proc3 number;
    v_result       number;
    my_exception   exception;
    procedure proc1
    is
    begin
    select 8/0 into variable_proc1 from dual;
    exception
              when others
              then raise my_exception; ----line 20
    end;
    procedure proc2
    is
    begin
    select 1 into variable_proc2 from dual;
    exception
              when others
              then
                   null;
    end;
    procedure proc3
    is
    begin
    select 3 into variable_proc3 from dual;
    exception
              when others
              then
                   null;
    end;
    Procedure caller_proc
    is
    begin
    proc1;
    proc2;
    proc3;
    v_result:=variable_proc2+variable_proc3;
    dbms_output.put_line('The output is '||v_result);
    exception
              when my_exception
              then
    dbms_output.put_line('Heyyyyy the error is '||SQLERRM); -- exception caught at line 64 of caller proc
    end;
    end mypackage;
    When i try executing the caller proc, i don't get the error. Instead i get the text User-Defined Exception as shown below
    set serveroutput on
    exec mypackage.caller_proc;
    Heyyyyy the error is User-Defined Exception
    PL/SQL procedure successfully completed.Edited by: user10633418 on Mar 10, 2009 11:30 PM

    Thank you justin.
    Sorry my earlier post was a bit ambiguous.
    I wanted the error generated at proc1 to be captured at caller proc's Exception handling section (line 64) so that i could log the error to an ERR_LOG table.
    I can actually log this error at proc1 itself like
    exception
    when others
    THEN
    error_message :='My custom message for the particular proc '||SQLERRM;
    dbms_output.put_line(error_message);
    logerror(error_message); --an autonomous error logging proc
    raise;But there is a RAISE statement in proc1's exception handling, so the exception gets propogated to caller proc's exception handling section {color:#ff0000}*and another redundant row will be created at ERR_LOG table for the same error because there is a*{color}
    logerror(error_message);--an autonomous error logging proc
    in the WHEN OTHERS section of exception handling section of the caller proc
    I want to avoid the creation of this redundant row in ERR_LOG table.

  • USR_PROCESS_TRIGGERS or Response Tasks in OIM 9.1.0.2 seem inconsistent

    We have a scenario where an existing user is updated through trusted recon. The particular update needs to fire several unrelated adapters. For example, when a user is terminated in good standing in HR, they are given a grace period during which their resources will be disabled and at the end of the grace period their OIM account is disabled.
    So - USR_UDF_USR_HR_STATUS needs to fire:
    -Adapter to set deprovision date to 30 days
    -Adapter to block the user from their desktop (Active Directory resource)
    -Adapter to update OID attributes
    When we went live with OIM 9.1.0.2 BP 04, we put multiple rows in the Lookup.USR_PROCESS_TRIGGERS like:
    USR_UDF_USR_HR_STATUS -> Update HR Deprov Desktop
    USR_UDF_USR_HR_STATUS -> Update HR Set Deprov Date
    USR_UDF_USR_HR_STATUS -> Update HR Remove OID Attr
    Each adapter was appropriately configured in Process Tasks. This seemed to work fine. We have been up for 18 months and are now on BP 11. Now we see that occassionally one of the adapters does not seem to fire at all. When we go through debug logs in production, there is no mention of the adapter that did not fire.
    We found something in support.oracle.com that said that we should only have one adapter listed in Lookup.USR_PROCESS_TRIGGERS and the rest of the adapters should be Response Tasks (in the Process Task Definition). We have tried this but it still behaves inconsistently. So on the Process Task Integration, we now have adpHRDeprovDesktop and on Responses C - Two Tasks to Assign - Update HR Set Deprov Date and Update HR Remove OID Attr.
    But we still are not seeing correct results. In one recent case the adapter that did not fire was the one on Integration which makes no sense as to how the Tasks to Assign even ran.
    Have you seen this? What suggestions might you have?
    Thanks so much.

    You should not change the password through any means other than the APIs provided by the product. Doing any other way will only cause you a huge problem in the future if you do something wrong, or if you seek support on an issue around it.
    If you are not able to login, you can use the privateKey authentication while on the server and running the APIs. This will let you authenticate without supplying the password and perform any functions necessary.
    -Kevin

Maybe you are looking for

  • Duplicate entries in calendar and contacts

    I have many duplicate entries in my calendar and my contacts.  Deleting each one on my Z10 is very time consuming.  Is there a way to do this more efficiently, such as viewing the calendar and the contacts as a file on my computer, where editing woul

  • How to maintain colors through browsers?

    I take an image with my DSLR and open it with the RAW plug-in. I change the color profile from Adobe RGB 1998 to sRGB and reduce the color depth from 16bit to 8bit. Everything is fine until I go to Save for Web...my colors are all washed out. I choos

  • Where can I buy Skin/headphone adaptor for 1G iphone?

    Hi Everybody I've just got my first iphone! WauuuW. I need a good Black plastic or rubber cover for my iPhone, and I need a short minijack cord to connect my own headphones for this loverly thing Please send a link to the apple store or another websi

  • LOADING  DATA   FROM  SAP  CO  TRANSACTION  DATA

    Hello BW gurus, Suppose if BW Implementation team has decided to use the 0CO_OM_CCA_1 standard Data Source and Info Source to extract CO   transaction data from SAP R/3 system into BW system . 1)For the above scenario, How to create a Data Source for

  • IPod 2g and OS 4.1 and WiFi

    Hi, Does anyone know if 2g and os 4 are compatible and what snags I can expect if any? And also if the WiFi constantly on issue has been resolved from earlier os 4 releases? Thanks, Dave