Is there a way to handle system exception ERROR_MESSAGE?

Hi,
I have a program executed in background, which produces a bunch of consecutive documents for a set of Bulk Shipments -> TD Loading and TD Delivery Confirmation. To create those documents I use function modules 'OIGI_LOADING_CREATE' and 'OIGI_DEL_CONF_CREATE'  - both from Industry-Solution Oil-and_Gas (IS-Oil).
In some cases these FM-s produces error messages (E-type) which cancel execution of the program and broke my flow-logic.
Below are few messages recorded in a job log for my task:
18.08.2005 15:56:41 Job started                                                                         
18.08.2005 15:56:41 Step 001 started (program /PTRL/TAS_POSTPONDED_SYNC, variant , user name IMUTAFCHIEV)
18.08.2005 15:56:58 Shipment 180753 saved                                                               
18.08.2005 15:57:06 The plant data of the material 177 is locked by the user BMINKOV                    
18.08.2005 15:57:06 The plant data of the material 177 is locked by the user BMINKOV                    
18.08.2005 15:57:06 The plant data of the material 177 is locked by the user BMINKOV                    
18.08.2005 15:57:06 Job cancelled after system exception ERROR_MESSAGE                                  
Both function modules are not designed to handle any exceptions, and in owr environment (4.6c) there is no documented system exception 'ERROR_MESSAGE' which to be handled in CATCH-ENDCATCH block.
Is there a way to handle this exception and to track the list of error messages produced by some FM into an internal table, log, whatever, as it is done in the log of the background job. I need to find a way write these messages in my log-tables and to proceed further with my flow-logic.
FYI: my program executes an RFC call to a remote system and retrieve a list of documents which need to be synchronized with R/3. I loose information, if the R/3 broke my flow-logic.
Any help would be highly appresiated.
Many thanks in advance.
Ivaylo Mutafchiev

Sven,
I made few programs where we used business scenario:
IS-Oil Shipment => IS-Oil Loading Confirmation => IS-Oil Delivery Confirmation.
All of them are based on Function Module call:
1. OIGI_LOADING_CREATE and
2. OIGI_DEL_CONF_CREATE.
To load shipment I call 1st FM in a way:
  CALL FUNCTION 'OIGI_LOADING_CREATE' DESTINATION 'NONE'
       EXPORTING
            I_SUBRC     = 9  "save and commit
            I_SHNUMBER  = shNumber
            I_VEHICLE   = vehicle
            I_LDPLT     = plant
            I_LDDATE    = loadDate
            I_LDTIME    = loadTime
            I_LDCDAT    = loadDate
            I_VEH_NR    = veh_nr
       TABLES
            T_OIGISVMQ  = quantity_items
            T_OIGISVMQ2 = hpm_append
            T_OIGISIQ   = doc_quan_items
       EXCEPTIONS
            COMMUNICATION_FAILURE = 1 MESSAGE p_error
            SYSTEM_FAILURE = 2 MESSAGE p_error.
To confirm shipment (status 4) I call the same FM with:
  CALL FUNCTION 'OIGI_LOADING_CREATE' DESTINATION 'NONE'
       EXPORTING
            I_SUBRC    = 39  "confirm & commit 2nd step
            I_SHNUMBER = shNumber
            I_VEHICLE  = vehicle
            I_LDPLT    = werks
       EXCEPTIONS
            COMMUNICATION_FAILURE = 1 MESSAGE sh_error
            SYSTEM_FAILURE = 2 MESSAGE sh_error.
And finaly to finish process (status = 6) I call 2nd FM in a way:
  CALL FUNCTION 'OIGI_DEL_CONF_CREATE' DESTINATION 'NONE'
       EXPORTING
            I_SUBRC         = 19  "save, confirm and commit
            I_SHNUMBER      = shNumber
            I_RAPID_CONFIRM = 'X'
            I_DDCDAT        = loadDate
            I_DLDATE        = loadDate
            I_DLTIME        = loadTime
       EXCEPTIONS
            COMMUNICATION_FAILURE = 1 MESSAGE p_error
            SYSTEM_FAILURE = 2 MESSAGE p_error.
FYI: It tooks me some time to 'investigate' and find correct use of these function modules. And I worked VERY CLOSE with our SD consultant.
For details (what the export parameters and tables consist of) and sample code, please contact me at:
ivaylo dot mutafchiev at vbs dot bg
I would be glad to share my knowlege.
Regards,
Ivaylo

