SAP /SDF/EWA_GET_PARAMETER Function Module for Get a single value of a specific ABAP kernel parameter
/SDF/EWA_GET_PARAMETER is a standard /sdf/ewa get parameter SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get a single value of a specific ABAP kernel parameter 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 /sdf/ewa get parameter FM, simply by entering the name /SDF/EWA_GET_PARAMETER into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SDF/EWA
Program Name: /SDF/SAPLEWA
Main Program: /SDF/SAPLEWA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function /SDF/EWA_GET_PARAMETER 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 '/SDF/EWA_GET_PARAMETER'"Get a single value of a specific ABAP kernel parameter.
EXPORTING
* PAR_NAME = 'SAPDBHOST' "Profile parameter name
IMPORTING
PAR_VALUE_K_USUB = "Kernel Default (unsubstituted) value with 64 characters
PAR_VALUE_K = "Substituted parameter value with 64 characters
PAR_VALUE_LONG_K = "Substituted parameter value -> 4096 characters
PAR_LENGTH_K = "Length of substituted parameter value
PAR_VALUE = "Current parameter value with 64 characters
PAR_VALUE_LONG = "Current parameter value -> 4096 characters
PAR_LENGTH = "Length of Current parameter value
PAR_VALUE_LONG_K_USUB = "Kernel Default (unsubstituted) value -> 4096 characters
PAR_LENGTH_K_USUB = "Length of Kernel Default (unsubstituted) value
PAR_VALUE_DEFAULT = "Value of parameter on DEFAULT profile level
PAR_VALUE_LONG_DEFAULT = "Value of parameter on DEFAULT profile level --> 4096 characters
PAR_LENGTH_DEFAULT = "Length of parameter value on DEFAULT profile level
PAR_VALUE_INSTANCE = "Value of parameter on INSTANCE profile level
PAR_VALUE_LONG_INSTANCE = "Value of parameter on INSTANCE profile level --> 4096 characters
PAR_LENGTH_INSTANCE = "Length of parameter value on INSTANCE profile level
EXCEPTIONS
PARAMETER_NOT_ACTIVE = 1
IMPORTING Parameters details for /SDF/EWA_GET_PARAMETER
PAR_NAME - Profile parameter name
Data type: PARNAMEDefault: 'SAPDBHOST'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for /SDF/EWA_GET_PARAMETER
PAR_VALUE_K_USUB - Kernel Default (unsubstituted) value with 64 characters
Data type: PARVALUEOptional: No
Call by Reference: No ( called with pass by value option)
PAR_VALUE_K - Substituted parameter value with 64 characters
Data type: PARVALUEOptional: No
Call by Reference: No ( called with pass by value option)
PAR_VALUE_LONG_K - Substituted parameter value -> 4096 characters
Data type: /SDF/PAR_4096Optional: No
Call by Reference: No ( called with pass by value option)
PAR_LENGTH_K - Length of substituted parameter value
Data type: INT4Optional: No
Call by Reference: No ( called with pass by value option)
PAR_VALUE - Current parameter value with 64 characters
Data type: PARVALUEOptional: No
Call by Reference: No ( called with pass by value option)
PAR_VALUE_LONG - Current parameter value -> 4096 characters
Data type: /SDF/PAR_4096Optional: No
Call by Reference: No ( called with pass by value option)
PAR_LENGTH - Length of Current parameter value
Data type: INT4Optional: No
Call by Reference: No ( called with pass by value option)
PAR_VALUE_LONG_K_USUB - Kernel Default (unsubstituted) value -> 4096 characters
Data type: /SDF/PAR_4096Optional: No
Call by Reference: No ( called with pass by value option)
PAR_LENGTH_K_USUB - Length of Kernel Default (unsubstituted) value
Data type: INT4Optional: No
Call by Reference: No ( called with pass by value option)
PAR_VALUE_DEFAULT - Value of parameter on DEFAULT profile level
Data type: PARVALUEOptional: No
Call by Reference: No ( called with pass by value option)
PAR_VALUE_LONG_DEFAULT - Value of parameter on DEFAULT profile level --> 4096 characters
Data type: /SDF/PAR_4096Optional: No
Call by Reference: No ( called with pass by value option)
PAR_LENGTH_DEFAULT - Length of parameter value on DEFAULT profile level
Data type: INT4Optional: No
Call by Reference: No ( called with pass by value option)
PAR_VALUE_INSTANCE - Value of parameter on INSTANCE profile level
Data type: PARVALUEOptional: No
Call by Reference: No ( called with pass by value option)
PAR_VALUE_LONG_INSTANCE - Value of parameter on INSTANCE profile level --> 4096 characters
Data type: /SDF/PAR_4096Optional: No
Call by Reference: No ( called with pass by value option)
PAR_LENGTH_INSTANCE - Length of parameter value on INSTANCE profile level
Data type: INT4Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PARAMETER_NOT_ACTIVE - Parameter not active or existing
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for /SDF/EWA_GET_PARAMETER 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_par_name | TYPE PARNAME, " 'SAPDBHOST' | |||
| lv_par_value_k_usub | TYPE PARVALUE, " | |||
| lv_parameter_not_active | TYPE PARVALUE, " | |||
| lv_par_value_k | TYPE PARVALUE, " | |||
| lv_par_value_long_k | TYPE /SDF/PAR_4096, " | |||
| lv_par_length_k | TYPE INT4, " | |||
| lv_par_value | TYPE PARVALUE, " | |||
| lv_par_value_long | TYPE /SDF/PAR_4096, " | |||
| lv_par_length | TYPE INT4, " | |||
| lv_par_value_long_k_usub | TYPE /SDF/PAR_4096, " | |||
| lv_par_length_k_usub | TYPE INT4, " | |||
| lv_par_value_default | TYPE PARVALUE, " | |||
| lv_par_value_long_default | TYPE /SDF/PAR_4096, " | |||
| lv_par_length_default | TYPE INT4, " | |||
| lv_par_value_instance | TYPE PARVALUE, " | |||
| lv_par_value_long_instance | TYPE /SDF/PAR_4096, " | |||
| lv_par_length_instance | TYPE INT4. " |
|   CALL FUNCTION '/SDF/EWA_GET_PARAMETER' "Get a single value of a specific ABAP kernel parameter |
| EXPORTING | ||
| PAR_NAME | = lv_par_name | |
| IMPORTING | ||
| PAR_VALUE_K_USUB | = lv_par_value_k_usub | |
| PAR_VALUE_K | = lv_par_value_k | |
| PAR_VALUE_LONG_K | = lv_par_value_long_k | |
| PAR_LENGTH_K | = lv_par_length_k | |
| PAR_VALUE | = lv_par_value | |
| PAR_VALUE_LONG | = lv_par_value_long | |
| PAR_LENGTH | = lv_par_length | |
| PAR_VALUE_LONG_K_USUB | = lv_par_value_long_k_usub | |
| PAR_LENGTH_K_USUB | = lv_par_length_k_usub | |
| PAR_VALUE_DEFAULT | = lv_par_value_default | |
| PAR_VALUE_LONG_DEFAULT | = lv_par_value_long_default | |
| PAR_LENGTH_DEFAULT | = lv_par_length_default | |
| PAR_VALUE_INSTANCE | = lv_par_value_instance | |
| PAR_VALUE_LONG_INSTANCE | = lv_par_value_long_instance | |
| PAR_LENGTH_INSTANCE | = lv_par_length_instance | |
| EXCEPTIONS | ||
| PARAMETER_NOT_ACTIVE = 1 | ||
| . " /SDF/EWA_GET_PARAMETER | ||
ABAP code using 7.40 inline data declarations to call FM /SDF/EWA_GET_PARAMETER
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_par_name) | = 'SAPDBHOST'. | |||
Search for further information about these or an SAP related objects