cancel
Showing results for 
Search instead for 
Did you mean: 

Setting value in cookie using ABAP code

Former Member
0 Kudos

Hai All,

Is it possible to set value in a cookie using ABAP code.

Regards,

H.K.Hayath Basha.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hai Thomas Jung,

Do you mean that from Java webdynpro also we can not call a javascript.

Yes I have to change all single application and we are ready to do that.

Yes, we are going to use all custom application.

KM and collaboration we are not going to use.

We have only one Iview in a page.

Third party application are not integrated with portal.

Is there any way to implement the business requirement.

Hai kanki kovana,

Can you explain a bit on "timed_trigger element and some sicf configuratio..."

Thanks & Regards,

H.K.Hayath Basha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Do you mean that from Java webdynpro also we can not call a javascript.

Yes - same intentional design restriction.

Answers (5)

Answers (5)

Former Member
0 Kudos

I just wondering is this possible via timed_trigger element and some sicf configuratio...

Former Member
0 Kudos

Hai Thomas Jung,

In Enterprise portal SAP has standard functionality to set inactivity timeout. We can set whatever time we want, say for example if we set the time as 15 minutes. If the user is not interacting with the system for 15 minutes then portal will logout the user automatically without any information.

Our user wants a popup to be shown that the system will be logged out due to inactivity.

Since Portal logout the user automatically without any information. I want to put in my own framework to handle inactivity timeout.

What idea I have is, when ever user interacts with any function in portal. I will set current time in a cookie. Someother application will read this cookie at regular interval, if the time difference between the cookie and system is 15, then I will force the user to logout by showing a popup screen.

In our portal we have three different type of application, they are, Java Webdynpro, ABAP-Webdynpro and BSP.

I think that from Java Webdynpro and BSP we can call a javascript to set value in a cookie, from ABAP-Webdynpro I don't know how to set a value in cookie.

This is my business requirement. Is there anyother solution to fullfill this business requirement.

Thanks & Regards,

H.K.Hayath Basha.

Let me tell the business requirement. Our user want to give a popup message when

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Web Dynpro Java has the same limitations of not being able to set a cookie as Web Dynporo ABAP. That has to do with the design of Web Dynpro.

This requirement seems massive. You would have to change every single application that runs within the portal. Are you assuming that every application is a custom application? Are you going to start altering every SAP delivered transaction as well? What about the standard portal components like KM, collaboration rooms, etc - are you going to alter these as well? What happens when you have more than one iView in a page? What if you integrate 3rd party packaged applications into your portal?

It seems like a requirement where the business doesn't understand the massive cost that it will require - not only upfront but in the long term.

Former Member
0 Kudos

Hai Jatra,

Can you explain how to it in a illegal way.

Regards,

H.K.Hayath Basha.

Former Member
0 Kudos

Hai Jatra,

Can you explain how to it in a illegal way.

Regards,

H.K.Hayath Basha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I think it is important to understand that if someone does post a "hack" or "illegal" way of setting the client cookie directly from Web Dynpro; this would not be supported by SAP and could stop working at any time.

You should perhaps consider alternatives. What exactly are the business requirements that you are trying to acomplish by setting the value in a cookie? Perhaps if you explain the requirements, we might be able to suggest a way to meet those requirements without going outside the bounds expected by the Web Dynpro framework.

Former Member
0 Kudos

Hi,

There is 2 kind of cookies, Client side cookie and Server side cookie.

In WDA, you can not read/write to client side cookie, except using "illegal" way.

To use server side cookie, you can use class: CL_BSP_SERVER_SIDE_COOKIE with methods: GET_SERVER_COOKIE and SET_SERVER_COOKIE.

Regards,