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: 

determine/read the value of parameter rdisp/max_wprun_time within ABAP

Former Member
0 Kudos

Hi,

I need to avoid program breaks caused by exceeding run time longer than defined in parameter rdisp/max_wprun_time.

I will check the time since start of report in the critcal loop to bring the current data changes to a controlled end before getting a program break. I won't put a constant to the report, I will have a dynamical routine to avoid changes of report if the value of parameter rdisp/max_wprun_time will be changed.

But how can I get the value of this parameter within my ABAP report? Is there a table where this value has been stored? Is there an existing function module or a method to read the value?

Thank's a lot in advance!

Georg

1 ACCEPTED SOLUTION

kesavadas_thekkillath
Active Contributor
0 Kudos

Hi,

@shankar - Call system command must not be coded by the customer. SAP documentation warns about that.

The table is TPFYPROPTY.. Pass RDISP/MAX_WPRUN_TIME to TPFYPROPTY-object and rdisp/max_wprun_time to TPFYPROPTY-PARANAME. The values will be available in field VMIN and VMAX.

6 REPLIES 6

mithun_shetty4
Contributor
0 Kudos

The runtime parameter (GET RUN TIME ) can be used to dynamically get the program run time


DATA T TYPE I.

GET RUN TIME FIELD T.
WRITE: / 'Runtime', T.

or

U probably can store the start date and time in TVARV with some variable ( line concatenate program name + START Date + Time)

and then use

SD_DATETIME_DIFFERENCE

or

SD_CALC_DURATION_FROM_DATETIME

Regards,

Mithun Shetty

Former Member

Hi,

Check below..

data: old_value(100).
CONSTANTS: parameter LIKE tpfet-parname 
VALUE 'rdisp/max_wprun_time'.
 
CALL 'C_SAPGPARAM' ID 'NAME' FIELD parameter
 ID 'VALUE' FIELD old_value. " old_value will have value set by Administrator
 IF sy-subrc  0.
  RAISE not_found.
  ENDIF.

Regards,

Ravi.

Former Member
0 Kudos

Hi Georg,

Please check the following threads

[Thread 1|;

[Thread 2|;

Use FM : RSAN_SYSTEM_PARAMETER_READ

Regards,

Ravi

kesavadas_thekkillath
Active Contributor
0 Kudos

Hi,

@shankar - Call system command must not be coded by the customer. SAP documentation warns about that.

The table is TPFYPROPTY.. Pass RDISP/MAX_WPRUN_TIME to TPFYPROPTY-object and rdisp/max_wprun_time to TPFYPROPTY-PARANAME. The values will be available in field VMIN and VMAX.

0 Kudos

Dear Keshav,

Thanks to enlighten me about Call. Thanks expert.

Regards,

Ravi.

0 Kudos

Looks like as of SAP6.0, the table TPFYPROPTY returns a different (wrong) value than the call.

In our system, the table shows 20,000 but the value is actually 600.

Would recommend using the system call instead (have not found an RFC for this and SXPG_CALL_SYSTEM did not seem to work), as long you use constants for the pass-in values there is no possibility of command injection.

I found this topic Googling and I leave this information in hopes future information-seekers will find it helpful