SAP Function Modules

SOTR_CHECK_ALIAS SAP Function module







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

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


Pattern for FM SOTR_CHECK_ALIAS - SOTR CHECK ALIAS





CALL FUNCTION 'SOTR_CHECK_ALIAS' "
  EXPORTING
    paket =                     " sotr_pack     Packages Allowed in the OTR
*   flag_check_package = 'X'    "
  IMPORTING
    paket_in_alias =            " sotr_pack
  CHANGING
    alias =                     " sotr_alias    Unique Alias Name for OTR Concept
  EXCEPTIONS
    ALIAS_NOT_ALLOWED = 1       "
    PACKAGE_MISSING = 2         "               Package not specified
    PACKAGE_NOT_EXIST = 3       "
    DIFFERENT_PACKAGE_IN_ALIAS = 4  "
    ALIAS_TOO_LONG = 5          "
    .  "  SOTR_CHECK_ALIAS

ABAP code example for Function Module SOTR_CHECK_ALIAS





The ABAP code below is a full code listing to execute function module SOTR_CHECK_ALIAS 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_paket_in_alias  TYPE SOTR_PACK .

DATA(ld_alias) = 'Check type of data required'.
DATA(ld_paket) = 'Check type of data required'.
DATA(ld_flag_check_package) = 'some text here'. . CALL FUNCTION 'SOTR_CHECK_ALIAS' EXPORTING paket = ld_paket * flag_check_package = ld_flag_check_package IMPORTING paket_in_alias = ld_paket_in_alias CHANGING alias = ld_alias EXCEPTIONS ALIAS_NOT_ALLOWED = 1 PACKAGE_MISSING = 2 PACKAGE_NOT_EXIST = 3 DIFFERENT_PACKAGE_IN_ALIAS = 4 ALIAS_TOO_LONG = 5 . " SOTR_CHECK_ALIAS
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 ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "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_alias  TYPE SOTR_ALIAS ,
ld_paket_in_alias  TYPE SOTR_PACK ,
ld_paket  TYPE SOTR_PACK ,
ld_flag_check_package  TYPE STRING .

ld_alias = 'Check type of data required'.
ld_paket = 'Check type of data required'.
ld_flag_check_package = 'some text here'.

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