function parseV2ServiceUri(sServiceUri) {
		/**
		 * 1.) Case
		 * If and only if a service URI contains "sap/opu/odata" and the subsequent segment (namespace) is not "sap"
		 * than the result is defined as "/<namespace>/<ServiceName>". The segment MUST not contain a slash.
		 * Both "sap/opa/odata" and the namespace are considered case insensitive because ABAP does not respect
		 * case sensitivity.
		 * 2.) Case
		 * If the namespace is "sap" the result is defined as "<ServiceName>".
		 * 3.) Case
		 * If a service URI does not contain "sap/opu/odata" the result is defined as the last segement of the resource
		 * path without a leading slash.
		 *
		 * Note: A service URI may contain a service version. Service versions have to specified as matrix parameter "v"
		 * of the resource segment which represents the service name. e.g. sap/opu/odata/MyService;v=0002. Only
		 * numerical characters are allowed. Default version is '0001'.
		 */

		// 1. Capture group => Namespace    2.) Capture group => Service Name
		var oRegexService = /.*sap\/opu\/odata\/([^\/]+)\/([^\/]+)/i;
		var oRegexServiceVersion = /([^;]+);v=(\d{1,4})/i;

		var sODataPath = "sap/opu/odata";
		var sServiceNameWithVersion;

		// First extract namespace and service
		if (sServiceUri.toLowerCase().indexOf(sODataPath) !== -1) {
			// 1. and 2. Case
			var aServiceSegments = sServiceUri.match(oRegexService);
			if (!aServiceSegments || aServiceSegments.length !== 3) {
				throw new Error("sap.ui.fl.fieldExt.UriParser.parseV2ServiceUri: Malformed service URI (Invalid service name)");
			}
			if (aServiceSegments[1].toLowerCase() !== "sap") { // 1.) Case
				sServiceNameWithVersion = "/" + aServiceSegments[1] + "/" + aServiceSegments[2];
			} else { // 2.) Case
				sServiceNameWithVersion = aServiceSegments[2];
			}
		} else { // 3. Case
			// Remove last slash
			if (sServiceUri.length > 0 && sServiceUri.lastIndexOf("/") + 1 === sServiceUri.length) {
				sServiceUri = sServiceUri.substring(0, sServiceUri.length - 1);
			}
			sServiceNameWithVersion = sServiceUri.substring(sServiceUri.lastIndexOf("/") + 1);
		}

		// Check if a service version has been specified
		if (sServiceNameWithVersion.indexOf(";v=") !== -1) {
			var aVersionSegments = sServiceNameWithVersion.match(oRegexServiceVersion);
			if (!aVersionSegments || aVersionSegments.length !== 3) {
				throw new Error("sap.ui.fl.fieldExt.UriParser.parseV2ServiceUri: Malformed service URI (Invalid version)");
			}

			return {
				serviceName: aVersionSegments[1],
				serviceVersion: aVersionSegments[2],
				serviceType: mServiceType.v2
			};
		}
		return {
			serviceName: sServiceNameWithVersion,
			serviceVersion: "0001",
			serviceType: mServiceType.v2
		};
	}
/**
	 * Extracts ServiceName and ServiceVersion out of Service URI
	 *
	 * @param {string} sServiceUri - URI to an OData v2 service document
	 * @returns {object} An object with serviceName, serviceVersion and serviceType
	 * @private
	 */
Extracts ServiceName and ServiceVersion out of Service URI
@param {string} sServiceUri - URI to an OData v2 service document
@returns {object} An object with serviceName, serviceVersion and serviceType
@private
Extracts ServiceName and ServiceVersion out of Service URI @param { string } sServiceUri - URI to an OData v2 service document @returns { object } An object with serviceName serviceVersion and serviceType @private
function parseV2ServiceUri(sServiceUri) {
		var oRegexService = /.*sap\/opu\/odata\/([^\/]+)\/([^\/]+)/i;
		var oRegexServiceVersion = /([^;]+);v=(\d{1,4})/i;
		var sODataPath = "sap/opu/odata";
		var sServiceNameWithVersion;
		if (sServiceUri.toLowerCase().indexOf(sODataPath) !== -1) {
			var aServiceSegments = sServiceUri.match(oRegexService);
			if (!aServiceSegments || aServiceSegments.length !== 3) {
				throw new Error("sap.ui.fl.fieldExt.UriParser.parseV2ServiceUri: Malformed service URI (Invalid service name)");
			}
			if (aServiceSegments[1].toLowerCase() !== "sap") { 
				sServiceNameWithVersion = "/" + aServiceSegments[1] + "/" + aServiceSegments[2];
			} else { 
				sServiceNameWithVersion = aServiceSegments[2];
			}
		} else { 
			if (sServiceUri.length > 0 && sServiceUri.lastIndexOf("/") + 1 === sServiceUri.length) {
				sServiceUri = sServiceUri.substring(0, sServiceUri.length - 1);
			}
			sServiceNameWithVersion = sServiceUri.substring(sServiceUri.lastIndexOf("/") + 1);
		}
		if (sServiceNameWithVersion.indexOf(";v=") !== -1) {
			var aVersionSegments = sServiceNameWithVersion.match(oRegexServiceVersion);
			if (!aVersionSegments || aVersionSegments.length !== 3) {
				throw new Error("sap.ui.fl.fieldExt.UriParser.parseV2ServiceUri: Malformed service URI (Invalid version)");
			}
			return {
				serviceName: aVersionSegments[1],
				serviceVersion: aVersionSegments[2],
				serviceType: mServiceType.v2
			};
		}
		return {
			serviceName: sServiceNameWithVersion,
			serviceVersion: "0001",
			serviceType: mServiceType.v2
		};
	}
