<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error output for users in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754627#M640878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Man that was fast.  Are you a bot?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I am still analyzing the answer.  There may be more info I need.  I am dealing with tables.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Sep 2007 15:57:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-17T15:57:09Z</dc:date>
    <item>
      <title>Error output for users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754625#M640876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code that is being run is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message 'check loads' type 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want it to not send out the message "check loads", but to display the information in the particular table fields and also log it.  What would be the syntax to post the data for a particular field in a table?  Would you use the EXTRACT command and then the particular field names?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I know that error message type 'E' logs the error, but it also stops the other jobs that are scheduled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would message type 'S' be suitable to log the error AND keep the other jobs that are scheduled to still run even though a previous job had an error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 15:35:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754625#M640876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T15:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error output for users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754626#M640877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome to SDN.&lt;/P&gt;&lt;P&gt;Use this variation of MESSAGE -&lt;/P&gt;&lt;P&gt;... INTO text &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;With this addition, you assign the short text of the message to the variable text. The message type does not matter. The program flow is not interrupted and there is no message processing taking place. For text, a character-type data object is expected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The addition INTO cannot be specified at the output of a user-defined text. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;The short text of a message sent in a function module is stored in the data object mtext when handling the exception error_message with help of the respective system fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DATA mtext TYPE string. &lt;/P&gt;&lt;P&gt;      CALL FUNCTION ... EXCEPTIONS error_message = 4. &lt;/P&gt;&lt;P&gt;      IF sy-subrc = 4. &lt;/P&gt;&lt;P&gt;        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno &lt;/P&gt;&lt;P&gt;                INTO mtext &lt;/P&gt;&lt;P&gt;                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. &lt;/P&gt;&lt;P&gt;      ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 15:40:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754626#M640877</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-09-17T15:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error output for users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754627#M640878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Man that was fast.  Are you a bot?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I am still analyzing the answer.  There may be more info I need.  I am dealing with tables.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 15:57:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754627#M640878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T15:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error output for users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754628#M640879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, maybe this might help clarify what I want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the Code&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message 'check loads' type 'E'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  Read table [table name] with key [file name] = '101'&lt;/P&gt;&lt;P&gt;  [file name] = '250'.&lt;/P&gt;&lt;P&gt;  if sy-subrc = '0'.&lt;/P&gt;&lt;P&gt;    open dataset dsn for output in text mode encoding default.&lt;/P&gt;&lt;P&gt;    transfer flag_n to dsn.&lt;/P&gt;&lt;P&gt;    close dataset dsn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'SXPG_COMMAND_EXECUTE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      COMMANDNAME                         = CMDNAME&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ADDITIONAL_PARAMETERS               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     OPERATINGSYSTEM                     = SY-OPSYS&lt;/P&gt;&lt;P&gt;     TARGETSYSTEM                        = tgtsys&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DESTINATION                         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     STDOUT                              = 'X'&lt;/P&gt;&lt;P&gt;     STDERR                              = 'X'&lt;/P&gt;&lt;P&gt;     TERMINATIONWAIT                     = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    TRACE                               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    STATUS                              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    EXITCODE                            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;     EXEC_PROTOCOL                       = rec&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NO_PERMISSION                       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    COMMAND_NOT_FOUND                   = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PARAMETERS_TOO_LONG                 = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    SECURITY_RISK                       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    WRONG_CHECK_CALL_INTERFACE          = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PROGRAM_START_ERROR                 = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PROGRAM_TERMINATION_ERROR           = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X_ERROR                             = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PARAMETER_EXPECTED                  = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    TOO_MANY_PARAMETERS                 = 10&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ILLEGAL_COMMAND                     = 11&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    WRONG_ASYNCHRONOUS_PARAMETERS       = 12&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    CANT_ENQ_TBTCO_ENTRY                = 13&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    JOBCOUNT_GENERATION_ERROR           = 14&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OTHERS                              = 15&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The job log has these fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date        Time         Message text          Message class          Message no.          Message type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the job log to display in the 'Message text' field the particular table info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The info that I want displayed are in a particular table with these fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Job Name           Tivoli message             Tivoli status             Table data status                                    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a possible way to log all of this info in the job log for users to see why the job didnt finish, and also to keep the other scheduled jobs from canceling? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 16:31:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754628#M640879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T16:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error output for users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754629#M640880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, type "S" messages will be written to the Job Log and the program will continue... whereas "E" messages will stop processing in the job.  Obviously you'd want to set some "g_error_flag" in your code so that you don't perform any processing that should only occur in a "good" situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, for example something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;message s398(00) with 'Error with system command' l_usercommand 'at' sy-uzeit.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will just go to the job log.  Also, you might have a look at writing exceptions to the system log - that may be even better for your purpose (have a look at function RSLG_WRITE_SYSLOG_ENTRY et al).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2007 02:17:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-output-for-users/m-p/2754629#M640880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-18T02:17:31Z</dc:date>
    </item>
  </channel>
</rss>

