on 05-17-2006 1:56 PM
Hi!
Is it possible for a webdynpro to get the Data that is stored in the client data bag?? I make use of some sap bussiness package iviews and they often store the parameters in the client data bag. Now i want to get these parameters to use them in a webdynpro.
I know that webdynpro does not support scripting so i cannot use
EPCM.loadClientData("urn:com.sap.bor:BUS0010","objid");
because EPCM is a javascript object.
Is there any other way to get that Data?
Thanks!
One more thing. I cannot import the class javax.servlet.http.Cookie and the webdynpro does not know what a Cookie[] is....
How have you solved the import?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot, it works now!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thats a good idea...could you give me some source code on how to do this??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is code, I use (but be warned: SAP wouldn't like it, because we're using the unsupported TaskBinder in a WD application. anyway, it works for us
Cookie[] mycookies = TaskBinder.getCurrentTask().getWebContextAdapter().getHttpServletRequest().getCookies();
for (int i = 0; i < mycookies.length; i++) {
if (mycookies<i>.getName().equals("SAPPORTALSDB0")) {
String cookie = "";
try {
cookie = URLDecoder.decode(URLDecoder.decode(mycookies<i>.getValue(), "UTF-8"), "UTF-8");
} catch (UnsupportedEncodingException ex) {
// do something
}
String[] ckeys = cookie.split(";");
// in this array are your values
}
}
Andreas,
because the client data bag is stored as a cookie, i wrote my own routine to extract the needed data from the data bag out of this cookie.
but it's no API or something like that, just a straightforward approach for my personal needs...
kr, achim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
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.