SAP Function Modules

FM_SUBSTRING_GET_DESCRIPTION SAP Function module - Get descriptions of master data substrings







FM_SUBSTRING_GET_DESCRIPTION is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name FM_SUBSTRING_GET_DESCRIPTION into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: FMMD_SUBD_1
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM FM_SUBSTRING_GET_DESCRIPTION - FM SUBSTRING GET DESCRIPTION





CALL FUNCTION 'FM_SUBSTRING_GET_DESCRIPTION' "Get descriptions of master data substrings
  EXPORTING
    i_masdatid =                " fmmdactiv-masdat_id  Master Data ID
    i_strid =                   " fmmdstrid-str_id  Master Data Subdivision IDs
*   i_sub1 =                    " fmmdcisub1-cisub1  Substring # 1 of Commitment Item
*   i_sub2 =                    " fmmdcisub2-cisub2  Substring # 2 of Commitment Item
*   i_sub3 =                    " fmmdcisub3-cisub3  Substring # 3 of Commitment Item
*   i_sub4 =                    " fmmdcisub4-cisub4  Substring # 4 of Commitment Item
*   i_sub5 =                    " fmmdcisub5-cisub5  Substring # 5 of Commitment Item
  IMPORTING
    e_desc1_sh =                " fmmdcisub1t-cishtxt  Checkbox
    e_desc1_lo =                " fmmdcisub1t-cilotxt  Checkbox
    e_desc2_sh =                " fmmdcisub2t-cishtxt  Checkbox
    e_desc2_lo =                " fmmdcisub2t-cilotxt  Checkbox
    e_desc3_sh =                " fmmdcisub3t-cishtxt  Checkbox
    e_desc3_lo =                " fmmdcisub3t-cilotxt  Substring Description 2
    e_desc4_sh =                " fmmdcisub4t-cishtxt  Substring Description 1
    e_desc4_lo =                " fmmdcisub4t-cilotxt  Substring Description 2
    e_desc5_sh =                " fmmdcisub5t-cishtxt  Substring Description 1
    e_desc5_lo =                " fmmdcisub5t-cilotxt  Substring Description 2
    .  "  FM_SUBSTRING_GET_DESCRIPTION

ABAP code example for Function Module FM_SUBSTRING_GET_DESCRIPTION





The ABAP code below is a full code listing to execute function module FM_SUBSTRING_GET_DESCRIPTION including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_e_desc1_sh  TYPE FMMDCISUB1T-CISHTXT ,
ld_e_desc1_lo  TYPE FMMDCISUB1T-CILOTXT ,
ld_e_desc2_sh  TYPE FMMDCISUB2T-CISHTXT ,
ld_e_desc2_lo  TYPE FMMDCISUB2T-CILOTXT ,
ld_e_desc3_sh  TYPE FMMDCISUB3T-CISHTXT ,
ld_e_desc3_lo  TYPE FMMDCISUB3T-CILOTXT ,
ld_e_desc4_sh  TYPE FMMDCISUB4T-CISHTXT ,
ld_e_desc4_lo  TYPE FMMDCISUB4T-CILOTXT ,
ld_e_desc5_sh  TYPE FMMDCISUB5T-CISHTXT ,
ld_e_desc5_lo  TYPE FMMDCISUB5T-CILOTXT .


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).
. CALL FUNCTION 'FM_SUBSTRING_GET_DESCRIPTION' EXPORTING i_masdatid = ld_i_masdatid i_strid = ld_i_strid * i_sub1 = ld_i_sub1 * i_sub2 = ld_i_sub2 * i_sub3 = ld_i_sub3 * i_sub4 = ld_i_sub4 * i_sub5 = ld_i_sub5 IMPORTING e_desc1_sh = ld_e_desc1_sh e_desc1_lo = ld_e_desc1_lo e_desc2_sh = ld_e_desc2_sh e_desc2_lo = ld_e_desc2_lo e_desc3_sh = ld_e_desc3_sh e_desc3_lo = ld_e_desc3_lo e_desc4_sh = ld_e_desc4_sh e_desc4_lo = ld_e_desc4_lo e_desc5_sh = ld_e_desc5_sh e_desc5_lo = ld_e_desc5_lo . " FM_SUBSTRING_GET_DESCRIPTION
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_desc1_sh  TYPE FMMDCISUB1T-CISHTXT ,
ld_i_masdatid  TYPE FMMDACTIV-MASDAT_ID ,
ld_e_desc1_lo  TYPE FMMDCISUB1T-CILOTXT ,
ld_i_strid  TYPE FMMDSTRID-STR_ID ,
ld_e_desc2_sh  TYPE FMMDCISUB2T-CISHTXT ,
ld_i_sub1  TYPE FMMDCISUB1-CISUB1 ,
ld_e_desc2_lo  TYPE FMMDCISUB2T-CILOTXT ,
ld_i_sub2  TYPE FMMDCISUB2-CISUB2 ,
ld_e_desc3_sh  TYPE FMMDCISUB3T-CISHTXT ,
ld_i_sub3  TYPE FMMDCISUB3-CISUB3 ,
ld_e_desc3_lo  TYPE FMMDCISUB3T-CILOTXT ,
ld_i_sub4  TYPE FMMDCISUB4-CISUB4 ,
ld_e_desc4_sh  TYPE FMMDCISUB4T-CISHTXT ,
ld_i_sub5  TYPE FMMDCISUB5-CISUB5 ,
ld_e_desc4_lo  TYPE FMMDCISUB4T-CILOTXT ,
ld_e_desc5_sh  TYPE FMMDCISUB5T-CISHTXT ,
ld_e_desc5_lo  TYPE FMMDCISUB5T-CILOTXT .


SELECT single MASDAT_ID
FROM FMMDACTIV
INTO ld_i_masdatid.


SELECT single STR_ID
FROM FMMDSTRID
INTO ld_i_strid.


SELECT single CISUB1
FROM FMMDCISUB1
INTO ld_i_sub1.


SELECT single CISUB2
FROM FMMDCISUB2
INTO ld_i_sub2.


SELECT single CISUB3
FROM FMMDCISUB3
INTO ld_i_sub3.


SELECT single CISUB4
FROM FMMDCISUB4
INTO ld_i_sub4.


SELECT single CISUB5
FROM FMMDCISUB5
INTO ld_i_sub5.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name FM_SUBSTRING_GET_DESCRIPTION or its description.