SAP SCMS_DOC_URL_READ Function Module for CMS: Generate get-URL









SCMS_DOC_URL_READ is a standard scms doc url read 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: Generate get-URL 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 url read FM, simply by entering the name SCMS_DOC_URL_READ 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_URL_READ 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_URL_READ'"CMS: Generate get-URL
EXPORTING
* MANDT = SY-MANDT "Client
* LOCATION = ' ' "Location as distribution criterion
* HTTP_URL_ONLY = ' ' "Only Return HTTP URL
* DP_URL_ONLY = ' ' "Only Return DataProvider URL
* LIFETIME = ' ' "Lifetime for DP URLs
* NO_CACHE = ' ' "Screens, display user entry
* EXPIRATION = "UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
* PDF_MODE = ' ' "
* URL_EXTENTION = ' ' "
* FORCE_GET = ' ' "Force Get-Request - No docGet
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
* COMP_ID = ' ' "Component ID
* SIGNATURE = 'X' "Sign URL for Access to Document ('X' Yes, ' ' No)
* SECURITY = ' ' "'F' Frontend, 'B' Backend
* USE_LOCATION = 'A' "Location Use ('A' Automatic, 'E' Explicit, 'S' Set/Get Parameter)

IMPORTING
URL = "Generated URL

EXCEPTIONS
ERROR_CONFIG = 1 ERROR_PARAMETER = 2 ERROR_SIGNATURE = 3 HTTP_NOT_SUPPORTED = 4 DOCGET_NOT_SUPPORTED = 5 NOT_ACCESSABLE = 6 DATA_PROVIDER_ERROR = 7 TREE_NOT_SUPPORTED = 8 NOT_SUPPORTED = 9
.



IMPORTING Parameters details for SCMS_DOC_URL_READ

MANDT - Client

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

LOCATION - Location as distribution criterion

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

HTTP_URL_ONLY - Only Return HTTP URL

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

DP_URL_ONLY - Only Return DataProvider URL

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

LIFETIME - Lifetime for DP URLs

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

NO_CACHE - Screens, display user entry

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

EXPIRATION - UTC Time Stamp in Short Form (YYYYMMDDhhmmss)

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

PDF_MODE -

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

URL_EXTENTION -

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

FORCE_GET - Force Get-Request - No docGet

Data type: SY-DATAR
Default: SPACE
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
Optional: No
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)

COMP_ID - Component ID

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

SIGNATURE - Sign URL for Access to Document ('X' Yes, SPACE No)

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

SECURITY - 'F' Frontend, 'B' Backend

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

USE_LOCATION - Location Use ('A' Automatic, 'E' Explicit, 'S' Set/Get Parameter)

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

EXPORTING Parameters details for SCMS_DOC_URL_READ

URL - Generated URL

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

EXCEPTIONS details

ERROR_CONFIG - Configuration error

Data type:
Optional: No
Call by Reference: Yes

ERROR_PARAMETER - Parameter error

Data type:
Optional: No
Call by Reference: Yes

ERROR_SIGNATURE -

Data type:
Optional: No
Call by Reference: Yes

HTTP_NOT_SUPPORTED - No HTTP URL for Storage in R3 Database

Data type:
Optional: No
Call by Reference: Yes

DOCGET_NOT_SUPPORTED - No decGet URL for DP

Data type:
Optional: No
Call by Reference: Yes

NOT_ACCESSABLE - Document Inaccessible

Data type:
Optional: No
Call by Reference: Yes

DATA_PROVIDER_ERROR - Error When Calling DataProvider

Data type:
Optional: No
Call by Reference: Yes

TREE_NOT_SUPPORTED - Structure Repository Not Supported

Data type:
Optional: No
Call by Reference: Yes

