SAP CHECK_SOURCE Function Module for









CHECK_SOURCE is a standard check source 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 check source FM, simply by entering the name CHECK_SOURCE into the relevant SAP transaction such as SE37 or SE38.

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



Function CHECK_SOURCE 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 'CHECK_SOURCE'"
EXPORTING
* ALL_ERRORS = ' ' "
* P_ENH_HANDLER = "
* GLOBAL_PROGRAM = ' ' "
* GLOBAL_CHECK = ' ' "
SOURCE_NAME = "
* R2_CHECK = ' ' "
CORE_EDITOR = "
* NEW_SYNTAX_CHECK = ' ' "Single-Character Flag
* RFC_SYNTAX_CHECK = ' ' "Single-Character Flag
* I_40B_DESTINATION = ' ' "Single-Character Flag

IMPORTING
O_ERROR_INCLUDE = "
O_ERROR_LINE = "
O_ERROR_MESSAGE = "
O_ERROR_OFFSET = "
O_ERROR_SUBRC = "
O_ERROR_WORD = "
O_MESSAGE_ID = "
O_EXTERNAL_ERROR = "
O_ERROR_DESCRIPTIONS = "Long Text Table for Syntax Error Messages

TABLES
WARNINGS_TABLE = "
CORRECTION_TABLE = "
ERROR_TABLE = "
SOURCE = "
ENVIRONMENT = "
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLS38E_001 Exit for ABAP Editor

IMPORTING Parameters details for CHECK_SOURCE

ALL_ERRORS -

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

P_ENH_HANDLER -

Data type: CL_WB_ED_ENHANCEMENT_HANDLER
Optional: Yes
Call by Reference: Yes

GLOBAL_PROGRAM -

Data type: SY-REPID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

GLOBAL_CHECK -

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

SOURCE_NAME -

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

R2_CHECK -

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

CORE_EDITOR -

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

NEW_SYNTAX_CHECK - Single-Character Flag

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

RFC_SYNTAX_CHECK - Single-Character Flag

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

I_40B_DESTINATION - Single-Character Flag

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

EXPORTING Parameters details for CHECK_SOURCE

O_ERROR_INCLUDE -

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

O_ERROR_LINE -

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

O_ERROR_MESSAGE -

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

O_ERROR_OFFSET -

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

O_ERROR_SUBRC -

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

O_ERROR_WORD -

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

O_MESSAGE_ID -

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

O_EXTERNAL_ERROR -

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

O_ERROR_DESCRIPTIONS - Long Text Table for Syntax Error Messages

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

TABLES Parameters details for CHECK_SOURCE

WARNINGS_TABLE -

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

CORRECTION_TABLE -

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

ERROR_TABLE -

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

SOURCE -

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

ENVIRONMENT -

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

Copy and paste ABAP code example for CHECK_SOURCE 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_all_errors  TYPE CHAR1, "   SPACE
lt_warnings_table  TYPE STANDARD TABLE OF RSLINLMSG, "   
lv_o_error_include  TYPE SY-REPID, "   
lv_p_enh_handler  TYPE CL_WB_ED_ENHANCEMENT_HANDLER, "   
lv_o_error_line  TYPE SY-INDEX, "   
lv_global_program  TYPE SY-REPID, "   SPACE
lt_correction_table  TYPE STANDARD TABLE OF SY, "   
lt_error_table  TYPE STANDARD TABLE OF RSLINLMSG, "   
lv_global_check  TYPE CHAR1, "   SPACE
lv_o_error_message  TYPE CHAR1, "   
lt_source  TYPE STANDARD TABLE OF SEDI_SOURCE, "   
lv_source_name  TYPE SY-REPID, "   
lv_o_error_offset  TYPE SY-TABIX, "   
lv_r2_check  TYPE SY, "   SPACE
lt_environment  TYPE STANDARD TABLE OF SEDI_SOURCE, "   
lv_o_error_subrc  TYPE SY-SUBRC, "   
lv_core_editor  TYPE CL_WB_EDITOR, "   
lv_o_error_word  TYPE CL_WB_EDITOR, "   
lv_o_message_id  TYPE SEDI_INTERNAL_ID, "   
lv_new_syntax_check  TYPE CHAR1, "   SPACE
lv_o_external_error  TYPE CHAR1, "   
lv_rfc_syntax_check  TYPE CHAR1, "   SPACE
lv_i_40b_destination  TYPE RFCDEST, "   SPACE
lv_o_error_descriptions  TYPE RSLINLTAB. "   

  CALL FUNCTION 'CHECK_SOURCE'  "
    EXPORTING
         ALL_ERRORS = lv_all_errors
         P_ENH_HANDLER = lv_p_enh_handler
         GLOBAL_PROGRAM = lv_global_program
         GLOBAL_CHECK = lv_global_check
         SOURCE_NAME = lv_source_name
         R2_CHECK = lv_r2_check
         CORE_EDITOR = lv_core_editor
         NEW_SYNTAX_CHECK = lv_new_syntax_check
         RFC_SYNTAX_CHECK = lv_rfc_syntax_check
         I_40B_DESTINATION = lv_i_40b_destination
    IMPORTING
         O_ERROR_INCLUDE = lv_o_error_include
         O_ERROR_LINE = lv_o_error_line
         O_ERROR_MESSAGE = lv_o_error_message
         O_ERROR_OFFSET = lv_o_error_offset
         O_ERROR_SUBRC = lv_o_error_subrc
         O_ERROR_WORD = lv_o_error_word
         O_MESSAGE_ID = lv_o_message_id
         O_EXTERNAL_ERROR = lv_o_external_error
         O_ERROR_DESCRIPTIONS = lv_o_error_descriptions
    TABLES
         WARNINGS_TABLE = lt_warnings_table
         CORRECTION_TABLE = lt_correction_table
         ERROR_TABLE = lt_error_table
         SOURCE = lt_source
         ENVIRONMENT = lt_environment
. " CHECK_SOURCE




ABAP code using 7.40 inline data declarations to call FM CHECK_SOURCE

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_all_errors) = ' '.
 
 
"SELECT single REPID FROM SY INTO @DATA(ld_o_error_include).
 
 
"SELECT single INDEX FROM SY INTO @DATA(ld_o_error_line).
 
"SELECT single REPID FROM SY INTO @DATA(ld_global_program).
DATA(ld_global_program) = ' '.
 
 
 
DATA(ld_global_check) = ' '.
 
 
 
"SELECT single REPID FROM SY INTO @DATA(ld_source_name).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_o_error_offset).
 
DATA(ld_r2_check) = ' '.
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_o_error_subrc).
 
 
 
 
DATA(ld_new_syntax_check) = ' '.
 
 
DATA(ld_rfc_syntax_check) = ' '.
 
DATA(ld_i_40b_destination) = ' '.
 
 


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!