<?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: having a hard time modifying this select statement... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188388#M127878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The end user was typing 300275 in the so_matnr in the selection screen. So I checked the the material number and it does exists. So what you mean guys is that even though the user types the correct material number it ends up as being non-existent because it lacks digits? for example 00000300275. Is it because of this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Feb 2006 13:46:20 GMT</pubDate>
    <dc:creator>aris_hidalgo</dc:creator>
    <dc:date>2006-02-28T13:46:20Z</dc:date>
    <item>
      <title>having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188382#M127872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As being new to ABAP, I was tasked to modify a report. The problem is that when the user enters a material number in the selection screen the report says it didn't found any records. But when they try to enter values on other selection screen select options or parameter the report just works fine. So I debugged the report and I think that it is because of the select statement below. I think it doesn't get any material numbers from table cooi so I was tasked to replace cooi with eban table. So instead of cooi-matnr in so_matnr what I would like to do is eban-matnr in so_matnr. But  my problem is how can I link all the tables? if I do a seperate select what would I get and where would I compare it to? hope you could help me guys here. Thanks and take care!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;here is the selection screen&lt;/STRONG&gt;**&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;PARAMETERS:     pa_bukrs LIKE t001-bukrs OBLIGATORY DEFAULT 'GLOB'.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: so_psphi FOR  prps-psphi,&lt;/P&gt;&lt;P&gt;                so_ebeln FOR  ekko-ebeln,&lt;/P&gt;&lt;P&gt;                so_lifnr FOR  ekko-lifnr,&lt;/P&gt;&lt;P&gt;                so_matnr FOR  ekpo-matnr,&lt;/P&gt;&lt;P&gt;                so_augdt FOR  bseg-augdt.&lt;/P&gt;&lt;P&gt;*PARAMETERS:     pa_augdt LIKE bseg-augdt.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;here is the code that i think must be modified&lt;/STRONG&gt;**&lt;/P&gt;&lt;P&gt;FORM get_data.&lt;/P&gt;&lt;P&gt;  IF NOT so_ebeln[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    PERFORM get_header.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  SELECT a&lt;SUB&gt;psphi b&lt;/SUB&gt;refbn b~lifnr&lt;/P&gt;&lt;P&gt;        FROM prps AS a INNER JOIN cooi AS b&lt;/P&gt;&lt;P&gt;           ON a&lt;SUB&gt;objnr = b&lt;/SUB&gt;objnr&lt;/P&gt;&lt;P&gt;          INTO CORRESPONDING FIELDS OF it_hdr&lt;/P&gt;&lt;P&gt;        WHERE a~psphi IN so_psphi&lt;/P&gt;&lt;P&gt;          AND a~pbukr = pa_bukrs&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         AND a~erdat LE v_budat&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          AND a~erdat IN so_augdt&lt;/P&gt;&lt;P&gt;          AND b~refbn IN so_ebeln&lt;/P&gt;&lt;P&gt;          AND b~lifnr IN so_lifnr&lt;/P&gt;&lt;P&gt;          AND b~matnr IN so_matnr&lt;/P&gt;&lt;P&gt;          AND b~rfart = 'P'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE name1 FROM lfa1 INTO it_hdr-name1&lt;/P&gt;&lt;P&gt;          WHERE lifnr = it_hdr-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF NOT so_augdt[] IS INITIAL.&lt;/P&gt;&lt;P&gt;      CLEAR ekko.&lt;/P&gt;&lt;P&gt;      SELECT SINGLE * FROM ekko&lt;/P&gt;&lt;P&gt;       WHERE ebeln = it_hdr-refbn&lt;/P&gt;&lt;P&gt;         AND bedat IN so_augdt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        APPEND it_hdr.&lt;/P&gt;&lt;P&gt;        CLEAR it_hdr.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      APPEND it_hdr.&lt;/P&gt;&lt;P&gt;      CLEAR it_hdr.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_ekpo.&lt;/P&gt;&lt;P&gt;    it_hdr-refbn = t_ekpo-ebeln.&lt;/P&gt;&lt;P&gt;    it_hdr-lifnr = t_ekpo-lifnr.&lt;/P&gt;&lt;P&gt;    it_hdr-name1 = t_ekpo-name1.&lt;/P&gt;&lt;P&gt;    APPEND it_hdr. CLEAR it_hdr.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF it_hdr[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2006 13:18:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188382#M127872</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-02-28T13:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188383#M127873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use conversion routine for matnr before select so that u pass the correct format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2006 13:25:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188383#M127873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-28T13:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188384#M127874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry but what do you mean by conversion?thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2006 13:26:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188384#M127874</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-02-28T13:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188385#M127875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pass  ur matnr to the fn module to get the formatted matnr to be passed to select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    INPUT              = var_matnr&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   OUTPUT             =  var_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;  LENGTH_ERROR       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS             = 2&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;use this matnr in select statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2006 13:31:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188385#M127875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-28T13:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188386#M127876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u need to pass all the matnrs (since it is a range ) to the funaction module, may be using loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2006 13:33:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188386#M127876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-28T13:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188387#M127877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CONVERSION_EXIT_ALPHA_INPUT converts any number into a string fill with zeroes, with the number at the extreme right &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use above function. for matnr&lt;/P&gt;&lt;P&gt;regard&lt;/P&gt;&lt;P&gt;vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2006 13:37:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188387#M127877</guid>
      <dc:creator>vinod_gunaware2</dc:creator>
      <dc:date>2006-02-28T13:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188388#M127878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The end user was typing 300275 in the so_matnr in the selection screen. So I checked the the material number and it does exists. So what you mean guys is that even though the user types the correct material number it ends up as being non-existent because it lacks digits? for example 00000300275. Is it because of this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2006 13:46:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188388#M127878</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-02-28T13:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188389#M127879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes  ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2006 14:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188389#M127879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-28T14:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188390#M127880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct me if I'm missing something here, but since you are defining the select option like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

so_matnr &amp;lt;b&amp;gt;FOR ekpo-matnr,&amp;lt;/b&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The conversion routine is fired automatically.  There is no need to do the conversion in your code.  &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 Feb 2006 14:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188390#M127880</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-02-28T14:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: having a hard time modifying this select statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188391#M127881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;replace ur select hope this will meet ur requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a&lt;SUB&gt;psphi b&lt;/SUB&gt;refbn b~lifnr&lt;/P&gt;&lt;P&gt;FROM prps AS a INNER JOIN cooi AS b&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;objnr = b&lt;/SUB&gt;objnr&lt;/P&gt;&lt;P&gt;INNER JOIN eban AS c&lt;/P&gt;&lt;P&gt;ON b&lt;SUB&gt;matnr = c&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF it_hdr&lt;/P&gt;&lt;P&gt;WHERE a~psphi IN so_psphi&lt;/P&gt;&lt;P&gt;AND a~pbukr = pa_bukrs&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;AND a~erdat LE v_budat&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;AND a~erdat IN so_augdt&lt;/P&gt;&lt;P&gt;AND b~refbn IN so_ebeln&lt;/P&gt;&lt;P&gt;AND b~lifnr IN so_lifnr&lt;/P&gt;&lt;P&gt;AND c~matnr IN so_matnr&lt;/P&gt;&lt;P&gt;AND b~rfart = 'P'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2006 14:53:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/having-a-hard-time-modifying-this-select-statement/m-p/1188391#M127881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-28T14:53:56Z</dc:date>
    </item>
  </channel>
</rss>

