on 07-31-2009 2:54 PM
Hi,
I have a situation where I am working with 2 different WD applications.
I have passed URL parameters between 2 WD applications but now I am interested in passing context itself.When I posted this question in forum I got some suggestions but i have never done this before.
Any idea on FM or class which would help in doing following process?
How do we convert Internal table to XML?
How do we store this XML as Server Cookie in database?
How can we generate a unique key like GUID?
How can we deserialize it & populate it to context?
Rgds
Vara
>How do we convert Internal table to XML?
With the Call Transformation ABAP syntax. You can use the built in XSLT ID. Here is a sample:
data: ostream type string.
call transformation id
source itab = isflight
result xml ostream.
>How do we store this XML as Server Cookie in database?
Use the class cl_bsp_server_side_cookie=>set_server_cookie.
cl_bsp_server_side_cookie=>set_server_cookie( name = data_name
application_name = ''
application_namespace = ''
username = ''
session_id = ''
data_name = data_name "Your GUID
data_value = ostream
expiry_time_rel = '1200' ).
>How can we generate a unique key like GUID?
data: guid_22 type guid_22.
call function 'GUID_CREATE'
importing
ev_guid_22 = guid_22.
>How can we deserialize it & populate it to context?
Deserialize uses the same Call Transformation statement as the serialization, just reverse the parameters:
call method cl_bsp_server_side_cookie=>get_server_cookie
exporting
name = data_name "GUID
application_name = ''
application_namespace = ''
username = ''
session_id = ''
data_name = data_name "GUID
changing
data_value = istream.
**** deserialize the Class
if istream is not initial.
try.
call transformation id
source xml istream
result itab = isflight.
catch cx_xslt_exception into xslt_err.
endtry.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much Thomas.
You are simply Great!!! Awarded full points.
Rgds
Vara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.