SAP Function Modules

ITF_SYNTAX_CHECK SAP Function module - SAPscript: Syntax check for ITF text







ITF_SYNTAX_CHECK 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 ITF_SYNTAX_CHECK into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: STSC
Released Date: . .
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ITF_SYNTAX_CHECK - ITF SYNTAX CHECK





CALL FUNCTION 'ITF_SYNTAX_CHECK' "SAPscript: Syntax check for ITF text
  EXPORTING
*   rect =                      " trect
*   fullscreen = 'X'            " c
*   no_list = SPACE             " c
*   form_text = 'X'             " c
*   inc = 'X'                   " c
*   textname = ' '              " thead-tdname
    textlanguage =              " thead-tdspras  Text Language
    textid =                    " thead-tdid
    textobject =                " thead-tdobject
*   paragraph_check = ' '       " c
*   string_check = ' '          " c
*   symbol_check = ' '          " c
*   symbol_form =               " thead-tdform
*   symbol_program =            " program
*   dialog = SPACE              " c
  IMPORTING
    error_number =              " i             Number of Errors
    warning_number =            " i             Number of warning messages
    text =                      " c
    linenumber =                " i
  TABLES
    itf_text =                  " tline
*   paragraph_tab =             " itcdp
*   string_tab =                " itcds
*   error_tab =                 " stxerror      Error Message Table
*   stack_tab =                 " stxtoken
  EXCEPTIONS
    CANCELED = 1                "
    PANIC = 2                   "               Inconsistent Input Parameters
    EMPTY = 3                   "
    .  "  ITF_SYNTAX_CHECK

ABAP code example for Function Module ITF_SYNTAX_CHECK





The ABAP code below is a full code listing to execute function module ITF_SYNTAX_CHECK 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_error_number  TYPE I ,
ld_warning_number  TYPE I ,
ld_text  TYPE C ,
ld_linenumber  TYPE I ,
it_itf_text  TYPE STANDARD TABLE OF TLINE,"TABLES PARAM
wa_itf_text  LIKE LINE OF it_itf_text ,
it_paragraph_tab  TYPE STANDARD TABLE OF ITCDP,"TABLES PARAM
wa_paragraph_tab  LIKE LINE OF it_paragraph_tab ,
it_string_tab  TYPE STANDARD TABLE OF ITCDS,"TABLES PARAM
wa_string_tab  LIKE LINE OF it_string_tab ,
it_error_tab  TYPE STANDARD TABLE OF STXERROR,"TABLES PARAM
wa_error_tab  LIKE LINE OF it_error_tab ,
it_stack_tab  TYPE STANDARD TABLE OF STXTOKEN,"TABLES PARAM
wa_stack_tab  LIKE LINE OF it_stack_tab .

DATA(ld_rect) = 'Check type of data required'.
DATA(ld_fullscreen) = 'Check type of data required'.
DATA(ld_no_list) = 'Check type of data required'.
DATA(ld_form_text) = 'Check type of data required'.
DATA(ld_inc) = 'Check type of data required'.

DATA(ld_textname) = some text here

DATA(ld_textlanguage) = Check type of data required

DATA(ld_textid) = some text here

DATA(ld_textobject) = some text here
DATA(ld_paragraph_check) = 'Check type of data required'.
DATA(ld_string_check) = 'Check type of data required'.
DATA(ld_symbol_check) = 'Check type of data required'.

DATA(ld_symbol_form) = some text here
DATA(ld_symbol_program) = 'Check type of data required'.
DATA(ld_dialog) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_itf_text to it_itf_text.

"populate fields of struture and append to itab
append wa_paragraph_tab to it_paragraph_tab.

"populate fields of struture and append to itab
append wa_string_tab to it_string_tab.

"populate fields of struture and append to itab
append wa_error_tab to it_error_tab.

"populate fields of struture and append to itab
append wa_stack_tab to it_stack_tab. . CALL FUNCTION 'ITF_SYNTAX_CHECK' EXPORTING * rect = ld_rect * fullscreen = ld_fullscreen * no_list = ld_no_list * form_text = ld_form_text * inc = ld_inc * textname = ld_textname textlanguage = ld_textlanguage textid = ld_textid textobject = ld_textobject * paragraph_check = ld_paragraph_check * string_check = ld_string_check * symbol_check = ld_symbol_check * symbol_form = ld_symbol_form * symbol_program = ld_symbol_program * dialog = ld_dialog IMPORTING error_number = ld_error_number warning_number = ld_warning_number text = ld_text linenumber = ld_linenumber TABLES itf_text = it_itf_text * paragraph_tab = it_paragraph_tab * string_tab = it_string_tab * error_tab = it_error_tab * stack_tab = it_stack_tab EXCEPTIONS CANCELED = 1 PANIC = 2 EMPTY = 3 . " ITF_SYNTAX_CHECK
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here 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_error_number  TYPE I ,
ld_rect  TYPE TRECT ,
it_itf_text  TYPE STANDARD TABLE OF TLINE ,
wa_itf_text  LIKE LINE OF it_itf_text,
ld_warning_number  TYPE I ,
ld_fullscreen  TYPE C ,
it_paragraph_tab  TYPE STANDARD TABLE OF ITCDP ,
wa_paragraph_tab  LIKE LINE OF it_paragraph_tab,
ld_text  TYPE C ,
ld_no_list  TYPE C ,
it_string_tab  TYPE STANDARD TABLE OF ITCDS ,
wa_string_tab  LIKE LINE OF it_string_tab,
ld_linenumber  TYPE I ,
ld_form_text  TYPE C ,
it_error_tab  TYPE STANDARD TABLE OF STXERROR ,
wa_error_tab  LIKE LINE OF it_error_tab,
ld_inc  TYPE C ,
it_stack_tab  TYPE STANDARD TABLE OF STXTOKEN ,
wa_stack_tab  LIKE LINE OF it_stack_tab,
ld_textname  TYPE THEAD-TDNAME ,
ld_textlanguage  TYPE THEAD-TDSPRAS ,
ld_textid  TYPE THEAD-TDID ,
ld_textobject  TYPE THEAD-TDOBJECT ,
ld_paragraph_check  TYPE C ,
ld_string_check  TYPE C ,
ld_symbol_check  TYPE C ,
ld_symbol_form  TYPE THEAD-TDFORM ,
ld_symbol_program  TYPE PROGRAM ,
ld_dialog  TYPE C .

ld_rect = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_itf_text to it_itf_text.
ld_fullscreen = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_paragraph_tab to it_paragraph_tab.
ld_no_list = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_string_tab to it_string_tab.
ld_form_text = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_error_tab to it_error_tab.
ld_inc = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_stack_tab to it_stack_tab.

ld_textname = some text here

ld_textlanguage = Check type of data required

ld_textid = some text here

ld_textobject = some text here
ld_paragraph_check = 'Check type of data required'.
ld_string_check = 'Check type of data required'.
ld_symbol_check = 'Check type of data required'.

ld_symbol_form = some text here
ld_symbol_program = 'Check type of data required'.
ld_dialog = 'Check type of data required'.

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 ITF_SYNTAX_CHECK or its description.