<?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: Errors in LSMW in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278243#M152061</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case they are errors that you can/ want to capture before proceeding to the session. you can capture it in the end_of_record area for each record and move it to an internal table which can then be downloaded in the end_of_processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : You have a loaded material master with the legacy material number in BISMT field in MARA. Let's say you now want to load your inventory. In the LSMW for the inventory load you can do a select and get teh SAP material number for the legacy material number provided to you. In this select if you do not find the SAP material number for one material(may be it errored out during material master load for instance) you can move this record to an internal table and in the processing block when all such errrors have been collected in the internal table then you can download it to your presentation server so you can report it to your business users to fix. This is my preferred method of loading data. Sure it will error out int eh batch session as a valid SAP material number is not provided but then you can never fix it automatically. you will have to process tem in the foreground or in errors mode and this invoves a lot of time and developers intervention. In my way developers intervention is limited. A report is generated and then business will fix the data and the delta loades will have to be loaded. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the sample code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material Number &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BINS-MATNR ()                                         &lt;/P&gt;&lt;P&gt;RLBES-MATNR = BINS-MATNR.                             &lt;/P&gt;&lt;P&gt;clear RLBES-MATNR.                                    &lt;/P&gt;&lt;P&gt;select single matnr into RLBES-MATNR  from MARA       &lt;/P&gt;&lt;P&gt;             where BISMT = BINS-MATNR.                &lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.                                     &lt;/P&gt;&lt;P&gt;RLBES-matnr = BINS-MATNR.                             &lt;/P&gt;&lt;P&gt; MOVE-CORRESPONDING BINS TO err_file.                 &lt;/P&gt;&lt;P&gt;MOVE 'Material not created' TO err_file-error.        &lt;/P&gt;&lt;P&gt;APPEND err_file.                                      &lt;/P&gt;&lt;P&gt;  WRITE : 'NO MATERIAL'.                              &lt;/P&gt;&lt;P&gt;  skip_record.                                        &lt;/P&gt;&lt;P&gt;endif.                                               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;__END_OF_PROCESSING__ &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION 'GUI_DOWNLOAD'                                 &lt;/P&gt;&lt;P&gt;    EXPORTING                                                  &lt;/P&gt;&lt;P&gt;      FILENAME = error_file_name                               &lt;/P&gt;&lt;P&gt;    TABLES                                                     &lt;/P&gt;&lt;P&gt;      DATA_TAB = err_file.                                     &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;P&gt;This example used GUI_DOWNLOAD . Ofcourse this is now not recommended so you can use the latest FMs for download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Mar 2006 19:54:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-28T19:54:57Z</dc:date>
    <item>
      <title>Errors in LSMW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278240#M152058</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;How to handle errors in LSMW. Please let me know one example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vinay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2006 19:12:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278240#M152058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-28T19:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in LSMW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278241#M152059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the case of direct input programs, the error handling will be handled for you.  I would suggest that you run your files in test mode untill all errors have been cleared, then run in "Live" mode to update the system.  If using a batch input session, the errors will be handled for you in the log,  you can keep reprocess the session untill the errors have been cleared.  The system will skip over the ones that have been successfully processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2006 19:20:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278241#M152059</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-28T19:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in LSMW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278242#M152060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey vinay&lt;/P&gt;&lt;P&gt;u can get the log after u process the session&lt;/P&gt;&lt;P&gt;when u go to sm35 u will find the log there u will get the summery of the process in that if u choose only errors to display to then u will get only errors occured in it&lt;/P&gt;&lt;P&gt;ok if it is useful don't forget to reward the points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2006 19:22:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278242#M152060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-28T19:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in LSMW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278243#M152061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case they are errors that you can/ want to capture before proceeding to the session. you can capture it in the end_of_record area for each record and move it to an internal table which can then be downloaded in the end_of_processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : You have a loaded material master with the legacy material number in BISMT field in MARA. Let's say you now want to load your inventory. In the LSMW for the inventory load you can do a select and get teh SAP material number for the legacy material number provided to you. In this select if you do not find the SAP material number for one material(may be it errored out during material master load for instance) you can move this record to an internal table and in the processing block when all such errrors have been collected in the internal table then you can download it to your presentation server so you can report it to your business users to fix. This is my preferred method of loading data. Sure it will error out int eh batch session as a valid SAP material number is not provided but then you can never fix it automatically. you will have to process tem in the foreground or in errors mode and this invoves a lot of time and developers intervention. In my way developers intervention is limited. A report is generated and then business will fix the data and the delta loades will have to be loaded. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the sample code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material Number &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BINS-MATNR ()                                         &lt;/P&gt;&lt;P&gt;RLBES-MATNR = BINS-MATNR.                             &lt;/P&gt;&lt;P&gt;clear RLBES-MATNR.                                    &lt;/P&gt;&lt;P&gt;select single matnr into RLBES-MATNR  from MARA       &lt;/P&gt;&lt;P&gt;             where BISMT = BINS-MATNR.                &lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.                                     &lt;/P&gt;&lt;P&gt;RLBES-matnr = BINS-MATNR.                             &lt;/P&gt;&lt;P&gt; MOVE-CORRESPONDING BINS TO err_file.                 &lt;/P&gt;&lt;P&gt;MOVE 'Material not created' TO err_file-error.        &lt;/P&gt;&lt;P&gt;APPEND err_file.                                      &lt;/P&gt;&lt;P&gt;  WRITE : 'NO MATERIAL'.                              &lt;/P&gt;&lt;P&gt;  skip_record.                                        &lt;/P&gt;&lt;P&gt;endif.                                               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;__END_OF_PROCESSING__ &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION 'GUI_DOWNLOAD'                                 &lt;/P&gt;&lt;P&gt;    EXPORTING                                                  &lt;/P&gt;&lt;P&gt;      FILENAME = error_file_name                               &lt;/P&gt;&lt;P&gt;    TABLES                                                     &lt;/P&gt;&lt;P&gt;      DATA_TAB = err_file.                                     &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;P&gt;This example used GUI_DOWNLOAD . Ofcourse this is now not recommended so you can use the latest FMs for download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2006 19:54:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278243#M152061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-28T19:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in LSMW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278244#M152062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reply by you was wonderfull !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please let me know hoe to handle errors when using LSMW - BAPI method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg: Am using BAPI_ACC_DOCUMENT_POST to post my accounting doc.How &amp;amp; where to handle error acc documents ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Provided with some nearer response will be appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2007 22:40:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278244#M152062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-27T22:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in LSMW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278245#M152063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sonair ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All BAPIs return the failed records in error tables parameter namely RETURN ,&lt;/P&gt;&lt;P&gt;so you will get all the logs in this table parameter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Akbar.&lt;/P&gt;&lt;P&gt;sap3aki@yahoo.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 18:35:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-lsmw/m-p/1278245#M152063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T18:35:39Z</dc:date>
    </item>
  </channel>
</rss>

