How to get line error from a procedure?

Hello,
I want to know the line where the error occurs, since when I treat the exception to show a user friendly error page this erro is not logged at OAS.
How to do it?
Thanks in advance.
EXCEPTION WHEN OTHERS THEN
HTP.P('Sorry');
emailme(SQLERRM);
emailme(line where erro occurs);???????
END;
null

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Paula Bronfman ([email protected]):
Hello,
I want to know the line where the error occurs, since when I treat the exception to show a user friendly error page this erro is not logged at OAS.
How to do it?
Thanks in advance.
EXCEPTION WHEN OTHERS THEN
HTP.P('Sorry');
emailme(SQLERRM);
emailme(line where erro occurs);???????
END;
<HR></BLOCKQUOTE>
Hi;
your best bet would be to set a variable in the procedure every 10 lines or so, and email the contents of that var.
begin
mydebug:=0;
mydebug:=10;
when others then
emailme(SQLERRM&#0124; &#0124;' '&#0124; &#0124;mydebug);
end;
Cheers
Paulo

Similar Messages

  • How to get actual error from Crystal Report

    We are using Crystal report in web service.
    We faced some problem due to crystal report unexpected error.
    Refer the below error message.
    Xception E NSF NSFZ1100 20100608 145511565 GPRAB0 : GPRZ10 GUEC0001 [1] AbstractService Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
    Xception E NSF NSFZ1100 20100608 145511972 GPRAB0 : GPRZ10 GUEC0001 [1] AbstractService at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
    at System.Windows.Forms.MessageBox.Show(String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon)
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e, Boolean suppressMessage)
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e)
    at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPageNumber()
    at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPage()
    at CrystalDecisions.Windows.Forms.DocumentControl.ShowLastPage()
    at CrystalDecisions.Windows.Forms.PageView.ShowLastPage()
    at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.TotalPageCount(ReportDocument Rpt)
    at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.Print(BaseReport RptDefinition)
    at Biz.Nissan.Cats.CORE.REPORT.MCTLIST260Print.Print(IFData ifData)
    at Biz.Nissan.W3.CATS.BC.Service.DistributeService.ExecuteMpp()
    How we get the actual error from crystal report?
    Thanks in Advance

    Same as
    crystal report unexpected error in Web service (IIS)
    Closing this thread.
    Ludek

  • How to get a resultset from Stored Procedures

    How to efficiently and portably get resultsets from Oracle stored procedures? Oracle does not seem to follow JDBC standards here. A standard way in Oracle is to use a ref cursor and call getObject() on CallableStatement. However, Oracle seems to get all the data in the resultset in getObject(), which is inefficient and leads to large memory usage when the resultset is large.
    Another way in Oracle is to use getCursor() on an OracleCallableStatement, which is efficient but not portable across different application servers. For example, in WebSphere, this OracleCallableStatement is not available if we want WebSphere to manager the datasource.
    Any ideas will be greatly appreciated. Please email to [email protected]

    Oracle JDBC did not support return a result set, if you are using Oracle 9i, you can use pipeline function, then using the TABLE() function the get the row.
    Good Luck.
    Welcome to http://www.anysql.net/en/

  • How to get return values from stored procedure to ssis packge?

    Hi,
    I need returnn values from my stored procedure to ssis package -
    My procedure look like  and ssis package .Kindly help me to oget returnn value to my ssis package
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: <Author,,Name>
    -- Create date: <Create Date,,>
    -- Description: <Description,,>
    -- =============================================
    ALTER PROCEDURE [TSC]
    -- Add the parameters for the stored procedure here
    @P_STAGE VARCHAR(2000)
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    -- Insert statements for procedure here
    --SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
    truncate table [INPUTS];
    INSERT
    INTO
    [INPUTS_BASE]
    SELECT
    [COLUMN]
    FROM [INPUTS];
    RETURN
    END
    and i am trying to get the return value from execute sql task and shown below
    and i am taking my returnn value to result set variable

    You need to have either OUTPUT parameters or use RETURN statement to return a value in stored procedures. RETURN can only return integer values whereas OUTPUT parameters can be of any type
    First modify your procedure to define return value or OUTPUT parameter based on requirement
    for details see
    http://www.sqlteam.com/article/stored-procedures-returning-data
    Once that is done in SSIS call sp from Execute SQL Task and in parameter mapping tabe shown above add required parameters and map them to variables created in SSIS and select Direction as Output or Return Value based on what option you used in your
    procedure.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to get app.processId from Guided Procedures? Please I need You help

    Hi everyone, I need your help, I need to recover the processId once time the Procees was started in Guided Procedures
    I found this link from maintenance process in Guided Porcedures administration
    http://host:port/webdynpro/dispatcher/sap.com/cafeugpui~rt/Runtime?app.processId=IDnumber
    the parameter I need is IDnumber, I dont know if it is possible with web dynpros or with web services please I need you help
    How Can I do this?
    Thank you very much my friends
    Regards from Mexico
    Atte Israel

    Hi,
    I am not sure about the version. But you can follow the steps below.
    1. Create a Web Dynpro Poroject (Ideally create a DC , but if you don't have NWDI setup a project will do).
    2. Add reference to com.sap.security.api.jar and sap.comcafeugpapi.jar
    3. Under WebDynpro References -> Library References add sap.com/cafeugp~api
    4. Put following code in wdDoInit()
    public void wdDoInit()
        //@@begin wdDoInit()
         IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
         IWDMessageManager msgMgr= wdComponentAPI.getMessageManager();
         try{
         IWDClientUser wdUser = WDClientUser.getCurrentUser();
         IUser user = wdUser.getSAPUser();
         IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(user);
         Date startDate = new Date(110,1,1); // Start date as 01-Jan-2010
         Date endDate= new Date(111,12,31); // End date as 31-Dec-2011
         IGPProcessInstanceInfo[] array = rtm.getRunningInstances(GPSearchRole.SEARCH_ROLE_OWNER, startDate, endDate, userContext);
         for (int i=0; i<array.length; i++){
         String instanceId = array<i>.getProcessInstanceID();
    //        Write logic to pass the instance ID to the RFC
    msgMgr.reportSuccess("Instance id =" + instanceId);
         catch(Exception ex)
         msgMgr.reportException(ex.getLocalizedMessage(),false);     
        //@@end
    Let me know if you face any issues.
    Thanks
    Prashant

  • How to get Line number from a DOM Element

    Hi
    I am using dom xerces parser. Is there anyway to work out which line number a element will be when it is outputted into a file ??

    org.w3c.dom.DOMLocator method getLineNumber() returns the line number at which an error occurs.
    A corrresponding method for file output is not defined.

  • How to get the Error message from hr_contact_rel_api.create_contact

    Hello All,
    I am using this API for creating a contact for an employee in R12.
    But, some times i am not able to create the contact successfully, and Unable to figure out proper reason for record erroring out.
    I dont find any out msg data variables for this API in order to check it for the Error.
    So, can any body help me how to get the ERROR Message for such APIs.
    Thanks inAdvance,
    Amarnadh Js

    user12243334 wrote:
    solved the issue on myselfIt would be nice if you could share the solution with us.
    Thanks,
    Hussein

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi
    One of the parameter passed to the function is
    FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
    pi_flag_codes will be passed a value in this way '(25,23,35,1)'
    How to get each value from the string
    like 25 first time
    23 second time
    35 third time
    1 fourth time
    I need to build a select query with each value as shown below:-
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 25 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 23 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
    (SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
    ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 35 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
    group by t2.org_id) q3,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 1 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
    Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.

    chris227 wrote:
    I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
    select
    regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
    from dual 
    S1     S2     S3     S4
    "25"     "23"     "35"     "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
    If t2.att_type is type of number you will do:
    t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
    I am using oracle 10g.
    In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
    say 25 is at 1 position.
    23 is at 2
    35 is at 3
    1 is at 4.
    the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
    Please see the code I wrote for it, But the select query is having error:-
    BEGIN
    IF(pi_flag_codes IS NOT NULL) THEN
    SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
    *(SELECT '(25,23,35,1)' V_CNT  FROM dual);*
    DBMS_OUTPUT.PUT_LINE(V_CNT);
    -- V_CNT := 3;
    FOR L_CNT IN 0..V_CNT LOOP
    if L_CNT=0 then
    V_S_POS:=1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
    else
    V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
    end if;
    if L_CNT=V_CNT then
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
    else
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
    end if;
    VN_ATYPE := ' t2.att_type = ' || V_ID;
    rec_count := rec_count +1;
    query_no := 'Q' || rec_count;
    Pls help me with fetching each value to build the where cond of the select query along with the query number.
    Thank You.

  • How to get string value from xml in JSF??

    In JSF How to get string value from xml, .ini and properties file. I want to get string value from xml or text to JSF

    Just use the appropriate API's for that. There are enough API's out which can read/parse/write XML, ini and properties files. E.g. JAXP or DOM4J for xml files, INI4J for ini files and Sun's own java.util.Properties for propertiesfiles.
    JSF supports properties files as message bundle and resource bundle so that you can use them for error messages and/or localization.

  • How to get a value from JavaScript

    How to get return value from Java Script and catch it in c++ code. I have tried following code, but its not working in my case.
    what I want is if it returns true then call some function if it returns false then do nothing, so how to get those values in c++
    ScriptData::ScriptDataType fDataType = resultData.GetType();
    if (fDataType == kTrue)
           CAlert::InformationAlert("sucess");
           //call some function
                        else
                                  CAlert::InformationAlert("Error");
         // do nothing
    JavaScript Code:
        if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
               alert(value);
                return true;
      else
               alert ("SORRY");
               return false;

    How to get java script result into JSResult i m not getting it.
    I have wriiten follwing code in c++ :
              WideString scriptPath("\\InDesign\\Source1.jsx");
              IDFile scriptFile(scriptPath);
              InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFi le));
              if(scriptRunner)
                        ScriptRecordData arguments;
                        ScriptIDValuePair arg;
                        ScriptID aID;
                        ScriptData script(scriptFile);
                        ScriptData resultData;
                        PMString errorString;
                        KeyValuePair<ScriptID,ScriptData> ScriptIDValuePair(aID,script);
                        arguments.push_back(ScriptIDValuePair);
                        PMString paramkeyname1;
                        Utils<IScriptArgs>()->Save();
                        Utils<IScriptArgs>()->Set("paramkeyname1",scriptPath);
                        Utils<IScriptUtils>()->DispatchScriptRunner(scriptRunner,script,arguments,resultData,erro rString,kFalse);
                        Utils<IScriptArgs>()->Restore();
                        ScriptData::ScriptDataType fDataType = resultData.GetType(); // here i should get true or false which i m passing it from javascript code......not as s_boolean
                        if (fDataType == kTrue)
                                       //CAlert::InformationAlert("sucess");
                                     iOrigActionComponent->DoAction(ac, actionID, mousePoint, widget);
                        else
                                    this->PreProcess(PMString(kCstAFltAboutBoxStringKey));
    Java script code:
    function main()
           var scrpt_var;
           var scriptPath,scrptMsg;
           var frntDoc=app.documents[0];
           if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
                alert(value);
                 return true; // i want this value i should get in c++ code...How to get these values in c++
           else
              alert ("Error");
              return false; // i want this value i should get in c++ code...How to get these values in c++

  • How to get textfield values from a tableRowGroup

    I have textfield in a table.
    my problem is
    How to get textfield values from a tablerowgroup1.

    I have created getQuantity and setQuantity properties in my session bean and mapped text property of tabletextbox to session bean quantity.
    also used map to set and reatrieve quantity values.
    I am getting error for bean type quantity.

  • How to get purchasing data from SAP R/3 to OWB (Oracle warehouse builder).

    Hi,
    My name is Pavan Tata. I work as a SAP BW developer. Here is the situation at my client place. Client decided to retire BW system and wants to replace with OWB(Oracle warehouse). In all this currently we have purhchasing application in BW production system and wants to move this application to OWB for the same type of reporting what they are getting currently.
    Here is my question:
    How to get purchasing data from SAP R/3 to OWB(Warehouse) with initial full loads and deltas mechanism in the same way as we do in BW.
    Please help on this, also send me any documentation about this if you have.
    Thanks,
    Pavan.

    Hello,
    here is a short report which converts S012 entries to strings with separator semicolon. Perhaps this will help you?
    Regards
    Walter Habich
    REPORT habitest2 LINE-SIZE 255.
    TYPES:
      strtab_t TYPE TABLE OF string.
    CONSTANTS:
      separator VALUE ';'.
    DATA:
      it_s012 LIKE s012 OCCURS 0,
      wa_s012 LIKE s012,
      strtab TYPE strtab_t,
      strele TYPE string.
    SELECT * FROM s012 INTO TABLE it_s012 UP TO 100 ROWS.
    PERFORM data_to_string
      TABLES
        strtab
      USING
        'S012'. "requires it_s012 and wa_s012
    LOOP AT strtab INTO strele.
      WRITE: / strele.
    ENDLOOP.
    *&      Form  data_to_string
    FORM data_to_string TABLES strtab TYPE strtab_t
                        USING  ittab TYPE any.
      DATA:
        h_zaehler TYPE i,
        line_str TYPE string,
        l_tabellenname(10) TYPE c,
        l_arbeitsbereichsname(10) TYPE c,
        h_string TYPE string,
        h_char(255) TYPE c.
      FIELD-SYMBOLS: <l_tabelle> TYPE ANY TABLE,
                     <l_arbeits> TYPE ANY,
                     <feldzeiger> TYPE ANY.
      CLEAR strtab.
      CONCATENATE 'IT_' ittab INTO l_tabellenname.
      ASSIGN (l_tabellenname) TO <l_tabelle>.
      CONCATENATE 'WA_' ittab INTO l_arbeitsbereichsname.
      ASSIGN (l_arbeitsbereichsname) TO <l_arbeits>.
      LOOP AT <l_tabelle> INTO <l_arbeits>.
        CLEAR: h_zaehler, line_str.
        line_str = ittab.
        DO.
          ADD 1 TO h_zaehler.
          ASSIGN COMPONENT h_zaehler OF
            STRUCTURE <l_arbeits> TO <feldzeiger>.
          IF sy-subrc <> 0. EXIT. ENDIF.
          WRITE <feldzeiger> TO h_char LEFT-JUSTIFIED.          "#EC *
          h_string = h_char.
          CONCATENATE line_str separator h_string INTO line_str.
        ENDDO.
        APPEND line_str TO strtab.
      ENDLOOP.
    ENDFORM.                    "data_to_string

  • As soon as I login with iChat, I get an error from MobileMe!

    Hey, I've had this issue for a while, and my work around for it was just not using iChat. However, I want to use iChat now so I need a proper resolution. Now I have mobile me with my [email protected] address, and I have my iChat account with [email protected] (created before my MM subscription).
    When I log into iChat for the first time, within minutes I get an error from MobileMe saying "You've entered an incorrect password for MobileMe, please try again"... I didn't do anything though.
    If I go to MobileMe in System Preferences, it says: "Your password has changed. Enter your new password.
    If you have not changed (or reset) your password contact MobileMe support."
    If I enter my password in and get that fixed, the next time I start up iChat it says: "Your login ID or password is incorrect"... soo I'm confused.
    The password for my @me and @mac addresses are different, is it possible they are sharing the same keychain? I do have the check box ticked to remember the password.
    Any idea's?

    Hi,
    I would not repair at this time.
    In the list of password you should find the one for iChat Or possibly several for iChat if you have different Account/Screen Names list by their Account names.
    Double click on the one that is causing you issue.
    In the new window that pops up put a tick in the Password Box. You will probably have to confirm with your Admin Password to Allow Once.
    Does this show the right password ?
    If not change the Password.
    If it does then click the Access Tab and see if iChat is Allowed (Or Allow All is being used)
    Either change to Allow All or add iChat to the List.
    7:45 PM Saturday; April 3, 2010
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • I just tried updating to iTunes 10.7 on my pc and when I try to launch it I get this error message-The procedure entry point AVCFPlayerSetDirect3DDevice could not be located in the dynamic library AVFoundationCF.dll.  Any Ideas?

    I just tried updating to iTunes 10.7 and when I try to launch it I get this error message-The procedure entry point AVCFPlayerSetDirect3DDevice could not be located in the dynamic library AVFoundationCF.dll.  Them it tells me to re-install iTunes and the same thing happens again.  Any Ideas?

    Taken at face value, you're having trouble with an Apple Application Support program file there. (Apple Application Support is where single copies of program files used by multiple different Apple programs are kept.)
    Let's try something relatively simple first. Restart the PC. If you're using Vista or 7, now head into your Uninstall a program control panel, select "Apple Application Support" and then click "Repair". If you're using XP, head into your Add or Remove Programs control panel, select "Apple Application Support", click "Change" and then click "Repair".
    If no joy after that, try the more rigorous uninstall/reinstall procedure from the following post. (If you've got XP, although the procedure is for Vista and 7, just read "Computer" as "My Computer", read "Uninstall a program control panel" as "Add or Remove programs control panel" and assume the system is 32-bit, and you'll be doing the right things.)
    Re: I recently updated to vista service pack 2 and I updated to itunes 10.2.1 and ever

  • How to get Application Error descriptions

    Hi, all:
    Our interface has ECC system involved.
    The Message Monitoring in local integration engine shows that there are many messages with application errors.
    I would like to export all messages with application error:
    include message ID and error text.
    Right now, I can export the data from Message monitoring window, but I can not get application error from exported spreadsheet. anyone has idea how to do it ?
    Thanks in advance !
    Liang Ji

    Hi, venkata:
    Thanks for you reply.
    Our scenario is
      ThirdPartySystem ---> SOAP ---> XI ---> ECC (ABAP Proxy)
      Technically, the scenario is running perfect.
    After go-alive, there are many application errors because of the data problem,  e.g.:
    Cannot create order. Service order number already exist
    We know these problem are caused by conversion, now I would like to track each message, so I exported to spreadsheet from Message monitoring.
    But the exported spreadsheet does not include Application Error text, this is the reason I post the question here, do you have idea about it ?
    Thanks
    Liang

Maybe you are looking for

  • How much RAM can my Macbook 13.3 inch take?

    Hi there, I'm looking to upgrade my Macbook's RAM and was wondering what the maximum capacity for it was? It is one of the older white ones : http://microdream.co.uk/apple-macbook-white-13-3-a1342-core-2-duo-2-26ghz-2gb-ra m-250gb-superdrive-notebook

  • Adding a Formview in a rich client application---urgent

    Hello, I am developing an XML editor as an eclipse plugin as a rich client application I want to add a form view to it... I have followed every instruction of this tutorial http://www.eclipse.org/articles/Article-Forms/article.html But the project do

  • Which Listener I should use if I drag and Drop an image/icon into a JPanel?

    Dar Friends: Happy new year. I try to drag and Drop an image/icon into a JPanel, and hope I can immediately detect it after DND, Which Listener I should use in this JPanel if I drag and Drop an image/icon into a JPanel?? Thanks

  • Unix scripting in java

    hello im new to java. and i need to learn unix scripting in java. is it difficult to learn? can one learn it within a short span of time?! could anyone please give me some links where i can learn. tks

  • How to get "nokia software updater"

    I see many posts recommendind to use nokia software updater for resolving the problems with the lumia amber update. whereto download NSU officially from?