SAP SCMS_TR_EXPORT Function Module for CMS: Export Documents
SCMS_TR_EXPORT is a standard scms tr export SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for CMS: Export Documents processing and below is the pattern details for this FM, 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 scms tr export FM, simply by entering the name SCMS_TR_EXPORT into the relevant SAP transaction such as SE37 or SE38.
Function Group: SCMS_TR
Program Name: SAPLSCMS_TR
Main Program:
Appliation area: S
Release date: 02-Nov-2001
Mode(Normal, Remote etc): Normal Function Module
Update:
Function SCMS_TR_EXPORT 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 'SCMS_TR_EXPORT'"CMS: Export Documents.
EXPORTING
* MANDT = SY-MANDT "R/3 System, Client Number from Logon
DATAFILE = "File Name of KPro Transport File
* TEST_REPOSITORY = ' ' "Only for Test Purposes
* DESTINATION = ' ' "Logical destination (specified in function call)
* EXPORT_ALL = ' ' "
* REQUEST = ' ' "Request/Task
TABLES
DOCUMENTS = "Documents (Input)
PROTOCOL = "Transport Protocol (Output)
IMPORTING Parameters details for SCMS_TR_EXPORT
MANDT - R/3 System, Client Number from Logon
Data type: SY-MANDTDefault: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATAFILE - File Name of KPro Transport File
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
TEST_REPOSITORY - Only for Test Purposes
Data type: SDOKSTCA-STOR_REPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DESTINATION - Logical destination (specified in function call)
Data type: RFCDES-RFCDESTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORT_ALL -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
REQUEST - Request/Task
Data type: TRKORRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SCMS_TR_EXPORT
DOCUMENTS - Documents (Input)
Data type: SCMS_TRDOCOptional: No
Call by Reference: Yes
PROTOCOL - Transport Protocol (Output)
Data type: SPROT_UOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SCMS_TR_EXPORT 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_mandt | TYPE SY-MANDT, " SY-MANDT | |||
lt_documents | TYPE STANDARD TABLE OF SCMS_TRDOC, " | |||
lv_datafile | TYPE C, " | |||
lt_protocol | TYPE STANDARD TABLE OF SPROT_U, " | |||
lv_test_repository | TYPE SDOKSTCA-STOR_REP, " SPACE | |||
lv_destination | TYPE RFCDES-RFCDEST, " SPACE | |||
lv_export_all | TYPE C, " SPACE | |||
lv_request | TYPE TRKORR. " SPACE |
  CALL FUNCTION 'SCMS_TR_EXPORT' "CMS: Export Documents |
EXPORTING | ||
MANDT | = lv_mandt | |
DATAFILE | = lv_datafile | |
TEST_REPOSITORY | = lv_test_repository | |
DESTINATION | = lv_destination | |
EXPORT_ALL | = lv_export_all | |
REQUEST | = lv_request | |
TABLES | ||
DOCUMENTS | = lt_documents | |
PROTOCOL | = lt_protocol | |
. " SCMS_TR_EXPORT |
ABAP code using 7.40 inline data declarations to call FM SCMS_TR_EXPORT
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."SELECT single MANDT FROM SY INTO @DATA(ld_mandt). | ||||
DATA(ld_mandt) | = SY-MANDT. | |||
"SELECT single STOR_REP FROM SDOKSTCA INTO @DATA(ld_test_repository). | ||||
DATA(ld_test_repository) | = ' '. | |||
"SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_destination). | ||||
DATA(ld_destination) | = ' '. | |||
DATA(ld_export_all) | = ' '. | |||
DATA(ld_request) | = ' '. | |||
Search for further information about these or an SAP related objects