<?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: code check in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check/m-p/1591020#M265951</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;&amp;lt;b&amp;gt;data: messtab type string occurs 0 with header line.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;form file_housekeep.&lt;/P&gt;&lt;P&gt;data: l_msg(60),&lt;/P&gt;&lt;P&gt;check g_housekeep_stat is initial.&lt;/P&gt;&lt;P&gt;check not g_server_prc_file is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset g_server_prc_file for output in text mode&lt;/P&gt;&lt;P&gt;encoding non-unicode message l_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;write: at /3 'Error writing to Processed file:',&lt;/P&gt;&lt;P&gt;g_server_prc_file,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;(70) g_server_prc_file,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;at /3 'Error message:', l_msg.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write: at /3 'Writing to Processed file:',&lt;/P&gt;&lt;P&gt;g_server_prc_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move l_msg to messtab.&lt;/P&gt;&lt;P&gt;append messtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Sep 2006 02:03:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-14T02:03:54Z</dc:date>
    <item>
      <title>code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check/m-p/1591019#M265950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anyone check the code of mine for mistakes. here i want to capture the error messages into the global internal table from routines..&lt;/P&gt;&lt;P&gt;data: messtab like bdcmsgcoll occurs 0 with headerline.&lt;/P&gt;&lt;P&gt;form file_housekeep.&lt;/P&gt;&lt;P&gt;data: l_msg(60),&lt;/P&gt;&lt;P&gt;check g_housekeep_stat is initial.&lt;/P&gt;&lt;P&gt;  check not g_server_prc_file is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  open dataset g_server_prc_file for output in text mode&lt;/P&gt;&lt;P&gt;       encoding non-unicode message l_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    write: at /3 'Error writing to Processed file:',&lt;/P&gt;&lt;P&gt;            g_server_prc_file,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          (70) g_server_prc_file,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           at /3 'Error message:', l_msg.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    write: at /3 'Writing to Processed file:',&lt;/P&gt;&lt;P&gt;            g_server_prc_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move l_msg to messtab.&lt;/P&gt;&lt;P&gt;append messtab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 01:57:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check/m-p/1591019#M265950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T01:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check/m-p/1591020#M265951</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;&amp;lt;b&amp;gt;data: messtab type string occurs 0 with header line.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;form file_housekeep.&lt;/P&gt;&lt;P&gt;data: l_msg(60),&lt;/P&gt;&lt;P&gt;check g_housekeep_stat is initial.&lt;/P&gt;&lt;P&gt;check not g_server_prc_file is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset g_server_prc_file for output in text mode&lt;/P&gt;&lt;P&gt;encoding non-unicode message l_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;write: at /3 'Error writing to Processed file:',&lt;/P&gt;&lt;P&gt;g_server_prc_file,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;(70) g_server_prc_file,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;at /3 'Error message:', l_msg.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write: at /3 'Writing to Processed file:',&lt;/P&gt;&lt;P&gt;g_server_prc_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move l_msg to messtab.&lt;/P&gt;&lt;P&gt;append messtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 02:03:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check/m-p/1591020#M265951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T02:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check/m-p/1591021#M265952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prasanth,&lt;/P&gt;&lt;P&gt;thanks for the prompt reply. here i wan tto capture all the error messages from different subroutines to the globally declared internal table messtab. &lt;/P&gt;&lt;P&gt;if i put it as &amp;lt;b&amp;gt;messtab type string&amp;lt;/b&amp;gt; occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does it serves my purpose or is there anything i need to do more.&lt;/P&gt;&lt;P&gt;regards...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 02:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check/m-p/1591021#M265952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T02:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check/m-p/1591022#M265953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nihi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have several issues here...&lt;/P&gt;&lt;P&gt;Naming conventions aside. Attached below is something which could pass a prelimary code review. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some notes&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Do NOT use bdcmsgcoll for this as it has a structure behind it.  It will work but it shows improper use of data structures.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Use of header line is no longer recommended - infact will error out in an OO context.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Suggest passing parameters instead of using global variables&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I would suggest using an application log instead of passing messages to a file.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If you are or are hoping to be a developer, do read the help and practice solving simple problems like this independently. It will sharpen you out. The forum is probably not the best way to solve these.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of ty_msg,&lt;/P&gt;&lt;P&gt;        message(132),&lt;/P&gt;&lt;P&gt;      end of ty_msg.&lt;/P&gt;&lt;P&gt;data: messtab type standard table of ty_msg.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;g_housekeep_stat,g_server_prc_file are assumed &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;to have been declared&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;form file_housekeep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_msg(60).&lt;/P&gt;&lt;P&gt;check g_housekeep_stat is initial.&lt;/P&gt;&lt;P&gt;check not g_server_prc_file is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset g_server_prc_file for output in text mode&lt;/P&gt;&lt;P&gt;encoding non-unicode message l_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;  write: /3 'Error writing to Processed file:', &lt;/P&gt;&lt;P&gt;            g_server_prc_file,&lt;/P&gt;&lt;P&gt;         /3 'Error message:', l_msg.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  write: /3 'Writing to Processed file:',&lt;/P&gt;&lt;P&gt;            g_server_prc_file.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;append l_msg to messtab.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 02:26:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check/m-p/1591022#M265953</guid>
      <dc:creator>wilbertsison</dc:creator>
      <dc:date>2006-09-14T02:26:02Z</dc:date>
    </item>
  </channel>
</rss>

