<?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: Selection field into select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-field-into-select-statement/m-p/12041880#M1968043</link>
    <description>&lt;P&gt;And with new abap statement, it is better to do  (using the inline declaration the code is lighter)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ztypes LINE-SIZE 132.


*parameters: Material like ekpo-matnr.

SELECT-OPTIONS material FOR wa_ekpo-matnr.




*START-OF-SELECTION.
START-OF-SELECTION.


*Select data in itab
  SELECT ebeln
         ebelp
         bukrs
         matnr
    FROM ekpo
    INTO TABLE @data(it_ekpo)
    WHERE MATERIAL in @material


*Process data within itab using LOOP statement
    LOOP AT it_ekpo INTO data(wa_ekpo).
      WRITE: /   wa_ekpo-ebelp,wa_ekpo-bukrs,wa_ekpo-ebeln,wa_ekpo-matnr.
* processing......
    ENDLOOP.


&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 15 Nov 2019 06:21:26 GMT</pubDate>
    <dc:creator>FredericGirod</dc:creator>
    <dc:date>2019-11-15T06:21:26Z</dc:date>
    <item>
      <title>Selection field into select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-field-into-select-statement/m-p/12041878#M1968041</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;
  &lt;P&gt;I want to link my select-option field (material) to my select statement so user input from the selection screen will go into my select statement.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1744725-aba2.jpg" /&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZTYPES
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*


REPORT  ztypes LINE-SIZE 132.


*Table declaration (new method)
TYPES: BEGIN OF t_ekpo,
  ebeln TYPE ekpo-ebeln,
  ebelp TYPE ekpo-ebelp,
  bukrs TYPE ekpo-bukrs,
  matnr TYPE ekpo-matnr,
 END OF t_ekpo.
 
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,      "itab
wa_ekpo type t_ekpo,                    "work area (header line)
wa_ekpo1 like line of it_ekpo.


**************************************************************************


*parameters: Material like ekpo-matnr.


SELECT-OPTIONS material FOR wa_ekpo-matnr.




*START-OF-SELECTION.
START-OF-SELECTION.


*Select data in itab
  SELECT ebeln
         ebelp
         bukrs
         matnr
    FROM ekpo
    INTO TABLE it_ekpo.
  IF wa_ekpo-matnr IN material.


*Process data within itab using LOOP statement
    LOOP AT it_ekpo INTO wa_ekpo.
      WRITE: /   wa_ekpo-ebelp,wa_ekpo-bukrs,wa_ekpo-ebeln,wa_ekpo-matnr.
* processing......
    ENDLOOP.


  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Nov 2019 05:25:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-field-into-select-statement/m-p/12041878#M1968041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-11-15T05:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Selection field into select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-field-into-select-statement/m-p/12041879#M1968042</link>
      <description>&lt;P&gt;SELECT-OPTIONS --&amp;gt;  WHERE table_field IN select_option_name&lt;/P&gt;&lt;P&gt;PARAMETERS --&amp;gt; WHERE table_field EQ parameters_name&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT-OPTIONS material FOR wa_ekpo-matnr.




*START-OF-SELECTION.
START-OF-SELECTION.


*Select data in itab
  SELECT ebeln
         ebelp
         bukrs
         matnr
    FROM ekpo
    INTO TABLE it_ekpo
    WHERE MATNR in material&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Nov 2019 06:19:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-field-into-select-statement/m-p/12041879#M1968042</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2019-11-15T06:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Selection field into select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-field-into-select-statement/m-p/12041880#M1968043</link>
      <description>&lt;P&gt;And with new abap statement, it is better to do  (using the inline declaration the code is lighter)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ztypes LINE-SIZE 132.


*parameters: Material like ekpo-matnr.

SELECT-OPTIONS material FOR wa_ekpo-matnr.




*START-OF-SELECTION.
START-OF-SELECTION.


*Select data in itab
  SELECT ebeln
         ebelp
         bukrs
         matnr
    FROM ekpo
    INTO TABLE @data(it_ekpo)
    WHERE MATERIAL in @material


*Process data within itab using LOOP statement
    LOOP AT it_ekpo INTO data(wa_ekpo).
      WRITE: /   wa_ekpo-ebelp,wa_ekpo-bukrs,wa_ekpo-ebeln,wa_ekpo-matnr.
* processing......
    ENDLOOP.


&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Nov 2019 06:21:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-field-into-select-statement/m-p/12041880#M1968043</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2019-11-15T06:21:26Z</dc:date>
    </item>
  </channel>
</rss>

