<?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: Casting c to string in a methode calling in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/casting-c-to-string-in-a-methode-calling/m-p/2301236#M502919</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Torsten,&lt;/P&gt;&lt;P&gt;There is no other way as far as I know...Might be in release 7.10, but I have no info about it.&lt;/P&gt;&lt;P&gt;Casting exist also in ABAP, but only for objects:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: dref1 TYPE REF TO i, 
      dref2 TYPE REF TO data. 

CREATE DATA dref1. 
dref2 = dref1. 
CREATE DATA dref2 TYPE string. 

TRY. 
  dref1 ?= dref2. 
  CATCH cx_sy_move_cast_error. 
  ... 
ENDTRY. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree, that it would be quite useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2007 12:55:26 GMT</pubDate>
    <dc:creator>Peter_Inotai</dc:creator>
    <dc:date>2007-05-14T12:55:26Z</dc:date>
    <item>
      <title>Casting c to string in a methode calling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/casting-c-to-string-in-a-methode-calling/m-p/2301235#M502918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;I've a methode with a string paramter like: code]methode(i_param TYPE string)[/code].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the calling methode the parameter value &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;l_value&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; for i_param is stored in a variable from type c.&lt;/P&gt;&lt;P&gt;In java I would like call: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;methode((string) l_value)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; (For all java guys: I know that casting between basic types and objects are not possible, but I belive string isn't an object in ABAP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any simular way in ABAP or is this me way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;         DATA: l_value_string TYPE string. 
         MOVE l_value TO l_value_string. 
         methode( l_value_string ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Torsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 12:41:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/casting-c-to-string-in-a-methode-calling/m-p/2301235#M502918</guid>
      <dc:creator>Torsten_</dc:creator>
      <dc:date>2007-05-14T12:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Casting c to string in a methode calling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/casting-c-to-string-in-a-methode-calling/m-p/2301236#M502919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Torsten,&lt;/P&gt;&lt;P&gt;There is no other way as far as I know...Might be in release 7.10, but I have no info about it.&lt;/P&gt;&lt;P&gt;Casting exist also in ABAP, but only for objects:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: dref1 TYPE REF TO i, 
      dref2 TYPE REF TO data. 

CREATE DATA dref1. 
dref2 = dref1. 
CREATE DATA dref2 TYPE string. 

TRY. 
  dref1 ?= dref2. 
  CATCH cx_sy_move_cast_error. 
  ... 
ENDTRY. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree, that it would be quite useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 12:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/casting-c-to-string-in-a-methode-calling/m-p/2301236#M502919</guid>
      <dc:creator>Peter_Inotai</dc:creator>
      <dc:date>2007-05-14T12:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Casting c to string in a methode calling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/casting-c-to-string-in-a-methode-calling/m-p/2301237#M502920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Torsten&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are already working on SAP release 6.20 or higher then you can use static method &amp;lt;b&amp;gt;CL_ABAP_CONTAINER_UTILITIES=&amp;gt;FILL_CONTAINER_C&amp;lt;/b&amp;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>Mon, 14 May 2007 13:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/casting-c-to-string-in-a-methode-calling/m-p/2301237#M502920</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-05-14T13:00:30Z</dc:date>
    </item>
  </channel>
</rss>

