<?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: Component names via ( string ) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730300#M1580955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you're looking for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS &amp;lt;val&amp;gt; TYPE ANY.

WHILE sy-subrc = 0.
  ASSIGN COMPONENT sy-index OF STRUCTURE wa TO &amp;lt;val&amp;gt;.
  CHECK &amp;lt;val&amp;gt; IS ASSIGNED.
  WRITE: / &amp;lt;val&amp;gt;.
  UNASSIGN &amp;lt;val&amp;gt;.
ENDWHILE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Apr 2011 10:39:42 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2011-04-11T10:39:42Z</dc:date>
    <item>
      <title>Component names via ( string )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730295#M1580950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everybody!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a similar question previously about calling a column name based on a string placing a variable inbetween ( ) when using SQL queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I'm trying to call the name of a variable and component based on a string. When I try doing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;var1 = var2-(varColumn)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a dump saying var2 has no component named ''.&lt;/P&gt;&lt;P&gt;I've also tried to do the entire variable name, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
column_name = '-c1'.
variable_name='whatever'.

CONCATENATE variable_name column_name INTO total_name.
var1 = (total_name).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't compile, and if I activate and try to run the program anyway I get an error over an non-exsistant variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My searches across google and here aren't really producing great results. Is doing it this way even possible?&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 08:23:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730295#M1580950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-11T08:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Component names via ( string )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730296#M1580951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to SELECT data using "dynamic" columns? Did you check the F1 help or the online documentation? [http://help.sap.com/abapdocu_702/en/abapselect_clause_cols.htm#!ABAP_ALTERNATIVE_3@3@]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 08:54:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730296#M1580951</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-04-11T08:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Component names via ( string )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730297#M1580952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, I've already gotten that one figured out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  UPDATE (table_name)
    SET (column_name)
    WHERE LETTER = row.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a structure and a lengthy CASE block, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CASE column.
    WHEN 1.
      char = lc_board_s-c1.
    WHEN 2.
      char = lc_board_s-c2.
              ...
    WHEN 10.
      char = lc_board_s-c10.
  ENDCASE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL has query has been executed by this point. I just want to be able to call the component of the structure variably, so I can reduce the block to (psuedocoding).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
   character = structure-(variable_component_name).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 08:59:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730297#M1580952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-11T08:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Component names via ( string )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730298#M1580953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check F1 help of &lt;STRONG&gt;ASSIGN COMPONENT&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 10:23:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730298#M1580953</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-04-11T10:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Component names via ( string )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730299#M1580954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use field symbols like this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;1. First declare the field symbol&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;fs&amp;gt; like var2-col2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*2 Now dynamically assign the column&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'COL2' OF STRUCTURE var2 to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;lt;fs&amp;gt; now has the value var2-col2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 10:24:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730299#M1580954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-11T10:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Component names via ( string )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730300#M1580955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you're looking for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS &amp;lt;val&amp;gt; TYPE ANY.

WHILE sy-subrc = 0.
  ASSIGN COMPONENT sy-index OF STRUCTURE wa TO &amp;lt;val&amp;gt;.
  CHECK &amp;lt;val&amp;gt; IS ASSIGNED.
  WRITE: / &amp;lt;val&amp;gt;.
  UNASSIGN &amp;lt;val&amp;gt;.
ENDWHILE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 10:39:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730300#M1580955</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-04-11T10:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Component names via ( string )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730301#M1580956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everybody! That's exactly what I was looking for. I was trying to search google and the forums here but wasn't sure what the proper term was for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 11:00:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/component-names-via-string/m-p/7730301#M1580956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-11T11:00:41Z</dc:date>
    </item>
  </channel>
</rss>

