This weblog is about how to extend the validity of the secured key in the URL to access the document stored in the content server. SAP provides APIs to generate the URL link for the documents, the secured id is stroed in the link with expiration time of may be few hours. If that need to be extended for some reason say for 2 days, that can be done using the steps provided in this Blog.
Assumption: The document URL is available in the variable lc_url. * data: lc_url type saeuri. Step 1. Add number of days that you want to extend the validity of the secure key in the URL using function module ‘RRBA_DAYS_TO_TIMESTAMP_ADD’.
data: lv_timestamp type rsgeneral-timestmp. data: lv_days type i value 2. call function 'RRBA_DAYS_TO_TIMESTAMP_ADD' exporting i_days = lv_days importing e_timestmp = lv_timestamp.
Step 2.
Use function module 'SCMS_URL_REGENERATE' to regenerate the URL with new extended validity period. data: final_url type saeuri. call function 'SCMS_URL_REGENERATE' exporting absolute_uri = lc_url expiration = lv_timestamp importing https_uri = final_url exceptions error_parameter = 1 .
Be the first to leave a comment
You must be Logged on to comment or reply to a post.