SAP Function Modules

SALI_MA_CREATE_ATTACH SAP Function module







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

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


Pattern for FM SALI_MA_CREATE_ATTACH - SALI MA CREATE ATTACH





CALL FUNCTION 'SALI_MA_CREATE_ATTACH' "
  EXPORTING
    parent_tid =                " alglobtid
    name =                      " c
    typeclass =                 " alglobtid-mtclass
*   subtype = AL_STD_NO_SUBCLASS  " altdefrc-mtesubtype
    numrange =                  " alglobtid-mtnumrange
    uniquenum =                 " almtcreate-uniquenum
*   mt_class =                  " c
*   customizing_group =         " c
  IMPORTING
    new_tid =                   " alglobtid
    detailed_error_text =       " string
  EXCEPTIONS
    INVALID_TID = 1             "
    UNABLE_TO_EXPAND_NAME = 2   "
    INVALID_PARAMETERS = 3      "               Invalid parameter
    COMMUNICATION_FAILURE = 4   "
    OTHER_PROBLEM = 5           "
    WRONG_SEGMENT = 6           "
    INTERNAL_FAILURE_SALS = 7   "
    NO_SUBTYPE_FOR_MSC = 8      "
    NO_MORE_SPACE = 9           "
    .  "  SALI_MA_CREATE_ATTACH

ABAP code example for Function Module SALI_MA_CREATE_ATTACH





The ABAP code below is a full code listing to execute function module SALI_MA_CREATE_ATTACH 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_new_tid  TYPE ALGLOBTID ,
ld_detailed_error_text  TYPE STRING .

DATA(ld_parent_tid) = 'Check type of data required'.
DATA(ld_name) = 'Check type of data required'.

DATA(ld_typeclass) = some text here

DATA(ld_subtype) = 123

DATA(ld_numrange) = some text here

DATA(ld_uniquenum) = 123
DATA(ld_mt_class) = 'Check type of data required'.
DATA(ld_customizing_group) = 'Check type of data required'. . CALL FUNCTION 'SALI_MA_CREATE_ATTACH' EXPORTING parent_tid = ld_parent_tid name = ld_name typeclass = ld_typeclass * subtype = ld_subtype numrange = ld_numrange uniquenum = ld_uniquenum * mt_class = ld_mt_class * customizing_group = ld_customizing_group IMPORTING new_tid = ld_new_tid detailed_error_text = ld_detailed_error_text EXCEPTIONS INVALID_TID = 1 UNABLE_TO_EXPAND_NAME = 2 INVALID_PARAMETERS = 3 COMMUNICATION_FAILURE = 4 OTHER_PROBLEM = 5 WRONG_SEGMENT = 6 INTERNAL_FAILURE_SALS = 7 NO_SUBTYPE_FOR_MSC = 8 NO_MORE_SPACE = 9 . " SALI_MA_CREATE_ATTACH
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 ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "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_new_tid  TYPE ALGLOBTID ,
ld_parent_tid  TYPE ALGLOBTID ,
ld_detailed_error_text  TYPE STRING ,
ld_name  TYPE C ,
ld_typeclass  TYPE ALGLOBTID-MTCLASS ,
ld_subtype  TYPE ALTDEFRC-MTESUBTYPE ,
ld_numrange  TYPE ALGLOBTID-MTNUMRANGE ,
ld_uniquenum  TYPE ALMTCREATE-UNIQUENUM ,
ld_mt_class  TYPE C ,
ld_customizing_group  TYPE C .

ld_parent_tid = 'Check type of data required'.
ld_name = 'Check type of data required'.

ld_typeclass = some text here

ld_subtype = 123

ld_numrange = some text here

ld_uniquenum = 123
ld_mt_class = 'Check type of data required'.
ld_customizing_group = '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 SALI_MA_CREATE_ATTACH or its description.