SAP SCMS_DOC_CREATE_FROM_URL Function Module for CMS: Create Document









SCMS_DOC_CREATE_FROM_URL is a standard scms doc create from url 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: Create Document 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 doc create from url FM, simply by entering the name SCMS_DOC_CREATE_FROM_URL into the relevant SAP transaction such as SE37 or SE38.

Function Group: SCMS_API
Program Name: SAPLSCMS_API
Main Program: SAPLSCMS_API
Appliation area: S
Release date: 02-Nov-2001
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SCMS_DOC_CREATE_FROM_URL 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_DOC_CREATE_FROM_URL'"CMS: Create Document
EXPORTING
* MANDT = SY-MANDT "Client
* COPY_ALLOWED = 'X' "Screens, display user entry
* VSCAN_PROFILE = '/SCMS/KPRO_CREATE' "Virus Scan Profile
STOR_CAT = "Category
* CREP_ID = ' ' "Repository (Only Allowed if Category = ' ')
* DOC_ID = ' ' "Document ID
* PHIO_ID = "PHIO ID if Known, May Be Shorter than DocID
* DOC_PROT = 'rud' "Protection
* SIGNATURE = 'X' "
* SECURITY = ' ' "
* OVERWRITE = ' ' "Overwrite ('X' Without Log, ' ' with Log, '-' Never)

IMPORTING
DOC_ID_OUT = "Target Document ID (if not specified, a new GUID is used)
COPY_DONE = "Screens, display user entry

CHANGING
DOC_INFO = "SCMS: Entries for URLs

EXCEPTIONS
BAD_STORAGE_TYPE = 1 ERROR_FORMAT = 10 ERROR_PARAMETER = 11 ERROR = 12 BLOCKED_BY_POLICY = 13 BAD_REQUEST = 2 UNAUTHORIZED = 3 FORBIDDEN = 4 CONFLICT = 5 INTERNAL_SERVER_ERROR = 6 ERROR_HTTP = 7 ERROR_SIGNATURE = 8 ERROR_CONFIG = 9
.



IMPORTING Parameters details for SCMS_DOC_CREATE_FROM_URL

MANDT - Client

Data type: SY-MANDT
Default: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)

COPY_ALLOWED - Screens, display user entry

Data type: SY-DATAR
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

VSCAN_PROFILE - Virus Scan Profile

Data type: VSCAN_PROFILE
Default: '/SCMS/KPRO_CREATE'
Optional: Yes
Call by Reference: No ( called with pass by value option)

STOR_CAT - Category

Data type: SDOKSTCA-STOR_CAT
Optional: No
Call by Reference: No ( called with pass by value option)

CREP_ID - Repository (Only Allowed if Category = SPACE)

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DOC_ID - Document ID

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PHIO_ID - PHIO ID if Known, May Be Shorter than DocID

Data type: SDOK_PHID
Optional: Yes
Call by Reference: No ( called with pass by value option)

DOC_PROT - Protection

Data type: C
Default: 'rud'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SIGNATURE -

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SECURITY -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

OVERWRITE - Overwrite ('X' Without Log, ' ' with Log, '-' Never)

Data type: C
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SCMS_DOC_CREATE_FROM_URL

DOC_ID_OUT - Target Document ID (if not specified, a new GUID is used)

Data type: C
Optional: No
Call by Reference: No ( called with pass by value option)

COPY_DONE - Screens, display user entry

Data type: SY-DATAR
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for SCMS_DOC_CREATE_FROM_URL

DOC_INFO - SCMS: Entries for URLs

Data type: SCMS_ACURT
Optional: No
Call by Reference: Yes

EXCEPTIONS details

BAD_STORAGE_TYPE - Storage Category Not Supported

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_FORMAT - Incorrect Data Format (Structure Repository)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_PARAMETER - Parameter error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR - Unspecified error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

BLOCKED_BY_POLICY -

Data type:
Optional: No
Call by Reference: Yes

BAD_REQUEST - Unknown Functions or Parameters

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

