<?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: help required for assignment operators in OO ABAP context in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618556#M1088127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method cl_abap_typedescr=&amp;gt;describe_by_name returns a reference variable of TYPE REF TO cl_abap_typedescr of which CL_ABAP_TABLEDESCR (lit_table_desc) is a subclass:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CL_ABAP_TYPEDESCR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          o CL_ABAP_DATADESCR&lt;/P&gt;&lt;P&gt;                + CL_ABAP_TABLEDESCR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, we have a narrowing casting (down casting):&lt;/P&gt;&lt;P&gt;lit_table_desc ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_source ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uwe, isn't it a widenning cast? We change from more general view to more specialized, thus it is a widdening, although called down cast:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Oct 2008 08:33:24 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2008-10-13T08:33:24Z</dc:date>
    <item>
      <title>help required for assignment operators in OO ABAP context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618552#M1088123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to understand the usage of assignment operators in OO ABAP such as: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lit_table_desc &lt;STRONG&gt;&lt;U&gt;?=&lt;/U&gt;&lt;/STRONG&gt; cl_abap_typedescr=&amp;gt;describe_by_name( p_source ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN wa_source&lt;STRONG&gt;_-&amp;gt;&lt;/STRONG&gt;_* TO &amp;lt;source_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly let me know what is the significance and usage of these and any link where I can find documentation for these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks-&lt;/P&gt;&lt;P&gt;Harmeet Singh,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 11:01:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618552#M1088123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T11:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: help required for assignment operators in OO ABAP context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618553#M1088124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;?= is Wide casting or down cast&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this document which would give your more clear idea...&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f2dac69e-0e01-0010-e2b6-81c1e8e5ce50" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f2dac69e-0e01-0010-e2b6-81c1e8e5ce50&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 11:04:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618553#M1088124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T11:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: help required for assignment operators in OO ABAP context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618554#M1088125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Harmeet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P_SOURCE is an itab. &lt;/P&gt;&lt;P&gt;Method cl_abap_typedescr=&amp;gt;describe_by_name returns a reference variable of TYPE REF TO cl_abap_typedescr of which CL_ABAP_TABLEDESCR (lit_table_desc) is a subclass:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CL_ABAP_TYPEDESCR&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;CL_ABAP_DATADESCR&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;CL_ABAP_TABLEDESCR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, we have a narrowing casting (down casting):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lit_table_desc ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_source ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_SOURCE contains a DATA reference presumably to a line of the itab which can be de-referenced to dynamically create the structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: wa_source   TYPE REF TO data.

FIELD-SYMBOS: &amp;lt;wa_source&amp;gt;     TYPE any.  

GET REFERENCE OF p_source INTO wa_source.
ASSIGN wa_source-&amp;gt;* TO &amp;lt;wa_source&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 11:12:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618554#M1088125</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-10-09T11:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: help required for assignment operators in OO ABAP context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618555#M1088126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harmeet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The operators are Widening CAST and Narrowing Cast.&lt;/P&gt;&lt;P&gt;Please check this thread related to casting with example and also with explanation&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="4388544"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And check these threads too&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5926308"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5417941"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this would help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Narin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 07:47:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618555#M1088126</guid>
      <dc:creator>narin_nandivada3</dc:creator>
      <dc:date>2008-10-13T07:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: help required for assignment operators in OO ABAP context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618556#M1088127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method cl_abap_typedescr=&amp;gt;describe_by_name returns a reference variable of TYPE REF TO cl_abap_typedescr of which CL_ABAP_TABLEDESCR (lit_table_desc) is a subclass:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CL_ABAP_TYPEDESCR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          o CL_ABAP_DATADESCR&lt;/P&gt;&lt;P&gt;                + CL_ABAP_TABLEDESCR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, we have a narrowing casting (down casting):&lt;/P&gt;&lt;P&gt;lit_table_desc ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_source ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uwe, isn't it a widenning cast? We change from more general view to more specialized, thus it is a widdening, although called down cast:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 08:33:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-for-assignment-operators-in-oo-abap-context/m-p/4618556#M1088127</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2008-10-13T08:33:24Z</dc:date>
    </item>
  </channel>
</rss>

