<?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 Selecting specific data from a table define in a customized table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-specific-data-from-a-table-define-in-a-customized-table/m-p/993893#M74868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wondering if there is a way to make a select out from a settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scenario&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a transparent table created as below:&lt;/P&gt;&lt;P&gt;MANDT&lt;/P&gt;&lt;P&gt;TABNAME&lt;/P&gt;&lt;P&gt;FIELDNAME&lt;/P&gt;&lt;P&gt;QUESTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose of the above transparent table is to store the question and answer. The answer is store in the specific field in the specific table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample scenario will be:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Transparent table value:&lt;/P&gt;&lt;P&gt;TABNAME = PA0002&lt;/P&gt;&lt;P&gt;FIELDNAME = NACHN&lt;/P&gt;&lt;P&gt;QUESTION = 'What is your last name?'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Programming logic:&lt;/P&gt;&lt;P&gt;1) Base on the question, the program will go to the field of the table specify above and look for the value and match with the answer key in. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do this? I would like to avoid using 'case' or 'if' statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to use field-symbols to do it but I failed. Any advice is appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Aug 2005 21:39:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-08-25T21:39:07Z</dc:date>
    <item>
      <title>Selecting specific data from a table define in a customized table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-specific-data-from-a-table-define-in-a-customized-table/m-p/993893#M74868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wondering if there is a way to make a select out from a settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scenario&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a transparent table created as below:&lt;/P&gt;&lt;P&gt;MANDT&lt;/P&gt;&lt;P&gt;TABNAME&lt;/P&gt;&lt;P&gt;FIELDNAME&lt;/P&gt;&lt;P&gt;QUESTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose of the above transparent table is to store the question and answer. The answer is store in the specific field in the specific table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample scenario will be:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Transparent table value:&lt;/P&gt;&lt;P&gt;TABNAME = PA0002&lt;/P&gt;&lt;P&gt;FIELDNAME = NACHN&lt;/P&gt;&lt;P&gt;QUESTION = 'What is your last name?'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Programming logic:&lt;/P&gt;&lt;P&gt;1) Base on the question, the program will go to the field of the table specify above and look for the value and match with the answer key in. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do this? I would like to avoid using 'case' or 'if' statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to use field-symbols to do it but I failed. Any advice is appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2005 21:39:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-specific-data-from-a-table-define-in-a-customized-table/m-p/993893#M74868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-25T21:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting specific data from a table define in a customized table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-specific-data-from-a-table-define-in-a-customized-table/m-p/993894#M74869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u give an example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.. don't understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2005 22:14:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-specific-data-from-a-table-define-in-a-customized-table/m-p/993894#M74869</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2005-08-25T22:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting specific data from a table define in a customized table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-specific-data-from-a-table-define-in-a-customized-table/m-p/993895#M74870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use a dynamic select:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest LINE-SIZE 132 MESSAGE-ID zc.
TABLES: ztest1.
DATA: BEGIN OF fields OCCURS 0,
        field(80),
      END   OF fields.
DATA: BEGIN OF condition OCCURS 0,
        field(80),
      END   OF condition.
DATA :answer(80).
SELECT  * FROM  ztest1 UP TO 1 ROWS.
* Here you need some logic to ask a question and return
* the answer - probably calling another screen. For now, 
* we'll just fill it in. Then do some logic to format the
* answer into the proper format.
  MOVE 'Smith' TO answer.
  fields-field = ztest1-zz_xfield.
  APPEND fields.
  CONCATENATE ztest1-zz_xfield '= &amp;amp;'
    INTO condition-field SEPARATED BY space.
  CONCATENATE condition answer '&amp;amp;' INTO condition.
  TRANSLATE condition USING '&amp;amp;'''.
  APPEND condition.
  SELECT (fields) FROM (ztest1-zz_table)
    INTO answer
   WHERE (condition).
  ENDSELECT.
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2005 03:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-specific-data-from-a-table-define-in-a-customized-table/m-p/993895#M74870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-26T03:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting specific data from a table define in a customized table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-specific-data-from-a-table-define-in-a-customized-table/m-p/993896#M74871</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;Try this, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : c_table(10) type c value 'MARA'.&lt;/P&gt;&lt;P&gt;data : c_field(10) type c value 'MATNR'.&lt;/P&gt;&lt;P&gt;data : c_CONDITION(25) type c value 'MATNR = ''AH0904001EN'''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab_mara like mara occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  (C_FIELD) from (c_TABLE) into table itab_mara WHERE (C_CONDITION).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write itab_mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the same way you write as per your requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above code working fine in 4.7 version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2005 04:21:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-specific-data-from-a-table-define-in-a-customized-table/m-p/993896#M74871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-26T04:21:55Z</dc:date>
    </item>
  </channel>
</rss>

