Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CL_GUI_HTML_VIEWER : Methods to set and get cookies

Former Member
0 Kudos
403

I am searching for methods to access and set cookies in the browser window which is to be displayed within the control.

Is there any possibility in this class or in another class?

Thanks,

Michael

3 REPLIES 3

Former Member
0 Kudos
107

Couldn't you just use a HTML page to set the cookies you want (http://www.w3schools.com/JS/js_cookies.asp)?... the "set cookies" page could have an automatic redirect (http://w3schools.com/html/tryit.asp?filename=tryhtml_redirect) if you wanted to set the cookies before showing the user another page.

Jonathan

Former Member
0 Kudos
107

Well, the question is if that's supported within the HTML_Viewer control. Sounds risky to me.

The requirement is to stay in the ABAP environment without putting some functionality to an external JavaScript page.

Thanks,

Michael

0 Kudos
107

What's the underlying requirement... for example could you just persist the values within a custom table in SAP, or look at the methods in the class CL_BSP_SERVER_SIDE_COOKIE ( http://help.sap.com/saphelp_nw70/helpdata/EN/9f/389f2d3bdf44e88b51f203a4178ae7/frameset.htm )..?

btw, I wasn't thinking of using an external page with the javascript but one built inside ABAP in memory and use "load_data" method of the viewer to display the page... I'll try it sometime with the cookie logic, if I get a chance.

Jonathan