UNAUTHORIZED - Security Breach

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FORBIDDEN - Document or Component Already Exists

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CONFLICT - Document/ Component/ Administration Data is Inaccessible

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INTERNAL_SERVER_ERROR - Internal Error in Content Server

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_HTTP - Error in HTTP Access

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_SIGNATURE - Error when Calculating Signature

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_CONFIG - Configuration error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for SCMS_DOC_CREATE_FROM_URL 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
lv_doc_info  TYPE SCMS_ACURT, "   
lv_doc_id_out  TYPE C, "   
lv_bad_storage_type  TYPE C, "   
lv_copy_allowed  TYPE SY-DATAR, "   'X'
lv_error_format  TYPE SY, "   
lv_vscan_profile  TYPE VSCAN_PROFILE, "   '/SCMS/KPRO_CREATE'
lv_error_parameter  TYPE VSCAN_PROFILE, "   
lv_error  TYPE VSCAN_PROFILE, "   
lv_blocked_by_policy  TYPE VSCAN_PROFILE, "   
lv_stor_cat  TYPE SDOKSTCA-STOR_CAT, "   
lv_copy_done  TYPE SY-DATAR, "   
lv_bad_request  TYPE SY, "   
lv_crep_id  TYPE C, "   SPACE
lv_unauthorized  TYPE C, "   
lv_doc_id  TYPE C, "   SPACE
lv_forbidden  TYPE C, "   
lv_phio_id  TYPE SDOK_PHID, "   
lv_conflict  TYPE SDOK_PHID, "   
lv_doc_prot  TYPE C, "   'rud'
lv_internal_server_error  TYPE C, "   
lv_signature  TYPE C, "   'X'
lv_error_http  TYPE C, "   
lv_security  TYPE C, "   SPACE
lv_error_signature  TYPE C, "   
lv_overwrite  TYPE C, "   ' '
lv_error_config  TYPE C. "   

  CALL FUNCTION 'SCMS_DOC_CREATE_FROM_URL'  "CMS: Create Document
    EXPORTING
         MANDT = lv_mandt
         COPY_ALLOWED = lv_copy_allowed
         VSCAN_PROFILE = lv_vscan_profile
         STOR_CAT = lv_stor_cat
         CREP_ID = lv_crep_id
         DOC_ID = lv_doc_id
         PHIO_ID = lv_phio_id
         DOC_PROT = lv_doc_prot
         SIGNATURE = lv_signature
         SECURITY = lv_security
         OVERWRITE = lv_overwrite
    IMPORTING
         DOC_ID_OUT = lv_doc_id_out
         COPY_DONE = lv_copy_done
    CHANGING
         DOC_INFO = lv_doc_info
    EXCEPTIONS
        BAD_STORAGE_TYPE = 1
        ERROR_FORMAT = 10
        ERROR_PARAMETER = 11
        ERROR = 12
        BLOCKED_BY_POLICY = 13
        BAD_REQUEST = 2
        UNAUTHORIZED = 3
        FORBIDDEN = 4
        CONFLICT = 5
        INTERNAL_SERVER_ERROR = 6
        ERROR_HTTP = 7
        ERROR_SIGNATURE = 8
        ERROR_CONFIG = 9
. " SCMS_DOC_CREATE_FROM_URL




ABAP code using 7.40 inline data declarations to call FM SCMS_DOC_CREATE_FROM_URL

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 DATAR FROM SY INTO @DATA(ld_copy_allowed).
DATA(ld_copy_allowed) = 'X'.
 
 
DATA(ld_vscan_profile) = '/SCMS/KPRO_CREATE'.
 
 
 
 
"SELECT single STOR_CAT FROM SDOKSTCA INTO @DATA(ld_stor_cat).
 
"SELECT single DATAR FROM SY INTO @DATA(ld_copy_done).
 
 
DATA(ld_crep_id) = ' '.
 
 
DATA(ld_doc_id) = ' '.
 
 
 
 
DATA(ld_doc_prot) = 'rud'.
 
 
DATA(ld_signature) = 'X'.
 
 
DATA(ld_security) = ' '.
 
 
DATA(ld_overwrite) = ' '.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!