SAP C_ORA_US_SELECT_OPTIMIZED Function Module for Oracle monitoring: select db users optimized
C_ORA_US_SELECT_OPTIMIZED is a standard c ora us select optimized SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Oracle monitoring: select db users optimized 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 c ora us select optimized FM, simply by entering the name C_ORA_US_SELECT_OPTIMIZED into the relevant SAP transaction such as SE37 or SE38.
Function Group: S_ORA_COCKPIT_5
Program Name: SAPLS_ORA_COCKPIT_5
Main Program: SAPLS_ORA_COCKPIT_5
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function C_ORA_US_SELECT_OPTIMIZED 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 'C_ORA_US_SELECT_OPTIMIZED'"Oracle monitoring: select db users optimized.
EXPORTING
* USERNAME = "Oracle_monitoring: selection field
* CREATED_D_LOGIC = "Oracle monitoring: selection logic
* ACCOUNT_STAT = "Oracle_monitoring: selection field
* ACCOUNT_STAT_LOGIC = "Oracle monitoring: selection logic
* PROFILE = "Oracle_monitoring: selection field
* PROFILE_LOGIC = "Oracle monitoring: selection logic
* USERNAME_LOGIC = "Oracle monitoring: selection logic
* USERID = "Oracle_monitoring: selection field
* USERID_LOGIC = "Oracle monitoring: selection logic
* DEFT_TS = "Oracle_monitoring: selection field
* DEFT_TS_LOGIC = "Oracle monitoring: selection logic
* TEMP_TS = "Oracle_monitoring: selection field
* TEMP_TS_LOGIC = "Oracle monitoring: selection logic
* CREATED_D = "Oracle_monitoring: selection field
TABLES
TAB_US_LIST = "Oracle monitoring: user selection
IMPORTING Parameters details for C_ORA_US_SELECT_OPTIMIZED
USERNAME - Oracle_monitoring: selection field
Data type: DB02_SELOptional: Yes
Call by Reference: No ( called with pass by value option)
CREATED_D_LOGIC - Oracle monitoring: selection logic
Data type: DB02_SEL_LOGICOptional: Yes
Call by Reference: No ( called with pass by value option)
ACCOUNT_STAT - Oracle_monitoring: selection field
Data type: DB02_SELOptional: Yes
Call by Reference: No ( called with pass by value option)
ACCOUNT_STAT_LOGIC - Oracle monitoring: selection logic
Data type: DB02_SEL_LOGICOptional: Yes
Call by Reference: No ( called with pass by value option)
PROFILE - Oracle_monitoring: selection field
Data type: DB02_SELOptional: Yes
Call by Reference: No ( called with pass by value option)
PROFILE_LOGIC - Oracle monitoring: selection logic
Data type: DB02_SEL_LOGICOptional: Yes
Call by Reference: No ( called with pass by value option)
USERNAME_LOGIC - Oracle monitoring: selection logic
Data type: DB02_SEL_LOGICOptional: Yes
Call by Reference: No ( called with pass by value option)
USERID - Oracle_monitoring: selection field
Data type: DB02_SELOptional: Yes
Call by Reference: No ( called with pass by value option)
USERID_LOGIC - Oracle monitoring: selection logic
Data type: DB02_SEL_LOGICOptional: Yes
Call by Reference: No ( called with pass by value option)
DEFT_TS - Oracle_monitoring: selection field
Data type: DB02_SELOptional: Yes
Call by Reference: No ( called with pass by value option)
DEFT_TS_LOGIC - Oracle monitoring: selection logic
Data type: DB02_SEL_LOGICOptional: Yes
Call by Reference: No ( called with pass by value option)
TEMP_TS - Oracle_monitoring: selection field
Data type: DB02_SELOptional: Yes
Call by Reference: No ( called with pass by value option)
TEMP_TS_LOGIC - Oracle monitoring: selection logic
Data type: DB02_SEL_LOGICOptional: Yes
Call by Reference: No ( called with pass by value option)
CREATED_D - Oracle_monitoring: selection field
Data type: DB02_SELOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for C_ORA_US_SELECT_OPTIMIZED
TAB_US_LIST - Oracle monitoring: user selection
Data type: DB02_US_LISTOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for C_ORA_US_SELECT_OPTIMIZED 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_username | TYPE DB02_SEL, " | |||
| lt_tab_us_list | TYPE STANDARD TABLE OF DB02_US_LIST, " | |||
| lv_created_d_logic | TYPE DB02_SEL_LOGIC, " | |||
| lv_account_stat | TYPE DB02_SEL, " | |||
| lv_account_stat_logic | TYPE DB02_SEL_LOGIC, " | |||
| lv_profile | TYPE DB02_SEL, " | |||
| lv_profile_logic | TYPE DB02_SEL_LOGIC, " | |||
| lv_username_logic | TYPE DB02_SEL_LOGIC, " | |||
| lv_userid | TYPE DB02_SEL, " | |||
| lv_userid_logic | TYPE DB02_SEL_LOGIC, " | |||
| lv_deft_ts | TYPE DB02_SEL, " | |||
| lv_deft_ts_logic | TYPE DB02_SEL_LOGIC, " | |||
| lv_temp_ts | TYPE DB02_SEL, " | |||
| lv_temp_ts_logic | TYPE DB02_SEL_LOGIC, " | |||
| lv_created_d | TYPE DB02_SEL. " |
|   CALL FUNCTION 'C_ORA_US_SELECT_OPTIMIZED' "Oracle monitoring: select db users optimized |
| EXPORTING | ||
| USERNAME | = lv_username | |
| CREATED_D_LOGIC | = lv_created_d_logic | |
| ACCOUNT_STAT | = lv_account_stat | |
| ACCOUNT_STAT_LOGIC | = lv_account_stat_logic | |
| PROFILE | = lv_profile | |
| PROFILE_LOGIC | = lv_profile_logic | |
| USERNAME_LOGIC | = lv_username_logic | |
| USERID | = lv_userid | |
| USERID_LOGIC | = lv_userid_logic | |
| DEFT_TS | = lv_deft_ts | |
| DEFT_TS_LOGIC | = lv_deft_ts_logic | |
| TEMP_TS | = lv_temp_ts | |
| TEMP_TS_LOGIC | = lv_temp_ts_logic | |
| CREATED_D | = lv_created_d | |
| TABLES | ||
| TAB_US_LIST | = lt_tab_us_list | |
| . " C_ORA_US_SELECT_OPTIMIZED | ||
ABAP code using 7.40 inline data declarations to call FM C_ORA_US_SELECT_OPTIMIZED
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