<?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: condition based on selection screen. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/condition-based-on-selection-screen/m-p/1242509#M142569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi viraylab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the first probelm &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if so_matnr is initial.&lt;/P&gt;&lt;P&gt;&amp;lt;then execute the first select statement&amp;gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;lt;then execute the second statement&amp;gt;.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Mar 2006 06:38:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-03T06:38:40Z</dc:date>
    <item>
      <title>condition based on selection screen.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/condition-based-on-selection-screen/m-p/1242507#M142567</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;I have been trying to analyze this problem for quite some time. my boss wants me to modify a certain report where in when a user enters a material number with or w/o a date in the selection screen the first select statement would not be used and instead a second one would be used which I can't figure out how to do it. in the first select statement, the material no that the user enters is retrieved from COOI table but my boss wants me to use instead EBAN table for the comparison of matnr. Also, in the 2nd select statement I would get ebeln. And what i'm thinking is that the whole report would be affected. I have posted below the code guys. So please bear with me as I new to ABAP. Thanks you so much!&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;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;**&lt;STRONG&gt;here is the select statement I am trying to modify&lt;/STRONG&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;          OR  b~rfart EQ space.&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;&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2006 06:31:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/condition-based-on-selection-screen/m-p/1242507#M142567</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-03-03T06:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: condition based on selection screen.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/condition-based-on-selection-screen/m-p/1242508#M142568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;let so_matnr be the select option for matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can do like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if so_matnr is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use first select statement.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use the second select&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2006 06:35:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/condition-based-on-selection-screen/m-p/1242508#M142568</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2006-03-03T06:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: condition based on selection screen.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/condition-based-on-selection-screen/m-p/1242509#M142569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi viraylab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the first probelm &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if so_matnr is initial.&lt;/P&gt;&lt;P&gt;&amp;lt;then execute the first select statement&amp;gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;lt;then execute the second statement&amp;gt;.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2006 06:38:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/condition-based-on-selection-screen/m-p/1242509#M142569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-03T06:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: condition based on selection screen.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/condition-based-on-selection-screen/m-p/1242510#M142570</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;In Start-of-selection event,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check select option for material. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is initial, use second select statement,&lt;/P&gt;&lt;P&gt;otherwise use the first one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It wont affect the whole report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shashank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2006 06:48:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/condition-based-on-selection-screen/m-p/1242510#M142570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-03T06:48:19Z</dc:date>
    </item>
  </channel>
</rss>

