<?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 select fails in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-fails/m-p/1624315#M279040</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;My select statement is failing because in the where clause material number(matnr) in the table(ekbe) is having leading zeros where as material number of wa_poauto-matnr does not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select ebeln ebelp vgabe gjahr belnr buzei wrbtr lfbnr&lt;/P&gt;&lt;P&gt;    into table ts_ekbe&lt;/P&gt;&lt;P&gt;    from ekbe&lt;/P&gt;&lt;P&gt;    where ebeln = wa_poat-ponum  and&lt;/P&gt;&lt;P&gt;          xblnr = wa_poat-contr  and&lt;/P&gt;&lt;P&gt;          matnr = wa_poat-matnr  and&lt;/P&gt;&lt;P&gt;          vgabe in ('1', '2').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you don't understand the issue. Any clue is appricitated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Surya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Oct 2006 00:47:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-16T00:47:35Z</dc:date>
    <item>
      <title>select fails</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-fails/m-p/1624315#M279040</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;My select statement is failing because in the where clause material number(matnr) in the table(ekbe) is having leading zeros where as material number of wa_poauto-matnr does not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select ebeln ebelp vgabe gjahr belnr buzei wrbtr lfbnr&lt;/P&gt;&lt;P&gt;    into table ts_ekbe&lt;/P&gt;&lt;P&gt;    from ekbe&lt;/P&gt;&lt;P&gt;    where ebeln = wa_poat-ponum  and&lt;/P&gt;&lt;P&gt;          xblnr = wa_poat-contr  and&lt;/P&gt;&lt;P&gt;          matnr = wa_poat-matnr  and&lt;/P&gt;&lt;P&gt;          vgabe in ('1', '2').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you don't understand the issue. Any clue is appricitated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Surya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 00:47:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-fails/m-p/1624315#M279040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-16T00:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: select fails</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-fails/m-p/1624316#M279041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you selecting the matnr from the database for the field wa_poat-matnr..you don't have to do anything..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check if there is any record available in the table EKBE for the corresponding combination in the where clause...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 00:53:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-fails/m-p/1624316#M279041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-16T00:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: select fails</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-fails/m-p/1624317#M279042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before your select USE A CONVERSION EXIT TO GET THE WA_POAUTO NUMBER IN THE SAME FORMAT AS THE DB:&lt;/P&gt;&lt;P&gt;eg,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;use conversion exit&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            input  = wa_poat-matnr &lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;P&gt;            output = wa_poat-matnr .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 01:24:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-fails/m-p/1624317#M279042</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-10-16T01:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: select fails</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-fails/m-p/1624318#M279043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way is to use the conversion routine to change the value of input to 18chars before the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
  EXPORTING
    input  = wa_poat-matnr
  IMPORTING
    output = wa_poat-matnr
  EXCEPTIONS
    OTHERS = 0.


select ebeln ebelp vgabe gjahr belnr buzei wrbtr lfbnr
       into table ts_ekbe
       from ekbe
       where ebeln = wa_poat-ponum and
             xblnr = wa_poat-contr and
             matnr = wa_poat-matnr and
             vgabe in ('1', '2').&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 01:29:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-fails/m-p/1624318#M279043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-16T01:29:49Z</dc:date>
    </item>
  </channel>
</rss>

