<?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: Method return parameter of typ ref in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-return-parameter-of-typ-ref/m-p/1052058#M89477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@manuel: the method call is made inside the object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ravi: they have the same typ in the definition. why should they have different typs for the compiler? or did u mean something different?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Nov 2005 12:12:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-09T12:12:43Z</dc:date>
    <item>
      <title>Method return parameter of typ ref</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-return-parameter-of-typ-ref/m-p/1052055#M89474</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;im trying to return the value of a ref variable (pointer) in a method. But the compiler says "the result of the method is not convertable into a number." ???? Is there a prob with returning ref values? My code is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA structure_elem TYPE REF TO if_ixml_element.
DATA document_elem TYPE REF TO if_ixml_element.

structure_elem = setTag(
                        tagName          = 'STRUCTURE'
                        tagValue         = ''
                        parentDomElement = document_elem
                       )
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method IMPLEMENTATION:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  METHOD setTag.

*         iXML
          ixml               TYPE REF TO if_ixml,
          document           TYPE REF TO if_ixml_document,
          attributeElement   TYPE REF TO if_ixml_element,
          attributeValue     TYPE REF TO if_ixml_text.

    CLASS cl_ixml DEFINITION LOAD.
    ixml = cl_ixml=&amp;gt;create( ).
    document = ixml-&amp;gt;create_document( ).

    newDomElement = document-&amp;gt;create_element( 
                                            name = tagName 
                                            ).
  ENDMETHOD.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Method DEFINTION:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
      setTag
        IMPORTING
          TagName           TYPE STRING
          TagValue          TYPE STRING
          parentDomElement  TYPE REF TO if_ixml_element
        RETURNING
          VALUE(newDomElement) TYPE REF TO if_ixml_element
        .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 10:55:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-return-parameter-of-typ-ref/m-p/1052055#M89474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T10:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Method return parameter of typ ref</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-return-parameter-of-typ-ref/m-p/1052056#M89475</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;&lt;/P&gt;&lt;P&gt;i think that in in code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
structure_elem = setTag(
                        tagName          = 'STRUCTURE'
                        tagValue         = ''
                        parentDomElement = document_elem
                       )
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the specification of the object is missing. Try something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
structure_elem = AN_OBJECT-&amp;gt;setTag(
                        tagName          = 'STRUCTURE'
                        tagValue         = ''
                        parentDomElement = document_elem
                       )
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead you can also declare the method setTag as STATIC&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
structure_elem = A_CLASS=&amp;gt;setTag(
                        tagName          = 'STRUCTURE'
                        tagValue         = ''
                        parentDomElement = document_elem
                       )
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code structure_elem = setTag( ... ) seems to be te call of arithmetic function like abs(...) or ceil(...)&lt;/P&gt;&lt;P&gt;Regards, Manuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 11:30:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-return-parameter-of-typ-ref/m-p/1052056#M89475</guid>
      <dc:creator>manuel_bassani</dc:creator>
      <dc:date>2005-11-09T11:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Method return parameter of typ ref</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-return-parameter-of-typ-ref/m-p/1052057#M89476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;In the code&lt;/P&gt;&lt;P&gt;    newDomElement = document-&amp;gt;create_element( &lt;/P&gt;&lt;P&gt;                                            name = tagName &lt;/P&gt;&lt;P&gt;                                            ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the returning parameter's type of &amp;lt;b&amp;gt;document-&amp;gt;create_element()&amp;lt;/b&amp;gt; method? The compilers error may be regarding this line.&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>Wed, 09 Nov 2005 11:36:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-return-parameter-of-typ-ref/m-p/1052057#M89476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T11:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Method return parameter of typ ref</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-return-parameter-of-typ-ref/m-p/1052058#M89477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@manuel: the method call is made inside the object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ravi: they have the same typ in the definition. why should they have different typs for the compiler? or did u mean something different?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 12:12:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-return-parameter-of-typ-ref/m-p/1052058#M89477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T12:12:43Z</dc:date>
    </item>
  </channel>
</rss>

