SAP SCMS_REP_DEFINE Function Module for Define HTTP Repository
SCMS_REP_DEFINE is a standard scms rep define SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Define HTTP Repository 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 rep define FM, simply by entering the name SCMS_REP_DEFINE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SCMS_DEF
Program Name: SAPLSCMS_DEF
Main Program: SAPLSCMS_DEF
Appliation area:
Release date: 02-Nov-2001
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SCMS_REP_DEFINE 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_REP_DEFINE'"Define HTTP Repository.
EXPORTING
* FORCE = ' ' "Overwrite Existing Customizing
* RECORD_CHANGES = ' ' "Record Changes
CHANGING
SCREP = "CMS: Content Repository Attributes
* ORDER = "Request/Task
EXCEPTIONS
ENTRY_EXISTS = 1 LOCKED = 2 NO_AUTHORITY = 3 WRONG_VERSION = 4 WRONG_TYPE = 5 TRANSPORT_FAILED = 6
IMPORTING Parameters details for SCMS_REP_DEFINE
FORCE - Overwrite Existing Customizing
Data type: SY-DATARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RECORD_CHANGES - Record Changes
Data type: SY-DATARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for SCMS_REP_DEFINE
SCREP - CMS: Content Repository Attributes
Data type: SCMS_SCREPOptional: No
Call by Reference: Yes
ORDER - Request/Task
Data type: E070-TRKORROptional: Yes
Call by Reference: Yes
EXCEPTIONS details
ENTRY_EXISTS -
Data type:Optional: No
Call by Reference: Yes
LOCKED -
Data type:Optional: No
Call by Reference: Yes
NO_AUTHORITY -
Data type:Optional: No
Call by Reference: Yes
WRONG_VERSION -
Data type:Optional: No
Call by Reference: Yes
WRONG_TYPE -
Data type:Optional: No
Call by Reference: Yes
TRANSPORT_FAILED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for SCMS_REP_DEFINE 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_force | TYPE SY-DATAR, " SPACE | |||
| lv_screp | TYPE SCMS_SCREP, " | |||
| lv_entry_exists | TYPE SCMS_SCREP, " | |||
| lv_order | TYPE E070-TRKORR, " | |||
| lv_locked | TYPE E070, " | |||
| lv_record_changes | TYPE SY-DATAR, " SPACE | |||
| lv_no_authority | TYPE SY, " | |||
| lv_wrong_version | TYPE SY, " | |||
| lv_wrong_type | TYPE SY, " | |||
| lv_transport_failed | TYPE SY. " |
|   CALL FUNCTION 'SCMS_REP_DEFINE' "Define HTTP Repository |
| EXPORTING | ||
| FORCE | = lv_force | |
| RECORD_CHANGES | = lv_record_changes | |
| CHANGING | ||
| SCREP | = lv_screp | |
| ORDER | = lv_order | |
| EXCEPTIONS | ||
| ENTRY_EXISTS = 1 | ||
| LOCKED = 2 | ||
| NO_AUTHORITY = 3 | ||
| WRONG_VERSION = 4 | ||
| WRONG_TYPE = 5 | ||
| TRANSPORT_FAILED = 6 | ||
| . " SCMS_REP_DEFINE | ||
ABAP code using 7.40 inline data declarations to call FM SCMS_REP_DEFINE
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 DATAR FROM SY INTO @DATA(ld_force). | ||||
| DATA(ld_force) | = ' '. | |||
| "SELECT single TRKORR FROM E070 INTO @DATA(ld_order). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_record_changes). | ||||
| DATA(ld_record_changes) | = ' '. | |||
Search for further information about these or an SAP related objects