<?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: short dumps of  CL_PERS_OBJECT_DATA using Set_data method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dumps-of-cl-pers-object-data-using-set-data-method/m-p/7011386#M1496733</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This object must be instantiated first in order you can call its instance methods. &lt;/P&gt;&lt;P&gt;As it has private instantiation you are able to do so only be means of &lt;EM&gt;create_object&lt;/EM&gt; static method, giving the key on the input. Then you use the returned instance for further processing. This goes like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: rf_pers_object TYPE REF TO cl_pers_object_data.
TYPES:
ty_spers_obj TYPE spers_obj.

DATA: pers_key TYPE spers_key.

DATA: lta_personalization TYPE TABLE OF ty_spers_obj.

"first extract the key, I took first found
SELECT SINGLE pers_key FROM spers_regt
      INTO pers_key
      WHERE lang = 'EN'.
CHECK sy-subrc = 0.

"then create the object
CALL METHOD cl_pers_object_data=&amp;gt;create_object
  EXPORTING
    p_pers_key = pers_key  
  RECEIVING
    r_object   = rf_pers_object.  "and receive the object instance


"now call the instance method
CALL METHOD rf_pers_object-&amp;gt;set_data
  EXPORTING
    p_pers_data     = lta_personalization
    p_write_through = space
  EXCEPTIONS
    data_type_error = 1
    internal_error  = 2
    OTHERS          = 3.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Of course the &lt;EM&gt;pers_key&lt;/EM&gt; must be provided by you. I assume you know one you want to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also refer standard program &lt;STRONG&gt;R_USER_DEFAULTS&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcin Pciak on Jun 25, 2010 9:35 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jun 2010 07:34:29 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2010-06-25T07:34:29Z</dc:date>
    <item>
      <title>short dumps of  CL_PERS_OBJECT_DATA using Set_data method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dumps-of-cl-pers-object-data-using-set-data-method/m-p/7011385#M1496732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting shortdumps on the class CL_PERS_OBJECT_DATA when calling set_data method. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error message is OBJECTS_OBJREF_NOT_ASSIGNED . There is one export parameter which of data type of "any" and mandantory.&lt;/P&gt;&lt;P&gt;The details of the code as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: rf_pers_object type ref to cl_pers_object_data.&lt;/P&gt;&lt;P&gt;types:&lt;/P&gt;&lt;P&gt; ty_spers_obj type spers_obj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lta_personalization type table of ty_spers_obj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method rf_pers_object-&amp;gt;set_data&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      p_pers_data     = lta_personalization&lt;/P&gt;&lt;P&gt;      p_write_through = space&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      data_type_error = 1&lt;/P&gt;&lt;P&gt;      internal_error  = 2&lt;/P&gt;&lt;P&gt;      others          = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    raise pers_object_error.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please what exactly this means where i am missing the point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any adivse early is much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Good_Guy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jun 2010 05:11:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dumps-of-cl-pers-object-data-using-set-data-method/m-p/7011385#M1496732</guid>
      <dc:creator>chandra_bangalore</dc:creator>
      <dc:date>2010-06-25T05:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: short dumps of  CL_PERS_OBJECT_DATA using Set_data method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dumps-of-cl-pers-object-data-using-set-data-method/m-p/7011386#M1496733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This object must be instantiated first in order you can call its instance methods. &lt;/P&gt;&lt;P&gt;As it has private instantiation you are able to do so only be means of &lt;EM&gt;create_object&lt;/EM&gt; static method, giving the key on the input. Then you use the returned instance for further processing. This goes like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: rf_pers_object TYPE REF TO cl_pers_object_data.
TYPES:
ty_spers_obj TYPE spers_obj.

DATA: pers_key TYPE spers_key.

DATA: lta_personalization TYPE TABLE OF ty_spers_obj.

"first extract the key, I took first found
SELECT SINGLE pers_key FROM spers_regt
      INTO pers_key
      WHERE lang = 'EN'.
CHECK sy-subrc = 0.

"then create the object
CALL METHOD cl_pers_object_data=&amp;gt;create_object
  EXPORTING
    p_pers_key = pers_key  
  RECEIVING
    r_object   = rf_pers_object.  "and receive the object instance


"now call the instance method
CALL METHOD rf_pers_object-&amp;gt;set_data
  EXPORTING
    p_pers_data     = lta_personalization
    p_write_through = space
  EXCEPTIONS
    data_type_error = 1
    internal_error  = 2
    OTHERS          = 3.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Of course the &lt;EM&gt;pers_key&lt;/EM&gt; must be provided by you. I assume you know one you want to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also refer standard program &lt;STRONG&gt;R_USER_DEFAULTS&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcin Pciak on Jun 25, 2010 9:35 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jun 2010 07:34:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dumps-of-cl-pers-object-data-using-set-data-method/m-p/7011386#M1496733</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-06-25T07:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: short dumps of  CL_PERS_OBJECT_DATA using Set_data method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dumps-of-cl-pers-object-data-using-set-data-method/m-p/7011387#M1496734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for kind help.&lt;/P&gt;&lt;P&gt;This has been resolved.&lt;/P&gt;&lt;P&gt;Your time and help much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jun 2010 04:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dumps-of-cl-pers-object-data-using-set-data-method/m-p/7011387#M1496734</guid>
      <dc:creator>chandra_bangalore</dc:creator>
      <dc:date>2010-06-28T04:45:46Z</dc:date>
    </item>
  </channel>
</rss>

