SAP EHSWA_195_GET_UNIT_NAME Function Module for
EHSWA_195_GET_UNIT_NAME is a standard ehswa 195 get unit name 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 ehswa 195 get unit name FM, simply by entering the name EHSWA_195_GET_UNIT_NAME into the relevant SAP transaction such as SE37 or SE38.
Function Group: EHSWA_195
Program Name: SAPLEHSWA_195
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EHSWA_195_GET_UNIT_NAME 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 'EHSWA_195_GET_UNIT_NAME'".
EXPORTING
I_UNIT_ID = "
IMPORTING
E_UNIT_KEY_SHORT = "
E_UNIT_KEY_LONG = "
E_UNIT_NAME_SHORT = "
E_UNIT_NAME_LONG = "
EXCEPTIONS
ENTRY_NOT_FOUND = 1
IMPORTING Parameters details for EHSWA_195_GET_UNIT_NAME
I_UNIT_ID -
Data type: T006-MSEHIOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EHSWA_195_GET_UNIT_NAME
E_UNIT_KEY_SHORT -
Data type: T006A-MSEH3Optional: No
Call by Reference: No ( called with pass by value option)
E_UNIT_KEY_LONG -
Data type: T006A-MSEH6Optional: No
Call by Reference: No ( called with pass by value option)
E_UNIT_NAME_SHORT -
Data type: T006A-MSEHTOptional: No
Call by Reference: No ( called with pass by value option)
E_UNIT_NAME_LONG -
Data type: T006A-MSEHLOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ENTRY_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EHSWA_195_GET_UNIT_NAME 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_i_unit_id | TYPE T006-MSEHI, " | |||
| lv_entry_not_found | TYPE T006, " | |||
| lv_e_unit_key_short | TYPE T006A-MSEH3, " | |||
| lv_e_unit_key_long | TYPE T006A-MSEH6, " | |||
| lv_e_unit_name_short | TYPE T006A-MSEHT, " | |||
| lv_e_unit_name_long | TYPE T006A-MSEHL. " |
|   CALL FUNCTION 'EHSWA_195_GET_UNIT_NAME' " |
| EXPORTING | ||
| I_UNIT_ID | = lv_i_unit_id | |
| IMPORTING | ||
| E_UNIT_KEY_SHORT | = lv_e_unit_key_short | |
| E_UNIT_KEY_LONG | = lv_e_unit_key_long | |
| E_UNIT_NAME_SHORT | = lv_e_unit_name_short | |
| E_UNIT_NAME_LONG | = lv_e_unit_name_long | |
| EXCEPTIONS | ||
| ENTRY_NOT_FOUND = 1 | ||
| . " EHSWA_195_GET_UNIT_NAME | ||
ABAP code using 7.40 inline data declarations to call FM EHSWA_195_GET_UNIT_NAME
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 MSEHI FROM T006 INTO @DATA(ld_i_unit_id). | ||||
| "SELECT single MSEH3 FROM T006A INTO @DATA(ld_e_unit_key_short). | ||||
| "SELECT single MSEH6 FROM T006A INTO @DATA(ld_e_unit_key_long). | ||||
| "SELECT single MSEHT FROM T006A INTO @DATA(ld_e_unit_name_short). | ||||
| "SELECT single MSEHL FROM T006A INTO @DATA(ld_e_unit_name_long). | ||||
Search for further information about these or an SAP related objects