Similar Messages

  • Handle System-Exception ERROR_MESSAGE

    Hello everybody,
    the problem I want to solve looks as follows:
    I have an ABAP report that is runnng as Batch-job (imagine a frame within certain reports run).
    The program runs, as customised, the whole day continuesly as a batch-job . At customised intervals it checks some conditions and "submits" other reports also in the same instance of the Batch-job and waits for them to "return".
    Within the process/stack of a submitted, second  report any messages are posted in certain application logs (BALLOG).
    Every message that usually would come to the display is suppressed by FuBa "DIALOG_SET_NO_DIALOG" and "DIALOG_SET_WITH_DIALOG". This is necessary because else the Batch-job would crash as you know.
    However, in the endless downs of SAP there is a location where an "E" message raises and the whole job crashes with "A" because of system exception "error_message".
    The second job crashes and aborts the whole job without returning to the caller report.
    This happens maybe once in a week or once a month, very unregular.
    The location is not to be found!
    Is is okay that the submitted, second report aborts.
    But it is absolutely necessary that the first report still runs after the second one crashed and the batch job still must stay active.
    How can I prevent that the wohle job aborts?
    Any idea (simple/complicated) is welcome.
    Thanx
    Frank

    Hi,
    in fact I still investigate if I have solved the problem.
    In my case the reason seems to be related to my "long" running job and the changes of the "Operation Mode" during the job-runtime.
    Old runtime settings were 00:05 - 23:50...
    Current operation modes   06:00 - 20:00 daytime
                              20:00 - 06:00 night processing
    New runtime settings are  06:05 - 19:50 and
                              20:05 - 05:50
    The goal was that the job is not active during the change of the operation mode.
    Until today it works fine...
    Check OSS 35615 & 93732 and other similar related hints.

  • How to handle system exception in Sync communication without BPM? Help!

    Hi Experts
       I have a Synchronous scenario in XI: webservice <------>RFC SAP R/3.
      Webservice is making a sync call to RFC FM in SAP R/3 system.
       I want to handle system exception when SAP R/3 is down and send an email alert.    
       Can I achieve this in graphical mapping without BPM? How? Kindly provide necessary steps/screenshots for the same.
       Are there any other alternatives for handling system exception apart from mapping and BPM?  
    Thanks
    Gopal

    Hi GopalKirshna,
          Yes,You can handle the Exception if at all you are using the RFC.You can achieve this without using BPM.
       Using Fault message you can catch the System Exception and even the primary role for Fault Message is to catch the RFC Exceptions.
       Please refer the Fault messages Notes to achieve this you will understand better.
    Hope I am clear.
    Please let me if you have any more queries regarding this..!
    Thanks and Rewards,
    Chandu.

  • How to handle system exception.

    Hi,
    Following is the scenrio of my setup.
    Sender : WebService call ( SOAP adapter)
             Interface : sync , outbound
    receiver : RFC
             Interface : sync , inbound.
    I want to catch the system exception if occured on XI(like mapping , deleiveryexception (rfc) , any other runtime exception)
    Is there any way to catch these exception and send it to sender system as webService response.
    Any help would be greatly appricated!!!

    Hi Samir,
    If you are calling a BAPI or RFC program from a web service, then you should be able to see the BAPI/RFC error/error code on the RETURN part of the RFC response message. So it is just a matter of map the correct fields to your web service response.
    For other kind of errors e.g. errors due to mapping problems/connectivity problems etc.. You need to implement error tracing (in this case sending errors back to the client) by yourself in the SWC.
    Cheers,
    Rob

  • Is there any way to handle the navigation without defining it in faces-conf

    hi,
    I am new to JSF and I got lots of information from this forum. My new query is given below,
    Is there any way to handle the navigation without defining it in faces-config.xml file? That means i want to navigate to a destination page programatically from the java class rather than declaring it it faces-config.xml file.
    Your help and suggestions are hightly appreciated...
    Thanks and regards,
    Sudheesh K S

    JSF as defaault looks your *-config.xml files in your web.xml configuration or default faces-config.xml file. If do not use default look third party tools like seam or others....                                                                                                                                                                                                                                                                                                                                                                   

  • Job cancelled after system exception ERROR_MESSAGE

    Hello all
    I am facing the following issue.
    A custom report is schedulled and run as backround job. The report should create a txt file on server.
    The report works fine in foreground, but as backround job ends up cancelled all the time.
    The job log:
    Job log overview for job:    VI5 / 13072800
    Date       Time     Message text                                                                     Message class Message no. Message type
    27.03.2009 13:09:28 Job started                                                                           00           516          S
    27.03.2009 13:09:28 Step 001 started (program ZESSRIN110R, variant PR1_0000381, user ID METAPARTNER)      00           550          S
    27.03.2009 13:09:28 File creation ERROR:                                                                  00           001          E
    27.03.2009 13:09:28 Job cancelled after system exception ERROR_MESSAGE                                    00           564          A
    There is no info in SM21 regarding the error.
    Can anybody help with this?
    Thanx in advance.
    imi
    Edited by: Imrich Vegh on Mar 27, 2009 2:27 PM

    btw the part of my code  looks like this:
    server path check
        IF p_srv IS NOT INITIAL.
          OPEN DATASET gv_server FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
          IF sy-subrc EQ 0.     --- I keep receiving 8 here in BACKGROUND JOB
            WRITE : / text-077,  gv_server.
          ELSE.
            MESSAGE text-069 TYPE 'E'.
          ENDIF.

  • Job cancelled after system exception ERROR_MESSAGE in DB13

    Hello All,
    When i opened the t-code DB13 i saw that this job "Mark tables requiring statistics update" is cancelled.
    JOB LOG:
    12.02.2011  22:00:16  Job started
    12.02.2011  22:00:16  Step 001 started (program RSDBAJOB, variant &0000000000085, user ID 80000415)
    12.02.2011  22:00:18  Job finished
    12.02.2011  22:00:18  Job started
    12.02.2011  22:00:18  Step 001 started (program RSADAUP2, variant &0000000000081, user ID 80000415)
    12.02.2011  22:01:26  Error when performing the action
    12.02.2011  22:01:26  Job cancelled after system exception ERROR_MESSAGE
    When check for the BGD Job in SM37 for this job i found the same error in the job log with the status cancelled.
    Job log overview for job:    DBA!PREPUPDSTAT_____@220000/6007 / 22001700
    12.02.2011 22:00:18 Job started
    12.02.2011 22:00:18 Step 001 started (program RSADAUP2, variant &0000000000081, user ID 80000415)
    12.02.2011 22:01:26 Error when performing the action
    12.02.2011 22:01:26 Job cancelled after system exception ERROR_MESSAGE
    I couldn't find any logs in SM21 of that time also no dumps in ST22.
    Possible reason for this error:
    I have scheduled the job Check database structure (only tables) at some other time and deleted the earlier job which was scheduled during the bussiness hours which caused performance problem.
    So to avoid performance issue i scheduled this job in the mid night by cancelling the old job which was scheduled during the bussiness hours.
    And from the next day i could see this error in DB13.
    Rest all the backups are running fine but the only job getting cancelled is for "Mark tables requiring statistics update"
    Could anyone tell me what should i do to get rid of this error?
    Can i schedule this "Mark tables requiring statistics update" again by deleting the old one?
    Thanks.
    Regards.
    Mudassir Imtiaz

    Hello Adrian,
    Thanks for your response.
    Every alternate day we used to have performance issue at 19:00hrs.
    Then when i checked what is causing this problem, i discovered that there was a backup "Check Database Structure (tables only)" scheduled at this time and it was mentioned that this backup may cause performance issue.
    Then i changed "Check Database Structure (tables only)" the time of this backup to 03:00hrs.
    The next day when i checked DB13 i found that one of the backups failed.
    i.e. "Mark Tables Requiring Statistics Update"
    Then i checked the log which i posted earlier with the error: "Job cancelled after system exception ERROR_MESSAGE"
    I posted this error here and then i tried to delete the jobs scheduled i.e. "Mark Tables Requiring Statistics Update" and then re-schedule it at the same time and interval.
    And then it started working fine.
    So i just got curious to know the cause of the failure of that job.
    Thanks.
    Regards,
    Mudassir.Imtiaz
    P.S There is one more thing which i would like to say which is not related to the above issue, and m sorry to discuss this in this thread.
    I found a few Bottlenecks in ST04 with Medium and High priority.
    Medium: Selects and fetches selectivity 0.53%: 122569 selects and fetches, 413376906 rows read, 2194738 rows qualified.
    High: 108771 primary key range accesses, selectivity 0.19%: 402696322 rows read, 763935 rows qualified.
    There are a lot these.
    I would really appreciate if you tell me what is the cause for these Bottlenecks and how to resolve.
    Thanks a lot.

  • Error when executing APD-Job cancelled after system exception ERROR_MESSAGE

    Hi,
    We have a process chain which executes a APD using an ABAP program RSAN_PROCESS_EXECUTE.
    It was executing successfully until few days back but now a days frequently once in 3 days roughly it is getting cancelled during execution of ABAP Program with the message 'Job cancelled after system exception ERROR_MESSAGE'
    checked st22 and sm21 but didn't get any clue.But if we execute the same process chain manually(Immediate load) it is working fine all the times.
    What may be the reason for the cancellation of the chain sometimes and the same chain working fine some other time and working very much fine when ran manually.
    Regards,
    Vishnu

    Hi Vishnu,
    Can you check if there are any other process which is triggering the abap program RSAN_PROCESS_EXECUTE at the same time as the execution of this process in the chain.  You can check in which other chains this process is being used.  You can compare the time when this failed in the chain you mentioned with the same being run in other chains at the same time.
    Sasi

  • System exception ERROR_MESSAGE

    Hi,
    A job is getting cancelled and here is the error message
    Job started
    Step 001 started (program RSPROCESS, variant &0000000043030, user ID ALEREMOTE)
    Error sending message to network administrator.
    Job cancelled after system exception ERROR_MESSAGE
    Regards,
    Rajiv

    HI Rajiv,
    when the job is getting cancelled it might have thrown some dump in the system in ST22.
    Please let us know about the dump so that we can analyse further.
    Basic checking:
    Check whether there are any locks
    check for the table space.
    check for the RFC connection
    Check for TRFC in sm58
    Regards,
    Vikram

  • Reg:job cancelled after system exception ERROR_MESSAGE

    Hi All,
    Process chain has failed in aggregate step with message "job cancelled after system exception ERROR_MESSAGE"
    But i manaully done the aggregate step.
    But i would like to know the reason for the above message.
    Can any one tell me this?
    Thanks
    SS

    Hi,
    In the job log of aggregate step in the above line of the message "job cancelled after system exception ERROR_MESSAGE" you will probably find the exact error message.
    In the job log it will first display the exact error message and then the message "job cancelled after system exception ERROR_MESSAGE" will appear, Please check it once.

  • Job cancelled after system exception ERROR_MESSAGE - Why ?

    Hi to all,
    Anyone knows why, when I execute a program in foreground, everything is ok . When I try to execute it in background (schedulated in a job ) I obtain "Job cancelled after system exception ERROR_MESSAGE
    Message no. 00564" 
    I have a check in 'at selection-screen event' to control "no data output" with an custom error message.
    I really don't understand why job is cancelled !
    Any ideas ?
    Thanks in advance .

    Hi,
           Write your message after start-of-selection.
           Instead of putting an error message you can write the message while executing the program in background.
            after select .......
            if sy-subrc <> 0.
              if sy-batch = 'X'.
                write :/ 'No data found'.
             else.
               message e000 with 'No data found'.
            endif.
         endif.
    Regards,
    Srini.

  • System-exception error_message 00564

    Hello,
    I want to Filling in the Setuptable for LES - Transportation -  Carry Out Restructure in TA sibw but every time the backup job stops with
    system-exception error_message 00564
    Who could help, please?!
    Thanx in advance

    Hi Nathan,
    R u installing any Business content objects?
    or
    This error cames while running your Process Chain?
    regards,
    Arun.M.D

  • Is there a way to handle custom java exception in OSB?

    For example, i created a exception that extends RuntimeException.
    My exception has a new field called "code".
    I want to handle this exception in Oracle Service Bus process and retrieve this code to throws another exception with a XML structure that includes the code.
    Is there a way to do that ?
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-382515</con:errorCode>
         <con:reason>Callout to java method "public static org.apache.xmlbeans.XmlObject ...</con:reason>
         <con:java-exception xmlns:con="http://www.bea.com/wli/sb/context">
             <con:java-content ref="jcid:33a6c126:14006f3df18:-7fd9"/>
         </con:java-exception>
         <con:location xmlns:con="http://www.bea.com/wli/sb/context">
             <con:node>optmusPipeline</con:node>                    
             <con:pipeline>optmusPipeline_request</con:pipeline>
             <con:stage>processStage</con:stage>
             <con:path>request-pipeline</con:path>   
         </con:location>
    </con:fault>
    it is not enough to recover the information i needed.

    Hi Sandro,
    I've got the same situation. I agree that returning xml from function is not a best choice as you have to manually check if return status is an error or not. Processing exception in error handler is better and this is how I do it:
    I am doing a java callout to a function that can throw exception. Then I add ErrorHandler to stage containing this callout (all the exception are caught here).
    In the error handler I check if $fault/ctx:java-exception is not null. If not then I pass thrown exception to my utility function that converts it to xml similar to yours:
    import org.apache.xmlbeans.XmlException;
    import org.apache.xmlbeans.XmlObject;
    public static XmlObject exceptionToXML(Throwable exception)
      throws XmlException {
      String xmlString = exceptionToString(exception);
      return XmlObject.Factory.parse(xmlString);
    public static String exceptionToString(Throwable exception) {
      String cause = "";
      if (exception.getCause() != null) {
      cause = exceptionToString(exception.getCause());
      return String
      .format("<exception><name>%s</name><description>%s</description>%s</exception>",
      exception.getClass().getName(), exception.getMessage(),
      cause);
    Calling exceptionToXML with $fault/ctx:java-exception/ctx:java-content returns:
    <exception>
         <name>pl.app.MyException</name>
         <description>Exception message</description>
    </exception>
    Then you can check the exception class (IF action: $exception/name/text() = "pl.app.MyException") and handle it accordingly.
    Good luck,
    Krzysiek

  • Is there a way to force System.out.println to run when called

    I working on my first threaded program and having a hard time debugging. I've used System.out.println to let me know what's going on but due (I assume) to the nature of threads the output is not sequential. Is there a way to force println to execute immediatly so that they show up in the order they were called?
    Thanks --- Mike

    mjs1138 wrote:
    endasil, Thanks for the reply. I'm currenlty running the program from within the NetBeans IDE. It is the output displayed by in NetBeans "output" that I'm looking at.
    --- MikeI don't use Netbeans, but I would guess that it too pipes Standard Out and Standard Error to the same console. You didn't address my comment. Are you printing to System.err as well? This happens implicitly if you use Exception.printStackTrace(), for example.

  • Is there a way to trap for exceptions that were unhandled anywhere else in a Flex app?

    Hi All,
    Is there a way I can setup my Flex app to trap exceptions (errors) that are thrown, but not caught anywhere else in my app?  What I'm hoping to do is put some code at the "topmost" layer of my application that will trap for any exceptions that are thrown, and then it can log them and notify the server that an unhandled exception happened in the Flex app.  This will notify me that an error happened, and allow me to troubleshoot the issue by giving me the complete stack trace (and whatever other information I want to send along with the error).
    In ASP.NET you can do something like this with ELMAH:
    http://code.google.com/p/elmah/
      -Josh

    Global exceptions handling in Flex 4 along with FlashPlayer 10.1:
    http://www.rialvalue.com/blog/2010/05/13/global-exception-or-error-handling-in-flex/
    Best Regards
    Martin Andersen

Maybe you are looking for

  • Got mixed up with someone else's account, please help!

    Alright guys, I'm sorry for the long post, but this is quite a complicated situation now and I haven't been able to get help anywhere else.  I talked to a Reddit user who happens to work for Best Buy Corporate, and he recommended asking one of the Co

  • New iMac Hard drive age

    I'm getting a new iMac 20" with a 250GB hard drive and Leopard on it. One question though, what about the hard drive. Is it known to fail? Or is it a goodin'. This might help me decide if I need to buy a backup HD, just in case.

  • Why is there more problems with sending photos in emails than before. I never had problems before.

    I am having problems that I never used to have sending photos in a Yahoo email. I can't load as many photos and it takes a very long time to load. I always check my attacment by going to the sent file and when I download a photo it is way bigger than

  • Using XSD while constructing schema

    Hi, I have the following scenario. I hae 2 methods getsendinputschema and getsendoutputschema as shown in the Interactionimpl.java of the email adapter. I call a EIS event in the execute method.The EIS returns me a xml document.Now i have to construc

  • Nokia 301 RM-839 v9.04 hanging issue.

    Hello, I have observed hanging issue while we take photo using camera. Instead of saving & showing options it show image taken preview. Keyboard also hangs. Only way is to stop camera or restart removing battery. Has anyone seen such issue? Any clue?