SAP FM_SUBSTRING_CHECK_EXISTANCE Function Module for Get descriptions of master data substrings
FM_SUBSTRING_CHECK_EXISTANCE is a standard fm substring check existance 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 descriptions of master data substrings 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 fm substring check existance FM, simply by entering the name FM_SUBSTRING_CHECK_EXISTANCE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FMMD_SUBD_1
Program Name: SAPLFMMD_SUBD_1
Main Program: SAPLFMMD_SUBD_1
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FM_SUBSTRING_CHECK_EXISTANCE 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 'FM_SUBSTRING_CHECK_EXISTANCE'"Get descriptions of master data substrings.
EXPORTING
I_MASDATID = "Master Data ID
I_STRID = "Master Data Subdivision IDs
* I_SUB1 = "Substring # 1 of Commitment Item
* I_SUB2 = "Substring # 2 of Commitment Item
* I_SUB3 = "Substring # 3 of Commitment Item
* I_SUB4 = "Substring # 4 of Commitment Item
* I_SUB5 = "Substring # 5 of Commitment Item
IMPORTING
E_SUB1_EXISTS = "Substring 1 exists
E_SUB2_EXISTS = "Substring 2 exists
E_SUB3_EXISTS = "Substring 3 exists
E_SUB4_EXISTS = "Substring 4 exists
E_SUB5_EXISTS = "Substring 5 exists
IMPORTING Parameters details for FM_SUBSTRING_CHECK_EXISTANCE
I_MASDATID - Master Data ID
Data type: FMMDACTIV-MASDAT_IDOptional: No
Call by Reference: No ( called with pass by value option)
I_STRID - Master Data Subdivision IDs
Data type: FMMDSTRID-STR_IDOptional: No
Call by Reference: No ( called with pass by value option)
I_SUB1 - Substring # 1 of Commitment Item
Data type: FMMDCISUB1-CISUB1Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SUB2 - Substring # 2 of Commitment Item
Data type: FMMDCISUB2-CISUB2Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SUB3 - Substring # 3 of Commitment Item
Data type: FMMDCISUB3-CISUB3Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SUB4 - Substring # 4 of Commitment Item
Data type: FMMDCISUB4-CISUB4Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SUB5 - Substring # 5 of Commitment Item
Data type: FMMDCISUB5-CISUB5Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FM_SUBSTRING_CHECK_EXISTANCE
E_SUB1_EXISTS - Substring 1 exists
Data type: XFELDOptional: No
Call by Reference: Yes
E_SUB2_EXISTS - Substring 2 exists
Data type: XFELDOptional: No
Call by Reference: Yes
E_SUB3_EXISTS - Substring 3 exists
Data type: XFELDOptional: No
Call by Reference: Yes
E_SUB4_EXISTS - Substring 4 exists
Data type: XFELDOptional: No
Call by Reference: Yes
E_SUB5_EXISTS - Substring 5 exists
Data type: XFELDOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for FM_SUBSTRING_CHECK_EXISTANCE 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_masdatid | TYPE FMMDACTIV-MASDAT_ID, " | |||
| lv_e_sub1_exists | TYPE XFELD, " | |||
| lv_i_strid | TYPE FMMDSTRID-STR_ID, " | |||
| lv_e_sub2_exists | TYPE XFELD, " | |||
| lv_i_sub1 | TYPE FMMDCISUB1-CISUB1, " | |||
| lv_e_sub3_exists | TYPE XFELD, " | |||
| lv_i_sub2 | TYPE FMMDCISUB2-CISUB2, " | |||
| lv_e_sub4_exists | TYPE XFELD, " | |||
| lv_i_sub3 | TYPE FMMDCISUB3-CISUB3, " | |||
| lv_e_sub5_exists | TYPE XFELD, " | |||
| lv_i_sub4 | TYPE FMMDCISUB4-CISUB4, " | |||
| lv_i_sub5 | TYPE FMMDCISUB5-CISUB5. " |
|   CALL FUNCTION 'FM_SUBSTRING_CHECK_EXISTANCE' "Get descriptions of master data substrings |
| EXPORTING | ||
| I_MASDATID | = lv_i_masdatid | |
| I_STRID | = lv_i_strid | |
| I_SUB1 | = lv_i_sub1 | |
| I_SUB2 | = lv_i_sub2 | |
| I_SUB3 | = lv_i_sub3 | |
| I_SUB4 | = lv_i_sub4 | |
| I_SUB5 | = lv_i_sub5 | |
| IMPORTING | ||
| E_SUB1_EXISTS | = lv_e_sub1_exists | |
| E_SUB2_EXISTS | = lv_e_sub2_exists | |
| E_SUB3_EXISTS | = lv_e_sub3_exists | |
| E_SUB4_EXISTS | = lv_e_sub4_exists | |
| E_SUB5_EXISTS | = lv_e_sub5_exists | |
| . " FM_SUBSTRING_CHECK_EXISTANCE | ||
ABAP code using 7.40 inline data declarations to call FM FM_SUBSTRING_CHECK_EXISTANCE
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 MASDAT_ID FROM FMMDACTIV INTO @DATA(ld_i_masdatid). | ||||
| "SELECT single STR_ID FROM FMMDSTRID INTO @DATA(ld_i_strid). | ||||
| "SELECT single CISUB1 FROM FMMDCISUB1 INTO @DATA(ld_i_sub1). | ||||
| "SELECT single CISUB2 FROM FMMDCISUB2 INTO @DATA(ld_i_sub2). | ||||
| "SELECT single CISUB3 FROM FMMDCISUB3 INTO @DATA(ld_i_sub3). | ||||
| "SELECT single CISUB4 FROM FMMDCISUB4 INTO @DATA(ld_i_sub4). | ||||
| "SELECT single CISUB5 FROM FMMDCISUB5 INTO @DATA(ld_i_sub5). | ||||
Search for further information about these or an SAP related objects