<?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: using field symbols in OOPs programming...have ur points. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-field-symbols-in-oops-programming-have-ur-points/m-p/2852738#M668549</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pradeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this your complete code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Sep 2007 10:08:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-28T10:08:22Z</dc:date>
    <item>
      <title>using field symbols in OOPs programming...have ur points.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-field-symbols-in-oops-programming-have-ur-points/m-p/2852737#M668548</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 want to use field symbols in OOPS programming like this...&lt;/P&gt;&lt;P&gt;But the system is giving me dump....help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;CREATE OBJECT OBJ.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;AB&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN OBJ TO &amp;lt;AB&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD &amp;lt;AB&amp;gt;-&amp;gt;add&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    a      = 4&lt;/P&gt;&lt;P&gt;    b      = 6&lt;/P&gt;&lt;P&gt;  changing&lt;/P&gt;&lt;P&gt;    c      = Z&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE : / Z.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 09:43:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-field-symbols-in-oops-programming-have-ur-points/m-p/2852737#M668548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T09:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: using field symbols in OOPs programming...have ur points.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-field-symbols-in-oops-programming-have-ur-points/m-p/2852738#M668549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pradeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this your complete code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 10:08:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-field-symbols-in-oops-programming-have-ur-points/m-p/2852738#M668549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T10:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: using field symbols in OOPs programming...have ur points.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-field-symbols-in-oops-programming-have-ur-points/m-p/2852739#M668550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF t_struct,&lt;/P&gt;&lt;P&gt;         col1 TYPE i,&lt;/P&gt;&lt;P&gt;         col2 TYPE i,&lt;/P&gt;&lt;P&gt;       END OF t_struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: dref1 TYPE REF TO data,&lt;/P&gt;&lt;P&gt;      dref2 TYPE REF TO data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs1&amp;gt; TYPE t_struct,&lt;/P&gt;&lt;P&gt;               &amp;lt;fs2&amp;gt; TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA dref1 TYPE t_struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN dref1-&amp;gt;* TO &amp;lt;fs1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;fs1&amp;gt;-col1 = 1.&lt;/P&gt;&lt;P&gt;&amp;lt;fs1&amp;gt;-col2 = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dref2 = dref1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN dref2-&amp;gt;* TO &amp;lt;fs2&amp;gt; CASTING.&lt;/P&gt;&lt;P&gt;WRITE / &amp;lt;fs2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET REFERENCE OF &amp;lt;fs1&amp;gt;-col2 INTO dref2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN dref2-&amp;gt;* TO &amp;lt;fs2&amp;gt;.&lt;/P&gt;&lt;P&gt;WRITE / &amp;lt;fs2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 10:26:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-field-symbols-in-oops-programming-have-ur-points/m-p/2852739#M668550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T10:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: using field symbols in OOPs programming...have ur points.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-field-symbols-in-oops-programming-have-ur-points/m-p/2852740#M668551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pradeep, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this piece of code you have declared your field symbol as TYPE ANY. In this case when you do a call method it will give you errors. Instead of this declare the field sybol as the type of the calling class. refer to this syntax - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  ZSKC_TEST4 MESSAGE-ID IH
        NO STANDARD PAGE HEADING.

TYPES : TYP_CONT TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
DATA : L_CONT TYPE REF TO CL_GUI_CUSTOM_CONTAINER.

DATA : L_HEIGHT TYPE I.

FIELD-SYMBOLS : &amp;lt;FS&amp;gt; TYPE TYP_CONT.

START-OF-SELECTION.

CREATE OBJECT L_CONT EXPORTING CONTAINER_NAME = 'TEST'.

ASSIGN L_CONT TO &amp;lt;FS&amp;gt;.

CALL METHOD L_CONT-&amp;gt;GET_HEIGHT
  IMPORTING
    HEIGHT     = L_HEIGHT
  EXCEPTIONS
    CNTL_ERROR = 1
    others     = 2.

WRITE L_HEIGHT.

CALL METHOD &amp;lt;FS&amp;gt;-&amp;gt;GET_HEIGHT
  IMPORTING
    HEIGHT     = L_HEIGHT
  EXCEPTIONS
    CNTL_ERROR = 1
    others     = 2.

WRITE L_HEIGHT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just make sure your OBJ is initialized, u can check that in debugging mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 11:12:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-field-symbols-in-oops-programming-have-ur-points/m-p/2852740#M668551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T11:12:36Z</dc:date>
    </item>
  </channel>
</rss>

