on 08-08-2007 3:31 PM
Hallo,
in my BSP I want to transform my model object into a xml string to set an server side cookie.
Therefore my code is:
DATA:
lv_xml TYPE string,
lv_username TYPE string.
model ?= get_model( model_id = 'main' ).
lv_username = sy-uname.
Call TRANSFORMATION id SOURCE o = model RESULT XML lv_xml.
cl_bsp_server_side_cookie=>set_server_cookie(
name = 'MODEL'
application_name = runtime->application_name
application_namespace = runtime->application_namespace
username = lv_username
session_id = runtime->session_id
data_value = lv_xml
data_name = 'MODEL'
expiry_time_rel = 3600 ).
But after the command "Call Transformation" the xml-string doesn't contain all the data of my object, only this:
<?xml version="1.0" encoding="iso-8859-1"?>#<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><O href="#o19"/></asx:values><asx:heap xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:abap="http://www.sap.com/abapxml/types/built-in" xmlns:cls="http://www.sap.com/abapxml/classes/global" xmlns:dic="http://www.sap.com/abapxml/types/dictionary"> <cls:ZCL_M_ESS_TRV_OVW id="o19"/
></asx:heap></asx:abap>
What is wrong?
Regards.
Martin
Hallo back,
try inserting the following interface to your model IF_SERIALIZABLE_OBJECT.
If you want to transform objects via referenz into an xml-string you need to serialize your class attributes via the above mentioned interface.
don't forget adding points if problem is solved...
cheers
Felix
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.