Insert error message into session

hi all,
I need to Insert error message into the log of SM35 session.
1. I have created a BDC that creates a session in SM35.
2. The session is scheduled daily and gets executed automatically.
3. there is a scenario where the session should be stopped manually with a error message.
the system doesnt generate any error automatically for that scenario
can any one pls tell me whether its possible to put a manual error into SM35 session log ?
Thanks in Advance,
Santhosini

Hi,
There's a few ways you could do this;
Construct your message first (i.e. combine the message text and variables into one string, then move this into the table)
or
Don't store the text, instead store the message ID, number and variable parts of the message.  This has the advantage if you're running a multi-language system the log can be used by users of different languages.
Regards,
Nick

Similar Messages

  • How to Inscribe all the error messages into a single package ??

    Hi,
    I want to Inscribe all the error messages into a single package., and call the concern package from the exception block in every sp by passing the error code to that package, which will return the Concern error message to the calling Sp.,
    Can any one help me out how to accomplish this ., ?
    regards
    Raja

    I want to Inscribe all the error messages into a single package., Why do you want to inscribe all the messages in a package?
    I would suggest you to store them in a table instead and you can write a functin to retrive the error messages required.
    But if your requirement is for 'Package' then assuming that you store all the error messages in a table 'error_table' (say) following code may help you .
    CREATE TABLE Error_Table (
      Error_Code VARCHAR2(10),
      Error_Desc VARCHAR2(1024));Now insert your error codes and descriptions in this table.
    CREATE OR REPLACE PACKAGE pkg_Error_Handler
    AS
      FUNCTION f_Get_Error_Message(p_Error_Code  Error_Table.Error_Code%TYPE) RETURN VARCHAR2;
    END pkg_Error_Handler;/
    CREATE OR REPLACE PACKAGE BODY pkg_Error_Handler
    AS
      FUNCTION f_Get_Error_Message
           (p_Error_Code  Error_Table.Error_Code%TYPE)
      RETURN VARCHAR2
      IS
        lv_Error_msg  Error_Table.Error_desc%TYPE;
      BEGIN
        BEGIN
          SELECT Error_desc
          INTO   lv_Error_msg
          FROM   Error_Table
          WHERE  Error_Code = p_Error_Code;
        EXCEPTION
          WHEN No_Data_Found THEN
            lv_Error_msg := 'No such error code '
                            ||p_Error_Code
                            ||' defined in the system';
          WHEN OTHERS THEN
            lv_Error_msg := p_Error_Code;
        END;
        RETURN lv_Error_msg;
      END f_Get_Error_Message;
    END pkg_Error_Handler;
    /and you can call this packaged funtion from any exception block to get the error description.
    Regards,
    Abhijit.
    N.B.: Code not tested

  • How can I put all output error message into a String Variable ??

    Dear Sir:
    I have following code, When I run it and I press overflow radio button, It outputs following message:
    Caught RuntimeException: java.lang.NullPointerException
    java.lang.NullPointerException
         at ExceptionHandling.ExceptTest.actionPerformed(ExceptTest.java:72)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:291)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6038)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
         at java.awt.Component.processEvent(Component.java:5803)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4410)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2429)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)Caught RuntimeException: java.lang.NullPointerException
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)I hope to catch all these error message into a String Variable such as StrErrorMsg, then I can use System.out.println(StrErrorMsg) to print it out or store somewhere, not only display at runtime,
    How can I do this??
    Thanks a lot,
    See code below.
    import java.awt.Frame;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.io.FileInputStream;
    import javax.swing.ButtonGroup;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JRadioButton;
    public class ExceptTest extends JFrame implements ActionListener {
        private double[] a;
      private JRadioButton divideByZeroButton;
      private JRadioButton badCastButton;
      private JRadioButton arrayBoundsButton;
      private JRadioButton nullPointerButton;
      private JRadioButton negSqrtButton;
      private JRadioButton overflowButton;
      private JRadioButton noSuchFileButton;
      private JRadioButton throwUnknownButton;
      public ExceptTest() {
        JPanel p = new JPanel();
        ButtonGroup g = new ButtonGroup();
        p.setLayout(new GridLayout(8, 1));
        divideByZeroButton = addRadioButton("Divide by zero", g, p);
        badCastButton = addRadioButton("Bad cast", g, p);
        arrayBoundsButton = addRadioButton("Array bounds", g, p);
        nullPointerButton = addRadioButton("Null pointer", g, p);
        negSqrtButton = addRadioButton("sqrt(-1)", g, p);
        overflowButton = addRadioButton("Overflow", g, p);
        noSuchFileButton = addRadioButton("No such file", g, p);
        throwUnknownButton = addRadioButton("Throw unknown", g, p);
        getContentPane().add(p);
      private JRadioButton addRadioButton(String s, ButtonGroup g, JPanel p) {
        JRadioButton button = new JRadioButton(s, false);
        button.addActionListener(this);
        g.add(button);
        p.add(button);
        return button;
      public void actionPerformed(ActionEvent evt) {
        try {
          Object source = evt.getSource();
          if (source == divideByZeroButton) {
            a[1] = a[1] / a[1] - a[1];
          } else if (source == badCastButton) {
            Frame f = (Frame) evt.getSource();
          } else if (source == arrayBoundsButton) {
            a[1] = a[10];
          } else if (source == nullPointerButton) {
            Frame f = null;
            f.setSize(200, 200);
          } else if (source == negSqrtButton) {
            a[1] = Math.sqrt(-1);
          } else if (source == overflowButton) {
            a[1] = 1000 * 1000 * 1000 * 1000;
            int n = (int) a[1];
          } else if (source == noSuchFileButton) {
            FileInputStream is = new FileInputStream("Java Source and Support");
          } else if (source == throwUnknownButton) {
            throw new UnknownError();
        } catch (RuntimeException e) {
          System.out.println("Caught RuntimeException: " + e);
          e.printStackTrace();
          System.out.println("Caught RuntimeException: " + e);
        } catch (Exception e) {
          System.out.println("Caught Exception: " + e);
      public static void main(String[] args) {
        JFrame frame = new ExceptTest();
        frame.setSize(150, 200);
        frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
        frame.show();
    }

    yes, I update as follows,
    but not looks good.
    import java.io.*;
    public class UncaughtLogger implements Thread.UncaughtExceptionHandler {
        private File file;
        private static String errorMessage;
        public UncaughtLogger(File file) {
            this.file = file;
            //Thread.setDefaultUncaughtExceptionHandler(this);
        public UncaughtLogger(String str) {
            this.errorMessage = str;
            Thread.setDefaultUncaughtExceptionHandler(this);
        //@Override()
        public void uncaughtException(Thread t, Throwable e){
            try {
                log(e);
            } catch (Throwable throwable) {
                System.err.println("error in logging:");
                throwable.printStackTrace();
        private void log(Throwable e) throws IOException {
            PrintWriter out = new PrintWriter(new FileWriter(file, true));
            try {
                e.printStackTrace(out);
            } finally {
                out.close();
        private static UncaughtLogger logger = new UncaughtLogger(new File("C:/temp/log.txt"));
        private static UncaughtLogger logger2 = new UncaughtLogger(errorMessage);
        public static void main(String[] args) {
                String s1 = "Hello World!";
                s1 = null;
                String s2 = s1.getClass().getName();
                System.out.println(s1);
                System.out.println(s2);
                System.out.println("errorMessage =" + errorMessage);
    }

  • Error message into warning message KO450

    Hi,
    There are  unsettle RA  value in project PAD-9114. Because of  this unsettle RA  value in  the project  we are not able to  close the project and receiving error message like below:
    1.There is still WIP for wbs
    2.Balance of  wbs is not zero.
    There is still WIP for WBS PAD-9114
    Message no. KO450
    Diagnosis
    The WIP for WBS PAD-9114 has not been cleared.
    System Response
    WBS PAD-9114 cannot be deleted.
    Procedure
    Calculate the WIP for WBS PAD-9114 so that it can be cleared.  Then settle WBS PAD-9114, including the cleared WIP in the settlement.
    How  to change  above  error message   into warning message so that   it will allow us to  close  the project.
    With regards,
    V.krishnamoorthy

    Hi,
    Thanks  for your answer. But still i am receiving the same error
    There is still WIP for WBS PAD-9114
    Message no. KO450
    Diagnosis
    The WIP for WBS PAD-9114 has not been cleared.
    System Response
    WBS PAD-9114 cannot be deleted.
    Procedure
    Calculate the WIP for WBS PAD-9114 so that it can be cleared.  Then settle WBS PAD-9114, including the cleared WIP in the settlement.
    With regards,
    V.krishnamoorthy

  • Error ,message into table

    Hi all,
    i am trying to put a error message into a table...any idea how i can get this without doing move 'matnr & is in error' into my table?
    thanx

    Hi,
    There's a few ways you could do this;
    Construct your message first (i.e. combine the message text and variables into one string, then move this into the table)
    or
    Don't store the text, instead store the message ID, number and variable parts of the message.  This has the advantage if you're running a multi-language system the log can be used by users of different languages.
    Regards,
    Nick

  • Change of error message into warning message

    While doing FBZP i have found the following error.
    Clearing acct only allowed for an outgoing bill of exch.pmnt
    Message no. F3029
    I am not able to go further, the above message is coming.
    I want to make the error message into warning message.
    Please suggest, how to overcome

    Hello BSR,
    The Error message F3029 is raised when the clearing account (T042I-VKONT) is filled but the payment method in question is not defined as "Bill/exchange".
    I assume that the field is not changable at the moment. You may make necessary changes (delete the entry or delete the specified account) with the instructions below.
    1. Go to Tcd: FBZP -> Click [Pmt methods in country]
    2. Select the entry for the erroneous country(?)/payment method
    3. Change Payment method classification to 'Bill/ex' and save
    Now you should be able to change "Set Up Bank Determination for Payment
    Transactions" table.
    If you still want to use this payment method, please change back to the original classification after making necessary changes in T042I.
    I believe this information would help you in resolving the reported issue.
    Best Regards,
    Vanessa Barth.

  • Convert Error Message into Warning Message

    I wanted to change alternate account into existing GL account. But it is not permitting to post because it is having balance. So i wanted to change error message into warning message. i tried with the following process but still it is not showing warning message showing as error message only. please suggest us.
    a) OBMSG
        Application area  Msg   Allowed        Standard          Switch Off
               FH                  007    W                   E                       tick mark
    b) OBA5
         Msg                                         Online          BatchI         Standard
         007                                                w            w                 w
    Please suggest me i need it urgently.
    Regards
    D.J. Laxmi

    Hi,
    Certain Error messages are not passed to be changed to warning message eventhough you maintained proper customization for the same. I can only recommend you that neutralize the balance of Gl account and change if reporting is accepted.
    Regards,
    Chintan Joshi

  • Why does my Apple Mail insert old messages into the body of new emails?

    Why does my Apple Mail insert old messages into the body of new emails? The correct sender's name will appear in the "From" column, but an old message from a different sender in the body. This happens randomly. I have an iMac OSX 10.6.8. I recently had the hard drive cleaned, but Apple Mail seemed to be running fine when I set it up again. Could this be a virus? What should I do about it? Thanks for any insights!

    Thanks.  While you were replying to my question, I went into notifications and figured
    it out.  Appreciate the quick response!

  • I have an ipad 2 and attempted to buy app from apple store ,i am getting this error message your session has timed out

    i have an ipad2 with software up to date and attempted to buy app from apple store i am gettig this error message
    your session has timed out, is anyone to help?

    Hi..
    Try a reset...
    Tap Settings > General > Reset > Reset Network Settings
    Then restart your iPad.
    Hold the power button until "slide to power off" appears.  Slide to power off.  After it is off, press the power button to turn it back on.

  • Error message into a Variable.

    Dear users,
    I have a rather usual (unusual from the weekend beers for me though!!) query which I can't figure out a proper way to implement.
    My requirement is like this:
    I have a message class in which I want to define a text 'Employee number & not found'.
    I want to use this in the program, but not to raise this error. Instead, I want to move this error message with the Employee number into a Character(200) variable.
    So instead of using MESSAGE e0xx(messageclass) USING employee number, I would like to move the error text into a variable which looks like:
    lv_text = e0xx(messageclass) USING '1234'   which stores the text 'Employee number 1234 not found' in lv_text.
    How would I acheive it??
    Thanks, V!

    Try tis way
    message e999(00) with i_emp-empno into lv_text.
    press f1 in message will provide you more details

  • TS2830 Sync for IPod Touch quit working and I get error messages "a session could not be started" and "a connection could not be established" although the IPod appears in ITunes.

    This is a new problem for an IPod Touch  I have had for a year.  The IPod is hooked up by cable and appears in ITunes. I can examine all the content on the IPOD  and I can click "sync".  It goes through to Step 7 and then the error messages occur.  First "a session could not be started with the IPod" and when that dialogue box is closed, the message "a connection could not be established to the IPod." 

    Maybe:
    Sync Session Failed to Start iTouch iOS5: Apple Support Communities
    iphone could not be synced sync session failed to start...: Apple Support Communities

  • How to add the error message into Delivery Error Log (VL10A,VL10X)

    Hi,
    I have a to add my custom message into Delivery creation error log (VBFS, VBSS)
    This message should be shown in the Collective process log (VL10X, VL10A).
    Please give me the soln to solve this problem.
    I have searched in SDN, i didnt get the proper solution
    Thanks
    Shankar

    HI,
    Make use of the BADi "LE_SHP_DELIVERY_PROC"
    Use the method DELIVERY_FINAL_CHECK.
    Pass the error messages in table CT_FINCHDEL.
    Regards,
    Ankur Parab

  • Custom run time error message into C# UI

    Hi,
    I'm trying to get the error message for the last step into my C# UI (using TestStand3.5).
    I've tryed the GetRunTimeErrorMessage in the UIMsg_Trace message event, but it doesn't work.
    Probably I should use the PostStepRunTimeError callback instead? Is there a sample code available in C# using it?  

    I'm getting the error code and the message, se below, but I also want to get the location info as in the standard TS error popup.
    The boolean Occurred parameter seems to be false even if I get an error. Is it reset to false or something? 
    int frameID = 0;
    errorCode = axExecutionViewMgrs[index].Thread.GetSequenceContext(0, out frameID).AsPropertyObject().GetValNumber("Parameters.ErrorLoad.Code", 0);
    details = axExecutionViewMgrs[index].Thread.GetSequenceContext(0, out frameID).AsPropertyObject().GetValString("Parameters.ErrorLoad.Msg", 0);
    location = axExecutionViewMgrs[index].Thread.GetSequenceContext(0, out frameID).AsPropertyObject().GetValBoolean("Parameters.ErrorLoad.Occurred", 0); 

  • Fetching SSIS error message into Audit table using SP

    Hi Experts,
    I want to fetch SSIS Error Info along with Task Name into Audit table 'Error_Info' column. This is nvarchar(max) datatype, i wrote below Stored Procedure for this (Column names passing dynamically in SP)
    CREATE PROC [dbo].[usp_AuditErrorHandler]
    @AuditTableName nvarchar(MAX)
    ,@Audit_Status nvarchar(100)
    ,@Audit_ErrorDescription sql_variant
    ,@Audit_PkgEnd_dttm nvarchar(100)
    ,@task sql_variant
    ,@errordescription sql_variant 
    ,@Audit_ID nvarchar(10)
    ,@LogID INT
    AS
    BEGIN
    DECLARE @STRQuery NVARCHAR(MAX)
    SET @STRQuery = ' 
    UPDATE '+@AuditTableName+'
    SET '+@Audit_Status+' = ''Failed''
    ,'+@Audit_PkgEnd_dttm+' = GETDATE()
    ,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+@errordescription +'''
    WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
    The above procedure is working fine in SSMS and inserting complete error info into table, but when i am executing thru SSIS Pkg i am getting error like
    "[Execute SQL Task] Error: Executing the query "exec usp_AuditErrorHandler ?,?,?,?,?,?,?,?" failed with the following error: "Incorrect syntax near '@P1'.". Possible failure reasons: Problems with the query, "ResultSet"
    property not set correctly, parameters not set correctly, or connection not established correctly."
    So, i tot of checking with string lenght and modifed the code by adding left () to @errordescription as below.
    UPDATE '+@AuditTableName+'
    SET '+@Audit_Status+' = ''Failed''
    ,'+@Audit_PkgEnd_dttm+' = GETDATE()
    ,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+LEFT(@errordescription ,100)+'''
    WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
    Here, it is inserting till 119 chars, if i give more than 119 chars pkg is failing with above error.
    I want to get insert Complete error info into the column.
    Can anybody suggest on this?? 
    Thanks in advance !!!

    Thanks Arthur for the response, i have tried with the Sql_Variant data type also, here  procedure itself not creating and throwing below error.
    "The data types nvarchar(max) and sql_variant are incompatible in the add operator."
    This is the procedure i am using to fetch error info into Audit table.
    ALTER PROC [dbo].[usp_AuditErrorHandler]
    @AuditTableName nvarchar(MAX)
    ,@Audit_Status nvarchar(100)
    ,@Audit_PkgEnd_dttm nvarchar(100)
    ,@Audit_Task_ErrorCode nvarchar(100)
    ,@Audit_ErrorDescription SQL_VARIANT
    ,@errorcode nvarchar(max)
    ,@task SQL_VARIANT
    ,@errordescription SQL_VARIANT 
    ,@Audit_ID nvarchar(10)
    ,@LogID INT
    AS
    BEGIN
    SET NOCOUNT ON;
    DECLARE @STRQuery SQL_VARIANT
    BEGIN TRY
    SET @STRQuery = '    
    UPDATE  '+@AuditTableName+'
    SET     '+@Audit_Status+' = ''Failed''
           ,'+@Audit_PkgEnd_dttm+' = GETDATE()
           ,'+@Audit_Task_ErrorCode+' = '''+@errorcode+'''
           ,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+ @errordescription +'''
    (Error is giving in this line)
    WHERE   ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
    EXEC (@STRQuery)
    END TRY 
    Below is the Audit Table Schema

  • "Disk Insertion" error message... and well, no disk!

    hi
    i just removed Office 2004 from my Mac (having switched over to Mail) and upon restarting my MacBook, i now get the following error message:
    *Disk Insertion*
    *The disk you inserted was not readable by this computer.*
    i can select EJECT or IGNORE.
    the problem is that... no disk is inserted and i did not try to insert any either!
    clicking EJECT just has the message disappear to reappear a few seconds later.
    clicking IGNORE gets rid of it, but it is there again after the next restart.
    everything else runs fine.
    any clues?
    thx =) dominique

    Problem disappeared after a complete shut down and restart. as opposed to simply restarting which was what i had done previously.
    =)

Maybe you are looking for

  • Any idea what this could be?

    I apologize, as I'm sure this is going to be VERY hard to put into words what is going on. I have a white Macbook. You know how when you open it and it's already on, it makes that little whirring sound? That happened as usual. Then I started going on

  • HT4623 Email problem after resetting my iphone 4S

    I recently had trouble with my iphone 4S and wound up having to restore it. When I did, the email lost 2 folders. How can I get that feature back? Thanks in advance

  • Plz meke me understand the given code!!!!!!

    Dear All, I am giving you the code below. Please any one can explain me the whole program and the purpose. specially form LOOP section to the end of the program. I will be very kind if someone will help to make me understood. Regards, Abhay. TABLES:b

  • Why not we lock these schemas instead of change the password

    The documentation mentioned that the following schemas belong to individual APPS base products. By default the password is the same as the SCHEMA name. Changing the password for these schemas does not affect any configuration files. ABM AHL AHM AK AL

  • How to remove a third party item added to System Preferences

    I downloaded and installed a third party program which placed and icon for it on System Preferences.  I would like to remove the program from my MBPro and remove the icon for it from System Preferences. I would appreciate your help and suggestions to