SAP MCS_IDOC_CHECK Function Module for NOTRANSL: Pruefen Kommunikationsstruktur auf LIS-Belange









MCS_IDOC_CHECK is a standard mcs idoc check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Pruefen Kommunikationsstruktur auf LIS-Belange 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 mcs idoc check FM, simply by entering the name MCS_IDOC_CHECK into the relevant SAP transaction such as SE37 or SE38.

Function Group: MCSE
Program Name: SAPLMCSE
Main Program: SAPLMCSE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MCS_IDOC_CHECK 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 'MCS_IDOC_CHECK'"NOTRANSL: Pruefen Kommunikationsstruktur auf LIS-Belange
EXPORTING
I_IDOC_NAME = "Name of communication structure
I_CSTRU = "
* RV_PROT = ' ' "Log the errors, do not execute raise.
* FLG_KEYFIELD = ' ' "Ind. determine key field

IMPORTING
E_RC = "Ind.: Errors occur when RV_PROT is active
E_KEYFIELD = "Name of determined key field
E_SEGTYP = "

EXCEPTIONS
IDOC_NOT_EXIST = 1 IDOC_WITHOUT_STRUCTURE = 2 IDOC_WITH_HIERARCHY = 3 DATE_NOT_EXIST = 4 IDOC_WITHOUT_LIS_BASIC_IDOC = 5 NO_IDOC_AUTHORITY = 6 COMSTRU_NOT_FOUND = 7 ERROR_IN_STRUCTURES = 8
.



IMPORTING Parameters details for MCS_IDOC_CHECK

I_IDOC_NAME - Name of communication structure

Data type: DMCSE-EXTTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

I_CSTRU -

Data type: DMCSE-CSTRU
Optional: No
Call by Reference: No ( called with pass by value option)

RV_PROT - Log the errors, do not execute raise.

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLG_KEYFIELD - Ind. determine key field

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for MCS_IDOC_CHECK

E_RC - Ind.: Errors occur when RV_PROT is active

Data type: SY-SUBRC
Optional: No
Call by Reference: No ( called with pass by value option)

E_KEYFIELD - Name of determined key field

Data type: DFIES-FIELDNAME
Optional: No
Call by Reference: No ( called with pass by value option)

E_SEGTYP -

Data type: EDIDD-SEGNAM
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

IDOC_NOT_EXIST - Communication structure not in data dictionary

Data type:
Optional: No
Call by Reference: Yes

IDOC_WITHOUT_STRUCTURE - Communication structure does not contain field BUKRS

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

IDOC_WITH_HIERARCHY - IDoc is hierarchical (has more than 1 segment)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DATE_NOT_EXIST - No date field in communication structure

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

IDOC_WITHOUT_LIS_BASIC_IDOC - IDoc does not contain the LIS basic IDoc

Data type:
Optional: No
Call by Reference: Yes

NO_IDOC_AUTHORITY -

Data type:
Optional: No
Call by Reference: Yes

COMSTRU_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_STRUCTURES -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for MCS_IDOC_CHECK 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_e_rc  TYPE SY-SUBRC, "   
lv_i_idoc_name  TYPE DMCSE-EXTTYPE, "   
lv_idoc_not_exist  TYPE DMCSE, "   
lv_i_cstru  TYPE DMCSE-CSTRU, "   
lv_e_keyfield  TYPE DFIES-FIELDNAME, "   
lv_idoc_without_structure  TYPE DFIES, "   
lv_rv_prot  TYPE DFIES, "   ' '
lv_e_segtyp  TYPE EDIDD-SEGNAM, "   
lv_idoc_with_hierarchy  TYPE EDIDD, "   
lv_flg_keyfield  TYPE EDIDD, "   ' '
lv_date_not_exist  TYPE EDIDD, "   
lv_idoc_without_lis_basic_idoc  TYPE EDIDD, "   
lv_no_idoc_authority  TYPE EDIDD, "   
lv_comstru_not_found  TYPE EDIDD, "   
lv_error_in_structures  TYPE EDIDD. "   

  CALL FUNCTION 'MCS_IDOC_CHECK'  "NOTRANSL: Pruefen Kommunikationsstruktur auf LIS-Belange
    EXPORTING
         I_IDOC_NAME = lv_i_idoc_name
         I_CSTRU = lv_i_cstru
         RV_PROT = lv_rv_prot
         FLG_KEYFIELD = lv_flg_keyfield
    IMPORTING
         E_RC = lv_e_rc
         E_KEYFIELD = lv_e_keyfield
         E_SEGTYP = lv_e_segtyp
    EXCEPTIONS
        IDOC_NOT_EXIST = 1
        IDOC_WITHOUT_STRUCTURE = 2
        IDOC_WITH_HIERARCHY = 3
        DATE_NOT_EXIST = 4
        IDOC_WITHOUT_LIS_BASIC_IDOC = 5
        NO_IDOC_AUTHORITY = 6
        COMSTRU_NOT_FOUND = 7
        ERROR_IN_STRUCTURES = 8
. " MCS_IDOC_CHECK




ABAP code using 7.40 inline data declarations to call FM MCS_IDOC_CHECK

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 SUBRC FROM SY INTO @DATA(ld_e_rc).
 
"SELECT single EXTTYPE FROM DMCSE INTO @DATA(ld_i_idoc_name).
 
 
"SELECT single CSTRU FROM DMCSE INTO @DATA(ld_i_cstru).
 
"SELECT single FIELDNAME FROM DFIES INTO @DATA(ld_e_keyfield).
 
 
DATA(ld_rv_prot) = ' '.
 
"SELECT single SEGNAM FROM EDIDD INTO @DATA(ld_e_segtyp).
 
 
DATA(ld_flg_keyfield) = ' '.
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!