cancel
Showing results for 
Search instead for 
Did you mean: 

How to get value of URL parameter

Former Member
0 Kudos

Hi,

If an ABAP Web Dynpro URL looks like this: http://<server>:<port>/sap/bc/webdynpro/sap/zny_test1?sap-client=100&sap-language=EN, how to get value of the URL parameter “sap-client” at runtime in the application?

Thanks,

Nancy

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The framework currently strips all the framework specific params.

Perhaps the will be made available in a future release. Thomas, any comments ?

However, I dont understand the requriement to know the sap-client URL value.

If your code is running, a user has successfully connected to system a therefore he has a session open and this session is associated with exactly 1 client at any point in time.

See SYSTEM VARAIBLE SY-MANDT.

this represents the client in which the users session is running and negates the need to see

sap-client URL value.

regards

Phil.

0 Kudos

Hi Phil,

What if the URL parameter is not framework specfic, for instance, http://...?Mode=readonly&ShowTab=no. How to get the values of URL parameters at runtime?

Thanks,

Nancy

Former Member
0 Kudos

Hi,

you need to declare importparameters in the dohandledefault method, that handles

the default inbound plug, maybe this weblog can help you clarify:

<a href="/people/koen.labie2/blog/2006/11/29/eating-cookies-with-webdynpro-and-bsp:///people/koen.labie2/blog/2006/11/29/eating-cookies-with-webdynpro-and-bsp

grtz

Koen

roberto_tagliento
Active Contributor
0 Kudos

Not so easy:

*******

The correct class is cl_wd_utilities, the name of the method is CONSTRUCT_WD_URL.

roberto_tagliento
Active Contributor
0 Kudos

For get the URL


call method CL_WD_UTILITIES=>CONSTRUCT_WD_URL( exporting APPLICATION_NAME = l_name
importing OUT_LOCAL_URL = lurl ).

roberto_tagliento
Active Contributor
0 Kudos

Hope this will give you the complete URL with parameter and not the URL cleaned.