Application Development and Automation 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: 
Read only

Function C_SAPGPARAM not working to get rdisp/plugin_auto_logout value...

Former Member
0 Likes
1,928

Hi folks,

I have this abap code where I am trying to get the value for the timeout parameter..'rdisp/plugin_auto_logout'...but it does not seem to work it comes back with 0 whereas the system has a value of 900 (verified using rz11)....thanks...

<%

data: name TYPE String.

data: timeoutStr type String.

data: value type i.

data: timeout type i.

name = 'rdisp/plugin_auto_logout'.

call 'C_SAPGPARAM' id 'NAME' field name

id 'VALUE' field value.

timeout = value - 780.

timeout = timeout * 1000.

timeoutStr = timeout.

%>

Thanks,

Venkatesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
919

Hi

Try this:

DATA: NAME TYPE TPFYDOC-PARANAME.
DATA: TIMEOUTSTR TYPE STRING.
DATA: VALUE TYPE I.
DATA: TIMEOUT TYPE I,
      USR_PARVALUE(60),
      SHM_PARVALUE(60).

NAME = 'rdisp/plugin_auto_logout'.

CALL 'C_SAPGPARAM' ID 'NAME'    FIELD NAME
                   ID 'VALUE34' FIELD USR_PARVALUE
                   ID 'VALUE44' FIELD SHM_PARVALUE.

MOVE USR_PARVALUE TO VALUE.

TIMEOUT = VALUE - 780.
TIMEOUT = TIMEOUT * 1000.
TIMEOUTSTR = TIMEOUT.

Max

Hi folks,

I have this abap code where I am trying to get the value for the timeout parameter..'rdisp/plugin_auto_logout'...but it does not seem to work it comes back with 0 whereas the system has a value of 900 (verified using rz11)....thanks...

<%

data: name TYPE String.

data: timeoutStr type String.

data: value type i.

data: timeout type i.

name = 'rdisp/plugin_auto_logout'.

call 'C_SAPGPARAM' id 'NAME' field name

id 'VALUE' field value.

timeout = value - 780.

timeout = timeout * 1000.

timeoutStr = timeout.

%>

Thanks,

Venkatesh

3 REPLIES 3
Read only

Former Member
0 Likes
920

Hi

Try this:

DATA: NAME TYPE TPFYDOC-PARANAME.
DATA: TIMEOUTSTR TYPE STRING.
DATA: VALUE TYPE I.
DATA: TIMEOUT TYPE I,
      USR_PARVALUE(60),
      SHM_PARVALUE(60).

NAME = 'rdisp/plugin_auto_logout'.

CALL 'C_SAPGPARAM' ID 'NAME'    FIELD NAME
                   ID 'VALUE34' FIELD USR_PARVALUE
                   ID 'VALUE44' FIELD SHM_PARVALUE.

MOVE USR_PARVALUE TO VALUE.

TIMEOUT = VALUE - 780.
TIMEOUT = TIMEOUT * 1000.
TIMEOUTSTR = TIMEOUT.

Max

Read only

Former Member
0 Likes
919

Thanks for the reply,

The code works perfect when written as a standalone abap program,

but when I have it in the document_body.htm file in the BSP application

hap_document (for priorities in ESS) I get an error saying..thx for your help though..

Access is Denied..

and it does not work in the bsp page...here is my code....

-


<script type="text/javascript">

alert("You have just wasted 10 seconds of your life.");

function remind() {

var msg = "Your Session will be timed out in 5 minutes";

alert(msg);

}

</script>

<htmlb:content design="design2003" >

<%

DATA: NAME TYPE TPFYDOC-PARANAME.

DATA: TIMEOUTSTR TYPE STRING.

DATA: VALUE TYPE I.

DATA: TIMEOUT TYPE I,

USR_PARVALUE(60),

SHM_PARVALUE(60).

NAME = 'rdisp/plugin_auto_logout'.

CALL 'C_SAPGPARAM' ID 'NAME' FIELD NAME

ID 'VALUE34' FIELD USR_PARVALUE

ID 'VALUE44' FIELD SHM_PARVALUE.

MOVE USR_PARVALUE TO VALUE.

TIMEOUT = VALUE - 820.

TIMEOUT = TIMEOUT * 1000.

TIMEOUTSTR = TIMEOUT.

%>

</htmlb:content>

<script type="text/javascript">

setTimeout("remind()",<%=TIMEOUT %>);

</script>

Read only

Former Member
0 Likes
919

Thanks for the reply..this works fine now....

I had some silly mistake in my code ...

your solution workes perfectly.....

I'm awarding u full points for the help...thanks...