SAP CREATE_URL_TRANSACTION Function Module for Create an URL for a transaction









CREATE_URL_TRANSACTION is a standard create url transaction SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create an URL for a transaction 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 create url transaction FM, simply by entering the name CREATE_URL_TRANSACTION into the relevant SAP transaction such as SE37 or SE38.

Function Group: URL_GENERATION
Program Name: SAPLURL_GENERATION
Main Program: SAPLURL_GENERATION
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CREATE_URL_TRANSACTION 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 'CREATE_URL_TRANSACTION'"Create an URL for a transaction
EXPORTING
* SERVICE_LOGSYS = ' ' "Logical System
SERVICE_ID = "Identifier for the service, here transaction code
* SERVICE_ATTR = ' ' "Attribute for Service
* USERNAME = ' ' "SAP System, User Logon Name
* LANGUAGE = ' ' "Language ID
* USAGE_MODE = ' ' "URL generation mode: local or WP Server
* DEVICE = ' ' "Device Type

IMPORTING
SERVICE_URL = "URL for a Service
WP_URL_TYPE = "Description of URL type

TABLES
* URL_PARAM_TBL = "Structure for Parameter Pairs in URLs

EXCEPTIONS
NO_WEBSERVER_FOUND = 1 NO_SERVICE_FILE_FOUND = 2 MISSING_DATA = 3 UNKNOWN_PROBLEM = 4 LOGSYS_OFFLINE = 5
.



IMPORTING Parameters details for CREATE_URL_TRANSACTION

SERVICE_LOGSYS - Logical System

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

SERVICE_ID - Identifier for the service, here transaction code

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

SERVICE_ATTR - Attribute for Service

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

USERNAME - SAP System, User Logon Name

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

LANGUAGE - Language ID

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

USAGE_MODE - URL generation mode: local or WP Server

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

DEVICE - Device Type

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

EXPORTING Parameters details for CREATE_URL_TRANSACTION

SERVICE_URL - URL for a Service

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

WP_URL_TYPE - Description of URL type

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

TABLES Parameters details for CREATE_URL_TRANSACTION

URL_PARAM_TBL - Structure for Parameter Pairs in URLs

Data type: URL_PARAMS
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NO_WEBSERVER_FOUND - No Web server for the logical system

Data type:
Optional: No
Call by Reference: Yes

NO_SERVICE_FILE_FOUND - Could not determine name of service file

Data type:
Optional: No
Call by Reference: Yes

MISSING_DATA - URL could not be created because data is missing

Data type:
Optional: No
Call by Reference: Yes

UNKNOWN_PROBLEM - Unknown problem

Data type:
Optional: No
Call by Reference: Yes

LOGSYS_OFFLINE - Logical system not available

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CREATE_URL_TRANSACTION 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_service_url  TYPE SERVICE_RL, "   
lt_url_param_tbl  TYPE STANDARD TABLE OF URL_PARAMS, "   
lv_service_logsys  TYPE LOGSYS, "   SPACE
lv_no_webserver_found  TYPE LOGSYS, "   
lv_service_id  TYPE SERVICE_ID, "   
lv_wp_url_type  TYPE WP_URL_TP, "   
lv_no_service_file_found  TYPE WP_URL_TP, "   
lv_missing_data  TYPE WP_URL_TP, "   
lv_service_attr  TYPE SERVICE_AT, "   SPACE
lv_username  TYPE UNAME, "   SPACE
lv_unknown_problem  TYPE UNAME, "   
lv_language  TYPE LANG, "   SPACE
lv_logsys_offline  TYPE LANG, "   
lv_usage_mode  TYPE URLMODE, "   SPACE
lv_device  TYPE SDEVTYPE. "   SPACE

  CALL FUNCTION 'CREATE_URL_TRANSACTION'  "Create an URL for a transaction
    EXPORTING
         SERVICE_LOGSYS = lv_service_logsys
         SERVICE_ID = lv_service_id
         SERVICE_ATTR = lv_service_attr
         USERNAME = lv_username
         LANGUAGE = lv_language
         USAGE_MODE = lv_usage_mode
         DEVICE = lv_device
    IMPORTING
         SERVICE_URL = lv_service_url
         WP_URL_TYPE = lv_wp_url_type
    TABLES
         URL_PARAM_TBL = lt_url_param_tbl
    EXCEPTIONS
        NO_WEBSERVER_FOUND = 1
        NO_SERVICE_FILE_FOUND = 2
        MISSING_DATA = 3
        UNKNOWN_PROBLEM = 4
        LOGSYS_OFFLINE = 5
. " CREATE_URL_TRANSACTION




ABAP code using 7.40 inline data declarations to call FM CREATE_URL_TRANSACTION

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.

 
 
DATA(ld_service_logsys) = ' '.
 
 
 
 
 
 
DATA(ld_service_attr) = ' '.
 
DATA(ld_username) = ' '.
 
 
DATA(ld_language) = ' '.
 
 
DATA(ld_usage_mode) = ' '.
 
DATA(ld_device) = ' '.
 


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!