function parseV2ServiceUri ( sServiceUri ) { var oRegexService = / .*sap\/opu\/odata\/([^\/]+)\/([^\/]+) / i ; var oRegexServiceVersion = / ([^;]+);v=(\d{1,4}) / i ; var sODataPath = "sap/opu/odata" ; var sServiceNameWithVersion ; if ( sServiceUri . toLowerCase ( ) . indexOf ( sODataPath ) !== - 1 ) { var aServiceSegments = sServiceUri . match ( oRegexService ) ; if ( ! aServiceSegments || aServiceSegments . length !== 3 ) { throw new Error ( "sap.ui.fl.fieldExt.UriParser.parseV2ServiceUri: Malformed service URI (Invalid service name)" ) ; } if ( aServiceSegments [ 1 ] . toLowerCase ( ) !== "sap" ) { sServiceNameWithVersion = "/" + aServiceSegments [ 1 ] + "/" + aServiceSegments [ 2 ] ; } else { sServiceNameWithVersion = aServiceSegments [ 2 ] ; } } else { if ( sServiceUri . length > 0 && sServiceUri . lastIndexOf ( "/" ) + 1 === sServiceUri . length ) { sServiceUri = sServiceUri . substring ( 0 , sServiceUri . length - 1 ) ; } sServiceNameWithVersion = sServiceUri . substring ( sServiceUri . lastIndexOf ( "/" ) + 1 ) ; } if ( sServiceNameWithVersion . indexOf ( ";v=" ) !== - 1 ) { var aVersionSegments = sServiceNameWithVersion . match ( oRegexServiceVersion ) ; if ( ! aVersionSegments || aVersionSegments . length !== 3 ) { throw new Error ( "sap.ui.fl.fieldExt.UriParser.parseV2ServiceUri: Malformed service URI (Invalid version)" ) ; } return { serviceName : aVersionSegments [ 1 ] , serviceVersion : aVersionSegments [ 2 ] , serviceType : mServiceType . v2 } ; } return { serviceName : sServiceNameWithVersion , serviceVersion : "0001" , serviceType : mServiceType . v2 } ; }
Extracts ServiceName and ServiceVersion out of Service URI
 @param {string} sServiceUri - URI to an OData v2 service document
 @returns {object} An object with serviceName, serviceVersion and serviceType
 @private
Extracts ServiceName and ServiceVersion out of Service URI @param { string } sServiceUri - URI to an OData v2 service document @returns { object } An object with serviceName serviceVersion and serviceType @private
/**
		 * 1.) Case
		 * If and only if a service URI contains "sap/opu/odata" and the subsequent segment (namespace) is not "sap"
		 * than the result is defined as "/<namespace>/<ServiceName>". The segment MUST not contain a slash.
		 * Both "sap/opa/odata" and the namespace are considered case insensitive because ABAP does not respect
		 * case sensitivity.
		 * 2.) Case
		 * If the namespace is "sap" the result is defined as "<ServiceName>".
		 * 3.) Case
		 * If a service URI does not contain "sap/opu/odata" the result is defined as the last segement of the resource
		 * path without a leading slash.
		 *
		 * Note: A service URI may contain a service version. Service versions have to specified as matrix parameter "v"
		 * of the resource segment which represents the service name. e.g. sap/opu/odata/MyService;v=0002. Only
		 * numerical characters are allowed. Default version is '0001'.
		 */ // 1. Capture group => Namespace    2.) Capture group => Service Name // First extract namespace and service // 1. and 2. Case // 1.) Case // 2.) Case // 3. Case // Remove last slash // Check if a service version has been specified