SAP Function Modules

SCMS_DOC_URL_READ SAP Function module - CMS: Generate get-URL







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

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


Pattern for FM SCMS_DOC_URL_READ - SCMS DOC URL READ





CALL FUNCTION 'SCMS_DOC_URL_READ' "CMS: Generate get-URL
  EXPORTING
*   mandt = SY-MANDT            " sy-mandt      Client
    stor_cat =                  " sdokstca-stor_cat  Category
*   crep_id = SPACE             " c             Repository (Only Allowed if Category = SPACE)
    doc_id =                    " c             Document ID
*   phio_id =                   " sdok_phid     PHIO ID if Known, May Be Shorter than DocID
*   comp_id = SPACE             " c             Component ID
*   signature = 'X'             " c             Sign URL for Access to Document ("X" Yes, SPACE No)
*   security = SPACE            " c             'F' Frontend, 'B' Backend
*   use_location = 'A'          " sy-datar      Location Use ("A" Automatic, "E" Explicit, "S" Set/Get Parameter)
*   location = SPACE            " sdokloc-location  Location as distribution criterion
*   http_url_only = SPACE       " sy-datar      Only Return HTTP URL
*   dp_url_only = SPACE         " sy-datar      Only Return DataProvider URL
*   lifetime = SPACE            " c             Lifetime for DP URLs
*   no_cache = SPACE            " sy-datar      Screens, display user entry
*   expiration =                " timestamp     UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
*   pdf_mode = SPACE            " c
*   url_extention = SPACE       " c
*   force_get = SPACE           " sy-datar      Force Get-Request - No docGet
  IMPORTING
    url =                       " c             Generated URL
  EXCEPTIONS
    ERROR_CONFIG = 1            "               Configuration error
    ERROR_PARAMETER = 2         "               Parameter error
    ERROR_SIGNATURE = 3         "
    HTTP_NOT_SUPPORTED = 4      "               No HTTP URL for Storage in R3 Database
    DOCGET_NOT_SUPPORTED = 5    "               No decGet URL for DP
    NOT_ACCESSABLE = 6          "               Document Inaccessible
    DATA_PROVIDER_ERROR = 7     "               Error When Calling DataProvider
    TREE_NOT_SUPPORTED = 8      "               Structure Repository Not Supported
    NOT_SUPPORTED = 9           "               Invalid Storage Category
    .  "  SCMS_DOC_URL_READ

ABAP code example for Function Module SCMS_DOC_URL_READ





The ABAP code below is a full code listing to execute function module SCMS_DOC_URL_READ 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:
ld_url  TYPE C .

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

SELECT single STOR_CAT
FROM SDOKSTCA
INTO @DATA(ld_stor_cat).

DATA(ld_crep_id) = 'Check type of data required'.
DATA(ld_doc_id) = 'Check type of data required'.
DATA(ld_phio_id) = 'Check type of data required'.
DATA(ld_comp_id) = 'Check type of data required'.
DATA(ld_signature) = 'Check type of data required'.
DATA(ld_security) = 'Check type of data required'.
DATA(ld_use_location) = 'some text here'.

SELECT single LOCATION
FROM SDOKLOC
INTO @DATA(ld_location).

DATA(ld_http_url_only) = 'some text here'.
DATA(ld_dp_url_only) = 'some text here'.
DATA(ld_lifetime) = 'some text here'.
DATA(ld_no_cache) = 'some text here'.
DATA(ld_expiration) = 'some text here'.
DATA(ld_pdf_mode) = 'some text here'.
DATA(ld_url_extention) = 'some text here'.
DATA(ld_force_get) = 'some text here'. . CALL FUNCTION 'SCMS_DOC_URL_READ' EXPORTING * mandt = ld_mandt stor_cat = ld_stor_cat * crep_id = ld_crep_id doc_id = ld_doc_id * phio_id = ld_phio_id * comp_id = ld_comp_id * signature = ld_signature * security = ld_security * use_location = ld_use_location * location = ld_location * http_url_only = ld_http_url_only * dp_url_only = ld_dp_url_only * lifetime = ld_lifetime * no_cache = ld_no_cache * expiration = ld_expiration * pdf_mode = ld_pdf_mode * url_extention = ld_url_extention * force_get = ld_force_get IMPORTING url = ld_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
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here 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_url  TYPE C ,
ld_mandt  TYPE SY-MANDT ,
ld_stor_cat  TYPE SDOKSTCA-STOR_CAT ,
ld_crep_id  TYPE C ,
ld_doc_id  TYPE C ,
ld_phio_id  TYPE SDOK_PHID ,
ld_comp_id  TYPE C ,
ld_signature  TYPE C ,
ld_security  TYPE C ,
ld_use_location  TYPE SY-DATAR ,
ld_location  TYPE SDOKLOC-LOCATION ,
ld_http_url_only  TYPE SY-DATAR ,
ld_dp_url_only  TYPE SY-DATAR ,
ld_lifetime  TYPE C ,
ld_no_cache  TYPE SY-DATAR ,
ld_expiration  TYPE TIMESTAMP ,
ld_pdf_mode  TYPE C ,
ld_url_extention  TYPE C ,
ld_force_get  TYPE SY-DATAR .

ld_mandt = 'Check type of data required'.

SELECT single STOR_CAT
FROM SDOKSTCA
INTO ld_stor_cat.

ld_crep_id = 'Check type of data required'.
ld_doc_id = 'Check type of data required'.
ld_phio_id = 'Check type of data required'.
ld_comp_id = 'Check type of data required'.
ld_signature = 'Check type of data required'.
ld_security = 'Check type of data required'.
ld_use_location = 'some text here'.

SELECT single LOCATION
FROM SDOKLOC
INTO ld_location.

ld_http_url_only = 'some text here'.
ld_dp_url_only = 'some text here'.
ld_lifetime = 'some text here'.
ld_no_cache = 'some text here'.
ld_expiration = 'some text here'.
ld_pdf_mode = 'some text here'.
ld_url_extention = 'some text here'.
ld_force_get = 'some text here'.

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