SAP AKB_GET_ENVIRONMENT Function Module for
AKB_GET_ENVIRONMENT is a standard akb get environment SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 akb get environment FM, simply by entering the name AKB_GET_ENVIRONMENT into the relevant SAP transaction such as SE37 or SE38.
Function Group: PA_AKB
Program Name: SAPLPA_AKB
Main Program: SAPLPA_AKB
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function AKB_GET_ENVIRONMENT 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 'AKB_GET_ENVIRONMENT'".
EXPORTING
OBJ_TYPE = "Object Type
OBJ_NAME = "Object Name in Object Directory
* CHECK_PERMISSIONS = 'X' "
* CHECK_CLASSFREEZING = ' ' "
* CHECK_TRKORR = ' ' "
* EXPAND_UNFREEZABLE_OBJ = ' ' "
* PROPAGATE_FREEZABLE = ' ' "
* EXPAND_RELEASED_OBJ = 'X' "
* EXPAND_FROZEN_OBJ = 'X' "
IMPORTING
OBJECTS = "
USAGE = "
OBJECTS_WITH_ERRORS = "Incorrect Objects
EXCEPTIONS
INTERNAL_ERROR = 1
IMPORTING Parameters details for AKB_GET_ENVIRONMENT
OBJ_TYPE - Object Type
Data type: TROBJTYPEOptional: No
Call by Reference: Yes
OBJ_NAME - Object Name in Object Directory
Data type: SOBJ_NAMEOptional: No
Call by Reference: Yes
CHECK_PERMISSIONS -
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: Yes
CHECK_CLASSFREEZING -
Data type: FLAGDefault: ' '
Optional: Yes
Call by Reference: Yes
CHECK_TRKORR -
Data type: FLAGDefault: ' '
Optional: Yes
Call by Reference: Yes
EXPAND_UNFREEZABLE_OBJ -
Data type: FLAGDefault: ' '
Optional: Yes
Call by Reference: Yes
PROPAGATE_FREEZABLE -
Data type: FLAGDefault: ' '
Optional: Yes
Call by Reference: Yes
EXPAND_RELEASED_OBJ -
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: Yes
EXPAND_FROZEN_OBJ -
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for AKB_GET_ENVIRONMENT
OBJECTS -
Data type: TPCHK_OBJECT_TABLEOptional: No
Call by Reference: Yes
USAGE -
Data type: TPCHK_USAGE_TABLEOptional: No
Call by Reference: Yes
OBJECTS_WITH_ERRORS - Incorrect Objects
Data type: TPCHK_OBJECT_TABLEOptional: No
Call by Reference: Yes
EXCEPTIONS details
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for AKB_GET_ENVIRONMENT 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_objects | TYPE TPCHK_OBJECT_TABLE, " | |||
lv_obj_type | TYPE TROBJTYPE, " | |||
lv_internal_error | TYPE TROBJTYPE, " | |||
lv_usage | TYPE TPCHK_USAGE_TABLE, " | |||
lv_obj_name | TYPE SOBJ_NAME, " | |||
lv_check_permissions | TYPE FLAG, " 'X' | |||
lv_objects_with_errors | TYPE TPCHK_OBJECT_TABLE, " | |||
lv_check_classfreezing | TYPE FLAG, " ' ' | |||
lv_check_trkorr | TYPE FLAG, " ' ' | |||
lv_expand_unfreezable_obj | TYPE FLAG, " ' ' | |||
lv_propagate_freezable | TYPE FLAG, " ' ' | |||
lv_expand_released_obj | TYPE FLAG, " 'X' | |||
lv_expand_frozen_obj | TYPE FLAG. " 'X' |
  CALL FUNCTION 'AKB_GET_ENVIRONMENT' " |
EXPORTING | ||
OBJ_TYPE | = lv_obj_type | |
OBJ_NAME | = lv_obj_name | |
CHECK_PERMISSIONS | = lv_check_permissions | |
CHECK_CLASSFREEZING | = lv_check_classfreezing | |
CHECK_TRKORR | = lv_check_trkorr | |
EXPAND_UNFREEZABLE_OBJ | = lv_expand_unfreezable_obj | |
PROPAGATE_FREEZABLE | = lv_propagate_freezable | |
EXPAND_RELEASED_OBJ | = lv_expand_released_obj | |
EXPAND_FROZEN_OBJ | = lv_expand_frozen_obj | |
IMPORTING | ||
OBJECTS | = lv_objects | |
USAGE | = lv_usage | |
OBJECTS_WITH_ERRORS | = lv_objects_with_errors | |
EXCEPTIONS | ||
INTERNAL_ERROR = 1 | ||
. " AKB_GET_ENVIRONMENT |
ABAP code using 7.40 inline data declarations to call FM AKB_GET_ENVIRONMENT
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.DATA(ld_check_permissions) | = 'X'. | |||
DATA(ld_check_classfreezing) | = ' '. | |||
DATA(ld_check_trkorr) | = ' '. | |||
DATA(ld_expand_unfreezable_obj) | = ' '. | |||
DATA(ld_propagate_freezable) | = ' '. | |||
DATA(ld_expand_released_obj) | = 'X'. | |||
DATA(ld_expand_frozen_obj) | = 'X'. | |||
Search for further information about these or an SAP related objects