SAP OIC_FORMULA_AUTH_CHECK Function Module for Authorization check on formula maintainance
OIC_FORMULA_AUTH_CHECK is a standard oic formula auth check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Authorization check on formula maintainance 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 oic formula auth check FM, simply by entering the name OIC_FORMULA_AUTH_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: OICF
Program Name: SAPLOICF
Main Program: SAPLOICF
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIC_FORMULA_AUTH_CHECK 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 'OIC_FORMULA_AUTH_CHECK'"Authorization check on formula maintainance.
EXPORTING
LOC_VBTYP = "Transaction code
LOC_AUART = "Transaction mode (create,change,disp.)
LOC_FKART = "
LOC_BSTYP = "
LOC_BSART = "
LOC_ESOKZ = "
LOC_ACTIVITY = "
IMPORTING
YES = "authorized
NO = "not authorized
DISPLAY = "authorized display mode
AUTH_SUBRC = "
IMPORTING Parameters details for OIC_FORMULA_AUTH_CHECK
LOC_VBTYP - Transaction code
Data type: TVAK-VBTYPOptional: No
Call by Reference: No ( called with pass by value option)
LOC_AUART - Transaction mode (create,change,disp.)
Data type: TVAK-AUARTOptional: No
Call by Reference: No ( called with pass by value option)
LOC_FKART -
Data type: TVFK-FKARTOptional: No
Call by Reference: No ( called with pass by value option)
LOC_BSTYP -
Data type: T161-BSTYPOptional: No
Call by Reference: No ( called with pass by value option)
LOC_BSART -
Data type: T161-BSARTOptional: No
Call by Reference: No ( called with pass by value option)
LOC_ESOKZ -
Data type: EINE-ESOKZOptional: No
Call by Reference: No ( called with pass by value option)
LOC_ACTIVITY -
Data type: AUTHA-IM_ACTVTOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for OIC_FORMULA_AUTH_CHECK
YES - authorized
Data type: TDWP-APPLBOptional: No
Call by Reference: No ( called with pass by value option)
NO - not authorized
Data type: TDWP-APPLBOptional: No
Call by Reference: No ( called with pass by value option)
DISPLAY - authorized display mode
Data type: TDWP-APPLBOptional: No
Call by Reference: No ( called with pass by value option)
AUTH_SUBRC -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for OIC_FORMULA_AUTH_CHECK 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_yes | TYPE TDWP-APPLB, " | |||
| lv_loc_vbtyp | TYPE TVAK-VBTYP, " | |||
| lv_no | TYPE TDWP-APPLB, " | |||
| lv_loc_auart | TYPE TVAK-AUART, " | |||
| lv_display | TYPE TDWP-APPLB, " | |||
| lv_loc_fkart | TYPE TVFK-FKART, " | |||
| lv_loc_bstyp | TYPE T161-BSTYP, " | |||
| lv_auth_subrc | TYPE SY-SUBRC, " | |||
| lv_loc_bsart | TYPE T161-BSART, " | |||
| lv_loc_esokz | TYPE EINE-ESOKZ, " | |||
| lv_loc_activity | TYPE AUTHA-IM_ACTVT. " |
|   CALL FUNCTION 'OIC_FORMULA_AUTH_CHECK' "Authorization check on formula maintainance |
| EXPORTING | ||
| LOC_VBTYP | = lv_loc_vbtyp | |
| LOC_AUART | = lv_loc_auart | |
| LOC_FKART | = lv_loc_fkart | |
| LOC_BSTYP | = lv_loc_bstyp | |
| LOC_BSART | = lv_loc_bsart | |
| LOC_ESOKZ | = lv_loc_esokz | |
| LOC_ACTIVITY | = lv_loc_activity | |
| IMPORTING | ||
| YES | = lv_yes | |
| NO | = lv_no | |
| DISPLAY | = lv_display | |
| AUTH_SUBRC | = lv_auth_subrc | |
| . " OIC_FORMULA_AUTH_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM OIC_FORMULA_AUTH_CHECK
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.| "SELECT single APPLB FROM TDWP INTO @DATA(ld_yes). | ||||
| "SELECT single VBTYP FROM TVAK INTO @DATA(ld_loc_vbtyp). | ||||
| "SELECT single APPLB FROM TDWP INTO @DATA(ld_no). | ||||
| "SELECT single AUART FROM TVAK INTO @DATA(ld_loc_auart). | ||||
| "SELECT single APPLB FROM TDWP INTO @DATA(ld_display). | ||||
| "SELECT single FKART FROM TVFK INTO @DATA(ld_loc_fkart). | ||||
| "SELECT single BSTYP FROM T161 INTO @DATA(ld_loc_bstyp). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_auth_subrc). | ||||
| "SELECT single BSART FROM T161 INTO @DATA(ld_loc_bsart). | ||||
| "SELECT single ESOKZ FROM EINE INTO @DATA(ld_loc_esokz). | ||||
| "SELECT single IM_ACTVT FROM AUTHA INTO @DATA(ld_loc_activity). | ||||
Search for further information about these or an SAP related objects