NOT_SUPPORTED - Invalid Storage Category

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SCMS_DOC_URL_READ 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_url  TYPE C, "   
lv_mandt  TYPE SY-MANDT, "   SY-MANDT
lv_error_config  TYPE SY, "   
lv_location  TYPE SDOKLOC-LOCATION, "   SPACE
lv_http_url_only  TYPE SY-DATAR, "   SPACE
lv_dp_url_only  TYPE SY-DATAR, "   SPACE
lv_lifetime  TYPE C, "   SPACE
lv_no_cache  TYPE SY-DATAR, "   SPACE
lv_expiration  TYPE TIMESTAMP, "   
lv_pdf_mode  TYPE C, "   SPACE
lv_url_extention  TYPE C, "   SPACE
lv_force_get  TYPE SY-DATAR, "   SPACE
lv_stor_cat  TYPE SDOKSTCA-STOR_CAT, "   
lv_error_parameter  TYPE SDOKSTCA, "   
lv_crep_id  TYPE C, "   SPACE
lv_error_signature  TYPE C, "   
lv_doc_id  TYPE C, "   
lv_http_not_supported  TYPE C, "   
lv_phio_id  TYPE SDOK_PHID, "   
lv_docget_not_supported  TYPE SDOK_PHID, "   
lv_comp_id  TYPE C, "   SPACE
lv_not_accessable  TYPE C, "   
lv_signature  TYPE C, "   'X'
lv_data_provider_error  TYPE C, "   
lv_security  TYPE C, "   SPACE
lv_tree_not_supported  TYPE C, "   
lv_use_location  TYPE SY-DATAR, "   'A'
lv_not_supported  TYPE SY. "   

  CALL FUNCTION 'SCMS_DOC_URL_READ'  "CMS: Generate get-URL
    EXPORTING
         MANDT = lv_mandt
         LOCATION = lv_location
         HTTP_URL_ONLY = lv_http_url_only
         DP_URL_ONLY = lv_dp_url_only
         LIFETIME = lv_lifetime
         NO_CACHE = lv_no_cache
         EXPIRATION = lv_expiration
         PDF_MODE = lv_pdf_mode
         URL_EXTENTION = lv_url_extention
         FORCE_GET = lv_force_get
         STOR_CAT = lv_stor_cat
         CREP_ID = lv_crep_id
         DOC_ID = lv_doc_id
         PHIO_ID = lv_phio_id
         COMP_ID = lv_comp_id
         SIGNATURE = lv_signature
         SECURITY = lv_security
         USE_LOCATION = lv_use_location
    IMPORTING
         URL = lv_url
    EXCEPTIONS
        ERROR_CONFIG = 1
        ERROR_PARAMETER = 2
        ERROR_SIGNATURE = 3
        HTTP_NOT_SUPPORTED = 4
        DOCGET_NOT_SUPPORTED = 5
        NOT_ACCESSABLE = 6
        DATA_PROVIDER_ERROR = 7
        TREE_NOT_SUPPORTED = 8
        NOT_SUPPORTED = 9
. " SCMS_DOC_URL_READ




ABAP code using 7.40 inline data declarations to call FM SCMS_DOC_URL_READ

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 LOCATION FROM SDOKLOC INTO @DATA(ld_location).
DATA(ld_location) = ' '.
 
"SELECT single DATAR FROM SY INTO @DATA(ld_http_url_only).
DATA(ld_http_url_only) = ' '.
 
"SELECT single DATAR FROM SY INTO @DATA(ld_dp_url_only).
DATA(ld_dp_url_only) = ' '.
 
DATA(ld_lifetime) = ' '.
 
"SELECT single DATAR FROM SY INTO @DATA(ld_no_cache).
DATA(ld_no_cache) = ' '.
 
 
DATA(ld_pdf_mode) = ' '.
 
DATA(ld_url_extention) = ' '.
 
"SELECT single DATAR FROM SY INTO @DATA(ld_force_get).
DATA(ld_force_get) = ' '.
 
"SELECT single STOR_CAT FROM SDOKSTCA INTO @DATA(ld_stor_cat).
 
 
DATA(ld_crep_id) = ' '.
 
 
 
 
 
 
DATA(ld_comp_id) = ' '.
 
 
DATA(ld_signature) = 'X'.
 
 
DATA(ld_security) = ' '.
 
 
"SELECT single DATAR FROM SY INTO @DATA(ld_use_location).
DATA(ld_use_location) = 'A'.
 
 


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!