SAP SWLWP_URI_PARSE Function Module for URI Parser









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

Function Group: SWLWPURI
Program Name: SAPLSWLWPURI
Main Program:
Appliation area:
Release date: 15-Aug-2003
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SWLWP_URI_PARSE 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 'SWLWP_URI_PARSE'"URI Parser
EXPORTING
URI = "URI String
* PARSE_AUTHORITY = 'X' "Parse authority?

IMPORTING
SCHEME = "URI Schema
OPAQUE_PART = "Opaque fragment in URI
FRAGMENT = "URI Fragment
IS_RELATIVE = "Is URI relative?
HAS_NET_PATH = "Does URI have network path?
HAS_REL_PATH = "Does URI have relative path?
HAS_EMPTY_AUTHORITY = "Is authority in URI empty?
HAS_IPV4_HOST = "Does URI have IPV4 host name?
AUTHORITY = "URI Authority
USERINFO = "User Information
HOSTPORT = "Host with Port Number
HOST = "Host
PORT = "Port Number
ABS_PATH = "Absolute Path
REL_SEGMENT = "Relative Path Segment
QUERY = "URI Query

EXCEPTIONS
URI_NO_PATH = 1
.



IMPORTING Parameters details for SWLWP_URI_PARSE

URI - URI String

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

PARSE_AUTHORITY - Parse authority?

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

EXPORTING Parameters details for SWLWP_URI_PARSE

SCHEME - URI Schema

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

OPAQUE_PART - Opaque fragment in URI

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

FRAGMENT - URI Fragment

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

IS_RELATIVE - Is URI relative?

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

HAS_NET_PATH - Does URI have network path?

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

HAS_REL_PATH - Does URI have relative path?

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

HAS_EMPTY_AUTHORITY - Is authority in URI empty?

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

HAS_IPV4_HOST - Does URI have IPV4 host name?

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

AUTHORITY - URI Authority

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

USERINFO - User Information

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

HOSTPORT - Host with Port Number

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

HOST - Host

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

PORT - Port Number

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

ABS_PATH - Absolute Path

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

REL_SEGMENT - Relative Path Segment

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

QUERY - URI Query

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

EXCEPTIONS details

URI_NO_PATH - URI does not have a path component

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SWLWP_URI_PARSE 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_uri  TYPE STRING, "   
lv_scheme  TYPE STRING, "   
lv_uri_no_path  TYPE STRING, "   
lv_opaque_part  TYPE STRING, "   
lv_fragment  TYPE STRING, "   
lv_is_relative  TYPE FLAG, "   
lv_has_net_path  TYPE FLAG, "   
lv_has_rel_path  TYPE FLAG, "   
lv_has_empty_authority  TYPE FLAG, "   
lv_has_ipv4_host  TYPE FLAG, "   
lv_authority  TYPE STRING, "   
lv_parse_authority  TYPE FLAG, "   'X'
lv_userinfo  TYPE STRING, "   
lv_hostport  TYPE STRING, "   
lv_host  TYPE STRING, "   
lv_port  TYPE STRING, "   
lv_abs_path  TYPE STRING, "   
lv_rel_segment  TYPE STRING, "   
lv_query  TYPE STRING. "   

  CALL FUNCTION 'SWLWP_URI_PARSE'  "URI Parser
    EXPORTING
         URI = lv_uri
         PARSE_AUTHORITY = lv_parse_authority
    IMPORTING
         SCHEME = lv_scheme
         OPAQUE_PART = lv_opaque_part
         FRAGMENT = lv_fragment
         IS_RELATIVE = lv_is_relative
         HAS_NET_PATH = lv_has_net_path
         HAS_REL_PATH = lv_has_rel_path
         HAS_EMPTY_AUTHORITY = lv_has_empty_authority
         HAS_IPV4_HOST = lv_has_ipv4_host
         AUTHORITY = lv_authority
         USERINFO = lv_userinfo
         HOSTPORT = lv_hostport
         HOST = lv_host
         PORT = lv_port
         ABS_PATH = lv_abs_path
         REL_SEGMENT = lv_rel_segment
         QUERY = lv_query
    EXCEPTIONS
        URI_NO_PATH = 1
. " SWLWP_URI_PARSE




ABAP code using 7.40 inline data declarations to call FM SWLWP_URI_PARSE

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_parse_authority) = 'X'.
 
 
 
 
 
 
 
 


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!