|
|
Organisation selection BSP - get server side cookie ( get_server_cookie )
This is the initial.htm page of the example SAP HR org structure BSP, this is being used
to demonstrate the use of javascript retrieve the SAP HR org structure and display it to the SAP bsp user. Please note this page will do very little on
it own and needs to be implemented as part of the whole SAP HR org structure BSP
*initial.htm
Type Definitions
----------------
TYPES: BEGIN OF t_orgdisplay,
level(40) TYPE c,
id type i,
parent type i,
objid TYPE hrp1001-objid,
orgtx type string,
begda TYPE hrp1001-begda,
endda TYPE hrp1001-endda,
display type string,
checked(1) type c,
END OF t_orgdisplay.
TYPES: tt_orgdisplay TYPE STANDARD TABLE OF t_orgdisplay.
Page Attributes
---------------
it_orgdisplay TYPE TT_ORGDISPLAY
p_windowsid TYPE STRING
On Initialization
---------
* event handler for data retrieval
DATA: a_name TYPE string VALUE 'NONE',
a_name_space TYPE string VALUE 'NONE',
u_name TYPE string VALUE 'NONE',
session_id TYPE string VALUE 'NONE'.
DATA: guid TYPE guid_22,
window_tab(25) TYPE c.
IF p_windowsid IS INITIAL.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_22 = guid.
p_windowsid = guid.
ENDIF.
cl_bsp_server_side_cookie=>get_server_cookie(
EXPORTING
name = p_windowsid
application_name = 'ORG_LIST'
application_namespace = runtime->application_namespace
username = sy-uname
session_id = 'SESSION_ID'
data_name = 'COOKIE_ID_43CASE1'
* IMPORTING
* EXPIRY_DATE =
* EXPIRY_TIME =
CHANGING
data_value = it_orgdisplay ).
Layout
------
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function goToURL() {
window.open ('orgselection.htm')
}
// End -->
</script>
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=500,height=600,scrollbars=yes');
return false;
}
//-->
</SCRIPT>
</head>
<body>
<A HREF="orgselection.htm?p_windowsid=<%=p_windowsid%>"
onClick="return popup(this, 'OrgUnit')"><img src="orgbutton.bmp"
rsrc="orgbutton2.bmp" border=0></A>
</body>
</html>
Website Navigation to related information
|