<?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: Smartforms in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103844#M438845</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;You need to define a TYPE structure in Smartforms, Global definitions, tab "Types" first that matches your internal table IT_AFKO. This is like (using the prefered command TYPE instead of LIKE):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
types:
  begin of ty_afko,
     AUFNR type AFKO-AUFNR, "Order Number
     GAMNG type AFKO-GAMNG, "Quantity
     PLNBEZ type AFKO-PLNBEZ, "Cod. FIH (Material Number)
     MAKTX type MAKT-MAKTX, "Product Header Description
     BISMT type MARA-BISMT, "Old Material Number)
     MATNR type RESB-MATNR, "Order Components (Material Number)
     CMAKTX type MAKT-MAKTX. "Order Component Description
  end of ty_afko.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you must reference this "template" structure in your Global Data tab tab in Smartforms. The "coding" for this goes something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GT_AFKO type TABLE OF TY_AFKO&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Voila, there you have your internal table defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ITAB2 structure you should preferably be defined like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GS_AFKO type TY_AFKO&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The loop then obviously follows like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"loop at GT_AFKO into GS_AFKO" interpreted the Smartforms way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this solves your doubts! Happy smartforming!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Apr 2007 20:57:49 GMT</pubDate>
    <dc:creator>reedtzj</dc:creator>
    <dc:date>2007-04-15T20:57:49Z</dc:date>
    <item>
      <title>Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103843#M438844</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;I'm having hard times defining my internal table in the smartform Global Settings. This my internal table declaration in the ABAP Smartform calling program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF IT_AFKO OCCURS 0,&lt;/P&gt;&lt;P&gt;        AUFNR   LIKE   AFKO-AUFNR,  "Order Number&lt;/P&gt;&lt;P&gt;        GAMNG   LIKE   AFKO-GAMNG,  "Quantity&lt;/P&gt;&lt;P&gt;        PLNBEZ  LIKE   AFKO-PLNBEZ, "Cod. FIH (Material Number)&lt;/P&gt;&lt;P&gt;        MAKTX   LIKE   MAKT-MAKTX,  "Product Header Description&lt;/P&gt;&lt;P&gt;        BISMT   LIKE   MARA-BISMT,  "Old Material Number)&lt;/P&gt;&lt;P&gt;        MATNR   LIKE   RESB-MATNR,  "Order Components (Material Number)&lt;/P&gt;&lt;P&gt;        CMAKTX  LIKE   MAKT-MAKTX.  "Order Component Description&lt;/P&gt;&lt;P&gt;DATA: END OF IT_AFKO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What Reference type should I type for my internal table ? I've entered AFKO for reference type, but it does not work, for I know table AFKO and my internal table have not the same structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I still need to declare another table (ITAB2) to receive the data for the internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Global settings :&lt;/P&gt;&lt;P&gt;Form interface&lt;/P&gt;&lt;P&gt;Variable name    Type assignment   Reference type&lt;/P&gt;&lt;P&gt;IT_AFKO               LIKE                         ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Global definitions&lt;/P&gt;&lt;P&gt;Variable name    Type assignment   Reference type&lt;/P&gt;&lt;P&gt;ITAB2                   LIKE                          ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Loop section, the Internal table is filled like this:&lt;/P&gt;&lt;P&gt;IT_AFKO   INTO ITAB2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2007 20:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103843#M438844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-12T20:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103844#M438845</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;You need to define a TYPE structure in Smartforms, Global definitions, tab "Types" first that matches your internal table IT_AFKO. This is like (using the prefered command TYPE instead of LIKE):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
types:
  begin of ty_afko,
     AUFNR type AFKO-AUFNR, "Order Number
     GAMNG type AFKO-GAMNG, "Quantity
     PLNBEZ type AFKO-PLNBEZ, "Cod. FIH (Material Number)
     MAKTX type MAKT-MAKTX, "Product Header Description
     BISMT type MARA-BISMT, "Old Material Number)
     MATNR type RESB-MATNR, "Order Components (Material Number)
     CMAKTX type MAKT-MAKTX. "Order Component Description
  end of ty_afko.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you must reference this "template" structure in your Global Data tab tab in Smartforms. The "coding" for this goes something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GT_AFKO type TABLE OF TY_AFKO&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Voila, there you have your internal table defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ITAB2 structure you should preferably be defined like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GS_AFKO type TY_AFKO&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The loop then obviously follows like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"loop at GT_AFKO into GS_AFKO" interpreted the Smartforms way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this solves your doubts! Happy smartforming!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2007 20:57:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103844#M438845</guid>
      <dc:creator>reedtzj</dc:creator>
      <dc:date>2007-04-15T20:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103845#M438846</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;    IN YOUR SMARTFORM IN GLOBAL DEFINITIONS DEFINE A STRUCTURE USING TYPES . THIS SHOULD BE OF SAME STRUCTURE OF YOUR INTERNAL TABLE DECLARED IN ABAP EDITOR. NOW IN YOUR FORM INTERFACE DECLARE A INTERNAL TABLE OF THIS STRUCTURE UNDER TABLES INTERFACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS,&lt;/P&gt;&lt;P&gt;SHAFI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 03:25:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103845#M438846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T03:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103846#M438847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to SE11 and create a structure same as your internal table structure. And in the SMARTFORM form interface declare your form internal table type the created structure name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me if I am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh S&lt;/P&gt;&lt;P&gt;*Allocate points if reply is helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 03:53:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103846#M438847</guid>
      <dc:creator>learnsap</dc:creator>
      <dc:date>2007-04-16T03:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103847#M438848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Johan !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did exactly as you said, but I just can't get this "GT_AFKO type TABLE OF TY_AFKO" done in Form Interface tab "Tables". It says &amp;lt;b&amp;gt;TYPE TY_AFKO does not exist&amp;lt;/b&amp;gt;, though I have defined in Global definitions tab "Types".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 14:08:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103847#M438848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T14:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103848#M438849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I remember correctly you first need to create the type TY_AFKO and then immeditely activate the form. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can proceed and reference the TY_AFKO as mentioned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Smartforms is a litte "special" in this respect. This can happen in other places as well. -&amp;gt; Rule: Always activate before using any own defined structures, types or the likes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this solves the problem - then award some points so that others can benefit from this answer as they then know this to be a working solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 11:46:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/2103848#M438849</guid>
      <dc:creator>reedtzj</dc:creator>
      <dc:date>2007-04-25T11:46:19Z</dc:date>
    </item>
  </channel>
</rss>

