<?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: FORMs STRUCTURE option in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/forms-structure-option/m-p/4054239#M969141</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you don't have to know field names, you can use this simple solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM TEST      TABLES P_ITAB
	                USING P_REC STRUCTURE WS_REC.

FIELD-SYMBOLS: &amp;lt;itab&amp;gt; TYPE ANY.

LOOP AT p_itab ASSIGNING &amp;lt;itab&amp;gt;.
  MOVE-CORRESPONDING &amp;lt;itab&amp;gt; TO p_rec.
ENDLOOP.

ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can still assign a field of &amp;lt;itab&amp;gt; but you have to do it for each field with ASSIGN COMPONENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have a lot of named fields to use then you can map the input parameter into a local table with the structure you need&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 09:50:22 GMT</pubDate>
    <dc:creator>franois_henrotte</dc:creator>
    <dc:date>2008-06-30T09:50:22Z</dc:date>
    <item>
      <title>FORMs STRUCTURE option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/forms-structure-option/m-p/4054238#M969140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understood that, in order to manipulate fields from an internal table or record passed as a parameter to a given form, you have to include STRUCTURE [table / struct name]. I wonder how would it be possible to have a program that decides, dynamically, amongst several possible table parameters - if we indeed have to have the STRUCTURE  hard-coded, would such a thing be possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM TEST      TABLES P_ITAB STRUCTURE BSEG	
	                USING P_REC STRUCTURE WS_REC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above excerpt of code, it is known beforehand that the table is of the BSEG type. Imagining a scenario where I would only have this information at run time, would it be possible to determine the structure of the table ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Avraham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 09:19:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/forms-structure-option/m-p/4054238#M969140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T09:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: FORMs STRUCTURE option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/forms-structure-option/m-p/4054239#M969141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you don't have to know field names, you can use this simple solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM TEST      TABLES P_ITAB
	                USING P_REC STRUCTURE WS_REC.

FIELD-SYMBOLS: &amp;lt;itab&amp;gt; TYPE ANY.

LOOP AT p_itab ASSIGNING &amp;lt;itab&amp;gt;.
  MOVE-CORRESPONDING &amp;lt;itab&amp;gt; TO p_rec.
ENDLOOP.

ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can still assign a field of &amp;lt;itab&amp;gt; but you have to do it for each field with ASSIGN COMPONENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have a lot of named fields to use then you can map the input parameter into a local table with the structure you need&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 09:50:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/forms-structure-option/m-p/4054239#M969141</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2008-06-30T09:50:22Z</dc:date>
    </item>
  </channel>
</rss>

