SAP Function Modules

RSPC_GET_DELAY SAP Function module - Calculate expected next start







RSPC_GET_DELAY is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RSPC_GET_DELAY into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RSPC_BACKEND
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RSPC_GET_DELAY - RSPC GET DELAY





CALL FUNCTION 'RSPC_GET_DELAY' "Calculate expected next start
  EXPORTING
    i_chain =                   " rspc_chain    Process Chain
*   i_logid =                   " rspc_logid    Log ID of a Process Chain Run
  IMPORTING
    e_next_start_date =         " sydatum       Current Date of Application Server
    e_next_start_time =         " syuzeit       Current Time of Application Server
    e_act_delay =               " rspc_runtime  Runtime: Seconds with Decimal Places
    e_avg_delta =               " rspc_runtime  Runtime: Seconds with Decimal Places
    e_avg_delay =               " rspc_runtime  Runtime: Seconds with Decimal Places
    e_s_job =                   " tbtcjob       Structure for Transferring Job Header Data (BI-API)
    e_t_starttimes =            " rspc_t_starttimes  Start Times on Time Axis
    e_predecessor_weekday =     " rspc_weekday  Day of Week
  EXCEPTIONS
    FAILED = 1                  "               General Error
    UNREGULAR = 2               "               Chain has no detectable periodicity
    UNSCHEDULED = 3             "               Chain is not currently scheduled
    SCHEDULING_ERROR = 4        "               Chain is not properly planned
    UNUSED = 5                  "               Chain ihas not run for a longer time
    .  "  RSPC_GET_DELAY

ABAP code example for Function Module RSPC_GET_DELAY





The ABAP code below is a full code listing to execute function module RSPC_GET_DELAY including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_e_next_start_date  TYPE SYDATUM ,
ld_e_next_start_time  TYPE SYUZEIT ,
ld_e_act_delay  TYPE RSPC_RUNTIME ,
ld_e_avg_delta  TYPE RSPC_RUNTIME ,
ld_e_avg_delay  TYPE RSPC_RUNTIME ,
ld_e_s_job  TYPE TBTCJOB ,
ld_e_t_starttimes  TYPE RSPC_T_STARTTIMES ,
ld_e_predecessor_weekday  TYPE RSPC_WEEKDAY .

DATA(ld_i_chain) = 'Check type of data required'.
DATA(ld_i_logid) = 'Check type of data required'. . CALL FUNCTION 'RSPC_GET_DELAY' EXPORTING i_chain = ld_i_chain * i_logid = ld_i_logid IMPORTING e_next_start_date = ld_e_next_start_date e_next_start_time = ld_e_next_start_time e_act_delay = ld_e_act_delay e_avg_delta = ld_e_avg_delta e_avg_delay = ld_e_avg_delay e_s_job = ld_e_s_job e_t_starttimes = ld_e_t_starttimes e_predecessor_weekday = ld_e_predecessor_weekday EXCEPTIONS FAILED = 1 UNREGULAR = 2 UNSCHEDULED = 3 SCHEDULING_ERROR = 4 UNUSED = 5 . " RSPC_GET_DELAY
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_next_start_date  TYPE SYDATUM ,
ld_i_chain  TYPE RSPC_CHAIN ,
ld_e_next_start_time  TYPE SYUZEIT ,
ld_i_logid  TYPE RSPC_LOGID ,
ld_e_act_delay  TYPE RSPC_RUNTIME ,
ld_e_avg_delta  TYPE RSPC_RUNTIME ,
ld_e_avg_delay  TYPE RSPC_RUNTIME ,
ld_e_s_job  TYPE TBTCJOB ,
ld_e_t_starttimes  TYPE RSPC_T_STARTTIMES ,
ld_e_predecessor_weekday  TYPE RSPC_WEEKDAY .

ld_i_chain = 'Check type of data required'.
ld_i_logid = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RSPC_GET_DELAY or its description.