<?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: Field Symbol Assignment ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133872#M1189929</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the Create Data Syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data:         lv_dyn_data     TYPE REF TO data.

* Create the FieldSymbol type Dynamically
  CREATE DATA lv_dyn_data TYPE (gv_value).
  ASSIGN lv_dyn_data-&amp;gt;* TO &amp;lt;fs_field&amp;gt;.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, everything is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Feb 2009 08:02:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-07T08:02:50Z</dc:date>
    <item>
      <title>Field Symbol Assignment ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133867#M1189924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable in which the value will be a  FIELDNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to create a fieldsymbol of the type of the FIELDNAME,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Data : gv_value type string.
Field-symbols: &amp;lt;fs_field&amp;gt; type any.

gv_value = 'TIMESTAMP'.

Now I want the fieldsymol &amp;lt;fs_field&amp;gt; to be created with the type 'TIMESTAMP'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2009 07:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133867#M1189924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-07T07:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Field Symbol Assignment ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133868#M1189925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this code.&lt;/P&gt;&lt;P&gt;assign &amp;lt;fs_field&amp;gt; to gv_value.&lt;/P&gt;&lt;P&gt;this will point to gv_value and the value of it will be 'TIMESTAMP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2009 07:12:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133868#M1189925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-07T07:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Field Symbol Assignment ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133869#M1189926</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;what do you actually want to do with the field symbol?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wan to declare the field symbol of the type of the variable, TYPE ANY will do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dev Parbutteea on Feb 7, 2009 8:34 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2009 07:14:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133869#M1189926</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2009-02-07T07:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Field Symbol Assignment ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133870#M1189927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi...&lt;/P&gt;&lt;P&gt;you can use statment...&lt;/P&gt;&lt;P&gt;assign gv_value to &amp;lt;fs_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;infact if you are using &lt;/P&gt;&lt;P&gt;type any it takes generic type and you can assign any field of any data type to the field string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now &amp;lt;fs_field&amp;gt; will point to memory address value of gv_value and along with this you can chage value of gv_field by assigning some value to &amp;lt;fs_field&amp;gt;.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mohit Kumar on Feb 7, 2009 8:23 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2009 07:23:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133870#M1189927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-07T07:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Field Symbol Assignment ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133871#M1189928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I'm writing a Query which is Dynamic :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: lv_count        TYPE p,
        lv_ddtext       TYPE ddtext,
        lv_field_value  TYPE string,
        lv_field_list   TYPE string.

  FIELD-SYMBOLS : &amp;lt;fs_field&amp;gt; TYPE ANY.

* Populate the Dynamic Clause for the Total number of Records Data
  CLEAR gv_value.
* Get the Dynamic Field and Value of the Key Field of the SON Table
  ASSIGN gwa_znrows_def-kfldname TO &amp;lt;fs_value&amp;gt;.  "FIeldname
* Populate field for Dynamic Where condition
  CONCATENATE '' &amp;lt;fs_value&amp;gt; '' INTO gv_value.
  CONDENSE gv_value.
* Fetch the Data from the SON table
  CLEAR: lv_count,gv_count.
* Populate the dynamic fetch clause
  CONCATENATE '' &amp;lt;fs_value&amp;gt; '' INTO lv_field_list.
  CONCATENATE lv_field_list 'COUNT( * ) AS COUNT' INTO lv_field_list
              SEPARATED BY space.
* Fetch the Count from the SON DBT
  CLEAR lv_field_value.
  SELECT (lv_field_list) FROM (gwa_znrows_def-son)
                         INTO (lv_field_value,lv_count)
*                         INTO (&amp;lt;fs_field&amp;gt;,lv_count)
                         GROUP BY (gv_value).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above Select Query is working fine for all the type of Fields except the Types RAW and DEC21 (TIMESTAMP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO, I've decided to change the type of the Into fieldlist (lv_field_value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the type of lv_field_value is string.&lt;/P&gt;&lt;P&gt;If I make it to the type of the fieldname , then I'll not have any problems in the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my point is how to create the fieldsymbol with the type of the Fieldname which is available in gv_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I say --&amp;gt; assign gv_value to &amp;lt;fs_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value of the &amp;lt;fs_field&amp;gt; is 'TIMESTAMP'.&lt;/P&gt;&lt;P&gt;But the type is C of length 1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want the type of Timestamp i.e DEC 21.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2009 07:45:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133871#M1189928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-07T07:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Field Symbol Assignment ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133872#M1189929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the Create Data Syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data:         lv_dyn_data     TYPE REF TO data.

* Create the FieldSymbol type Dynamically
  CREATE DATA lv_dyn_data TYPE (gv_value).
  ASSIGN lv_dyn_data-&amp;gt;* TO &amp;lt;fs_field&amp;gt;.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, everything is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2009 08:02:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/5133872#M1189929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-07T08:02:50Z</dc:date>
    </item>
  </channel>
</rss>

