SAP ORA_SNAP_CHECK_DB_RESTART Function Module for Check if there was a DB restart between snapshots









ORA_SNAP_CHECK_DB_RESTART is a standard ora snap check db restart SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check if there was a DB restart between snapshots processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for ora snap check db restart FM, simply by entering the name ORA_SNAP_CHECK_DB_RESTART into the relevant SAP transaction such as SE37 or SE38.

Function Group: STD9
Program Name: SAPLSTD9
Main Program: SAPLSTD9
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function ORA_SNAP_CHECK_DB_RESTART pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'ORA_SNAP_CHECK_DB_RESTART'"Check if there was a DB restart between snapshots
EXPORTING
* INSTANCE_ID = "Instance ID (empty means: check for all instances)
SNAPSHOT_FROM = "Selected 'from - snapshot'
SNAPSHOT_TO = "Selected 'to - snapshot' - maybe empty for 'up to now'

IMPORTING
X_RESTART = "Flag: there was at least one restart (value 'X')
RESTART_LIST = "All instances that have been restarted between selected snapshots

EXCEPTIONS
SNAPSHOT_FROM_UNSPECIFIED = 1 SNAPSHOT_NOT_FOUND = 2 INSTANCE_NOT_FOUND = 3
.



IMPORTING Parameters details for ORA_SNAP_CHECK_DB_RESTART

INSTANCE_ID - Instance ID (empty means: check for all instances)

Data type: ORA_INST_ID
Optional: Yes
Call by Reference: Yes

SNAPSHOT_FROM - Selected 'from - snapshot'

Data type: ORA_SNAPSHOT_ID
Optional: No
Call by Reference: Yes

SNAPSHOT_TO - Selected 'to - snapshot' - maybe empty for 'up to now'

Data type: ORA_SNAPSHOT_ID
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for ORA_SNAP_CHECK_DB_RESTART

X_RESTART - Flag: there was at least one restart (value 'X')

Data type: XFELD
Optional: No
Call by Reference: Yes

RESTART_LIST - All instances that have been restarted between selected snapshots

Data type: ORA_T_RESTART
Optional: No
Call by Reference: Yes

EXCEPTIONS details

SNAPSHOT_FROM_UNSPECIFIED - Selected 'from snapshot' ID was not specified

Data type:
Optional: No
Call by Reference: Yes

SNAPSHOT_NOT_FOUND - At least one snapshot was not found in the database

Data type:
Optional: No
Call by Reference: Yes

INSTANCE_NOT_FOUND - Instance ID does not exist

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ORA_SNAP_CHECK_DB_RESTART Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_x_restart  TYPE XFELD, "   
lv_instance_id  TYPE ORA_INST_ID, "   
lv_snapshot_from_unspecified  TYPE ORA_INST_ID, "   
lv_restart_list  TYPE ORA_T_RESTART, "   
lv_snapshot_from  TYPE ORA_SNAPSHOT_ID, "   
lv_snapshot_not_found  TYPE ORA_SNAPSHOT_ID, "   
lv_snapshot_to  TYPE ORA_SNAPSHOT_ID, "   
lv_instance_not_found  TYPE ORA_SNAPSHOT_ID. "   

  CALL FUNCTION 'ORA_SNAP_CHECK_DB_RESTART'  "Check if there was a DB restart between snapshots
    EXPORTING
         INSTANCE_ID = lv_instance_id
         SNAPSHOT_FROM = lv_snapshot_from
         SNAPSHOT_TO = lv_snapshot_to
    IMPORTING
         X_RESTART = lv_x_restart
         RESTART_LIST = lv_restart_list
    EXCEPTIONS
        SNAPSHOT_FROM_UNSPECIFIED = 1
        SNAPSHOT_NOT_FOUND = 2
        INSTANCE_NOT_FOUND = 3
. " ORA_SNAP_CHECK_DB_RESTART




ABAP code using 7.40 inline data declarations to call FM ORA_SNAP_CHECK_DB_RESTART

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!