<?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 record in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174104#M755301</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 have you defined wa_file-matnr?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Dec 2007 15:03:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-19T15:03:49Z</dc:date>
    <item>
      <title>Error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174099#M755296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am uploading a file through gui_upload,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my flat file contains matnr,vkorg,vtweg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I am entering a wrong value in place of vkorg it should throw an error message that sales org doesn't exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is for sales data in material master.&lt;/P&gt;&lt;P&gt;I am writing the code as below but the entries are not coming to the WA_MVK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me some idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH t_mvke.&lt;/P&gt;&lt;P&gt;CLEAR t_mvke.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr vkorg vtweg from mvke into table t_mvke.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;loop at t_file into wa_file.&lt;/P&gt;&lt;P&gt;READ table t_mvke into wa_mvk with  key matnr = wa_file-matnr BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      IF wa_file-matnr &amp;lt;&amp;gt; wa_mvk-matnr.&lt;/P&gt;&lt;P&gt;      MESSAGE e999 with text-004.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF wa_file-vkorg &amp;lt;&amp;gt; wa_mvk-vkorg.&lt;/P&gt;&lt;P&gt;      MESSAGE e999 with text-005 wa_file-vkorg text-006.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF wa_file-vtweg &amp;lt;&amp;gt; wa_mvk-vtweg.&lt;/P&gt;&lt;P&gt;      MESSAGE e999 with text-007 wa_file-vtweg text-006.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Reply asap.Reward will be given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 14:52:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174099#M755296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T14:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174100#M755297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is not working. The read statement. Sort if first by MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, then which part is not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 14:54:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174100#M755297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T14:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174101#M755298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF wa_file-vkorg wa_mvk-vkorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single vkorg from check table of VKORG&lt;/P&gt;&lt;P&gt;       into lv_vkorg &lt;/P&gt;&lt;P&gt;       where vkorg = wa_file-vkorg.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE e999 with text-005 wa_file-vkorg text-006.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hi guest.. I remeber I said some one to sort and gave the above format to full fill his req...  binary search works well when its sorted with all the primary keys..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jackandjay on Dec 19, 2007 9:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 14:55:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174101#M755298</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2007-12-19T14:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174102#M755299</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;I gave the SORT with t_mvke and I have 8222 data in this but while reading the data is not coming to the wa_mvk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this only the sy-subrc is 4 and i am not able to give the error messages..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest me asap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 14:58:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174102#M755299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T14:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174103#M755300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check ur declerations of the ur wa and the tables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 15:01:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174103#M755300</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2007-12-19T15:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174104#M755301</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 have you defined wa_file-matnr?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 15:03:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174104#M755301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T15:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174105#M755302</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;you have all material numbers in your internal table 't_file', then why you are selecting all entries from 'MVKE', after getting data from flat file to T_FILE, add the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare your T_FILE-MATNR by reffering MARA-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then loop through T_FILE.&lt;/P&gt;&lt;P&gt;     CALL FUNCTION 'CONVERSION_EXIT_MATN2_INPUT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    input                  = T_FILE-MATNR&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   OUTPUT                 = T_FILE-MATNR&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;  NUMBER_NOT_FOUND       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LENGTH_ERROR           = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                 = 3&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;P&gt;MODIFY T_FILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this has to be done before select statement, then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr vkorg vtweg from mvke into table t_mvke for all entries in T_FILE where matnr = T_FILE-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort T_MVKE by matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now prceed with your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreeram.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sreeram Prasad on Dec 19, 2007 4:55 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 15:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/3174105#M755302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T15:54:47Z</dc:date>
    </item>
  </channel>
</rss>

