SAP Function Modules

SCMS_TR_IMPORT SAP Function module - CMS: Import Documents







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

Associated Function Group: SCMS_TR
Released Date: 02.11.2001
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM SCMS_TR_IMPORT - SCMS TR IMPORT





CALL FUNCTION 'SCMS_TR_IMPORT' "CMS: Import Documents
  EXPORTING
*   mandt = SY-MANDT            " sy-mandt      R/3 System, Client Number from Logon
    datafile =                  " c             File Name of KPro Transport File
*   is_upgrade = SPACE          " c             "X" - Use Within Upgrade
*   test_repository = SPACE     " sdokstca-stor_rep  Only for Test Purposes
*   destination = SPACE         " rfcdes-rfcdest  Logical Destination (Specified in Function Call)
*   request = SPACE             " trkorr        Request/Task
  TABLES
    protocol =                  " sprot_u       Transport Protocol (Export)
*   categories =                " scms_trcim    Derivation of Categories at Import
    .  "  SCMS_TR_IMPORT

ABAP code example for Function Module SCMS_TR_IMPORT





The ABAP code below is a full code listing to execute function module SCMS_TR_IMPORT 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:
it_protocol  TYPE STANDARD TABLE OF SPROT_U,"TABLES PARAM
wa_protocol  LIKE LINE OF it_protocol ,
it_categories  TYPE STANDARD TABLE OF SCMS_TRCIM,"TABLES PARAM
wa_categories  LIKE LINE OF it_categories .

DATA(ld_mandt) = 'Check type of data required'.
DATA(ld_datafile) = 'Check type of data required'.
DATA(ld_is_upgrade) = 'Check type of data required'.

SELECT single STOR_REP
FROM SDOKSTCA
INTO @DATA(ld_test_repository).


SELECT single RFCDEST
FROM RFCDES
INTO @DATA(ld_destination).

DATA(ld_request) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_protocol to it_protocol.

"populate fields of struture and append to itab
append wa_categories to it_categories. . CALL FUNCTION 'SCMS_TR_IMPORT' EXPORTING * mandt = ld_mandt datafile = ld_datafile * is_upgrade = ld_is_upgrade * test_repository = ld_test_repository * destination = ld_destination * request = ld_request TABLES protocol = it_protocol * categories = it_categories . " SCMS_TR_IMPORT
IF SY-SUBRC EQ 0. "All OK 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_mandt  TYPE SY-MANDT ,
it_protocol  TYPE STANDARD TABLE OF SPROT_U ,
wa_protocol  LIKE LINE OF it_protocol,
ld_datafile  TYPE C ,
it_categories  TYPE STANDARD TABLE OF SCMS_TRCIM ,
wa_categories  LIKE LINE OF it_categories,
ld_is_upgrade  TYPE C ,
ld_test_repository  TYPE SDOKSTCA-STOR_REP ,
ld_destination  TYPE RFCDES-RFCDEST ,
ld_request  TYPE TRKORR .

ld_mandt = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_protocol to it_protocol.
ld_datafile = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_categories to it_categories.
ld_is_upgrade = 'Check type of data required'.

SELECT single STOR_REP
FROM SDOKSTCA
INTO ld_test_repository.


SELECT single RFCDEST
FROM RFCDES
INTO ld_destination.

ld_request = 'Check type of data required'.

SAP Documentation for FM SCMS_TR_IMPORT


Import of documents from one or more content servers.
The documents contained in the file DATAFILE are imported. ...See here for full SAP fm documentation






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