<?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: validation problem in select...endselect in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201922#M131150</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Your code looks good.are you getting data which is more than v_budat??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Feb 2006 03:31:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-17T03:31:36Z</dc:date>
    <item>
      <title>validation problem in select...endselect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201921#M131149</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;How can I remove the records that has dates that exceeds the value in v_budat? So for example, I check a PO number based on the report output and validate it on ME23 and the delivery date exceeds the date which I typed in the parameter pa_augdt.Please check my code below.Thanks guys and take care.&lt;/P&gt;&lt;P&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               so_augdt FOR  bseg-augdt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF pa_augdt is initial.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; IF so_augdt[] IS INITIAL.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    v_budat = sy-datum.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    v_budat = pa_augdt.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***here is where it gets the data based on the values in ***the selection screen&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;          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;P&gt;          AND a~erdat LE v_budat&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         AND a~erdat in so_augdt&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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 pa_augdt is initial.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IF NOT so_augdt[] IS INITIAL.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       AND bedat IN so_augdt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         and bedat LE pa_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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 03:25:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201921#M131149</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-02-17T03:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: validation problem in select...endselect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201922#M131150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Your code looks good.are you getting data which is more than v_budat??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 03:31:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201922#M131150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-17T03:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: validation problem in select...endselect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201923#M131151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all instead of using SELECT - ENDSELECT, i suggest to use INTO Table.&lt;/P&gt;&lt;P&gt;Get all data from PRPS and COOI into table IT_HDR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at IT_HDR.&lt;/P&gt;&lt;P&gt;  Get PO No from Ekko using IT_HDR-REFNN.&lt;/P&gt;&lt;P&gt;  Do validation for Date with EKKO-BEDAT.&lt;/P&gt;&lt;P&gt;  If it fails, delete all entries from IT_HDR where REFBN = IT_HDR-REFBN.&lt;/P&gt;&lt;P&gt;  Get LFA1-NAME1 into IT_HDR-NAME1. Modify IT_HDR transporting NAME1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check if this helps....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 03:33:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201923#M131151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-17T03:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: validation problem in select...endselect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201924#M131152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check whether you declaration of v_budat is like this:&lt;/P&gt;&lt;P&gt;DATA v_budat LIKE sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and not as character string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ps: Reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 03:37:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201924#M131152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-17T03:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: validation problem in select...endselect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201925#M131153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Check this...&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;INTO CORRESPONDING FIELDS OF &amp;lt;b&amp;gt;table&amp;lt;/b&amp;gt; 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;P&gt;AND a~erdat LE v_budat&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;loop at it_hdr.&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 pa_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 LE pa_augdt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    modify it_hdr transporting name1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;      modify it_hdr transporting name1.&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 03:41:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201925#M131153</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-17T03:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: validation problem in select...endselect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201926#M131154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;deliveries are in table EKET - del date is EINDT. You need to refer to this table so maybe use eket instead of EKKO unless you need some header info too. This table is beeath the EKKO so has ebeln ebelp and etenr as the key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 03:42:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-problem-in-select-endselect/m-p/1201926#M131154</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-02-17T03:42:20Z</dc:date>
    </item>
  </channel>
</rss>

