SAP Function Modules

URL_PRESENTATION_METHOD_GET SAP Function module - Define presentation method for URL generation







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

Associated Function Group: URL_GENERATION
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM URL_PRESENTATION_METHOD_GET - URL PRESENTATION METHOD GET





CALL FUNCTION 'URL_PRESENTATION_METHOD_GET' "Define presentation method for URL generation
  EXPORTING
*   user = SPACE                " uname
    service_type =              " service_tp
    service_ident =             " service_id
*   service_logsys = SPACE      " logsys
*   usage_mode = SPACE          " urlmode       URL generation mode: local or WP Server
  IMPORTING
    presentation_method =       " gui_tp
    presentation_web_server =   " web_server    Name of SAPGUI for HTML server
    service_logsys_client =     " mandt         Client
    service_appl_server =       " appl_srv      Name of the Application Server
    service_msg_server =        " msg_srv       Message Server Name
    service_msg_service =       " msg_string    Character String for Message Service
    service_msg_port =          " msg_port      Character String for the Port Number to a Message Service
    service_system_id =         " system_id     Name of R/3 System
    service_system_nr =         " sys_nr_str    Number of R/3 System as string
    service_logsys_off =        " flag          Logical system not available
    service_snc_enable =        " flag          SNC possible
    protocol =                  " web_protcl    Protocol for the Web connection
    url_path =                  " url_path      Path for URLs for a path ID
  EXCEPTIONS
    NO_WEBSERVER_FOUND = 1      "               No Web server for the logical system
    .  "  URL_PRESENTATION_METHOD_GET

ABAP code example for Function Module URL_PRESENTATION_METHOD_GET





The ABAP code below is a full code listing to execute function module URL_PRESENTATION_METHOD_GET 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_presentation_method  TYPE GUI_TP ,
ld_presentation_web_server  TYPE WEB_SERVER ,
ld_service_logsys_client  TYPE MANDT ,
ld_service_appl_server  TYPE APPL_SRV ,
ld_service_msg_server  TYPE MSG_SRV ,
ld_service_msg_service  TYPE MSG_STRING ,
ld_service_msg_port  TYPE MSG_PORT ,
ld_service_system_id  TYPE SYSTEM_ID ,
ld_service_system_nr  TYPE SYS_NR_STR ,
ld_service_logsys_off  TYPE FLAG ,
ld_service_snc_enable  TYPE FLAG ,
ld_protocol  TYPE WEB_PROTCL ,
ld_url_path  TYPE URL_PATH .

DATA(ld_user) = 'Check type of data required'.
DATA(ld_service_type) = 'Check type of data required'.
DATA(ld_service_ident) = 'Check type of data required'.
DATA(ld_service_logsys) = 'some text here'.
DATA(ld_usage_mode) = 'some text here'. . CALL FUNCTION 'URL_PRESENTATION_METHOD_GET' EXPORTING * user = ld_user service_type = ld_service_type service_ident = ld_service_ident * service_logsys = ld_service_logsys * usage_mode = ld_usage_mode IMPORTING presentation_method = ld_presentation_method presentation_web_server = ld_presentation_web_server service_logsys_client = ld_service_logsys_client service_appl_server = ld_service_appl_server service_msg_server = ld_service_msg_server service_msg_service = ld_service_msg_service service_msg_port = ld_service_msg_port service_system_id = ld_service_system_id service_system_nr = ld_service_system_nr service_logsys_off = ld_service_logsys_off service_snc_enable = ld_service_snc_enable protocol = ld_protocol url_path = ld_url_path EXCEPTIONS NO_WEBSERVER_FOUND = 1 . " URL_PRESENTATION_METHOD_GET
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_presentation_method  TYPE GUI_TP ,
ld_user  TYPE UNAME ,
ld_presentation_web_server  TYPE WEB_SERVER ,
ld_service_type  TYPE SERVICE_TP ,
ld_service_logsys_client  TYPE MANDT ,
ld_service_ident  TYPE SERVICE_ID ,
ld_service_appl_server  TYPE APPL_SRV ,
ld_service_logsys  TYPE LOGSYS ,
ld_service_msg_server  TYPE MSG_SRV ,
ld_usage_mode  TYPE URLMODE ,
ld_service_msg_service  TYPE MSG_STRING ,
ld_service_msg_port  TYPE MSG_PORT ,
ld_service_system_id  TYPE SYSTEM_ID ,
ld_service_system_nr  TYPE SYS_NR_STR ,
ld_service_logsys_off  TYPE FLAG ,
ld_service_snc_enable  TYPE FLAG ,
ld_protocol  TYPE WEB_PROTCL ,
ld_url_path  TYPE URL_PATH .

ld_user = 'some text here'.
ld_service_type = 'some text here'.
ld_service_ident = 'some text here'.
ld_service_logsys = 'some text here'.
ld_usage_mode = '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 URL_PRESENTATION_METHOD_GET or its description.