cancel
Showing results for 
Search instead for 
Did you mean: 

Variables in URL

former_member199125
Active Contributor
0 Kudos

Hi Sarvanan,

As per your suggestion, opened a new thread

How can we pass variables instead of hard coded values in below url,

http:/xxxxxxxxxx/sap/bc/gui/sap/its/webgui?~transaction=*ZHR_PAY_SLIP PNPXABKR=01;PNPTIMRA=X;PNPPABRP=01;PNPPABRJ=2011;PNPPERNR-LOW=4

am calling this url in external window, as this url placed in quotes, so it wont takes variable values.

Thanks and Regards

Srinivas

Accepted Solutions (1)

Accepted Solutions (1)

saravanan_narayanan
Active Contributor
0 Kudos

Hello Srinivas,

If I understand your requirement you have values of PNPXABKR, PNPPABRP etc.. in a variable and you want to append them to the URL.

I think simple string concatenation will solve your problem. Isn't it? or did I overlook your requirement?


data lv_PNPXABKR type char2.
data lv_PNPPABRP type char2.

data lv_url type string.

lv_url = 'http:/xxxxxxxxxx/sap/bc/gui/sap/its/webgui?~transaction=*ZHR_PAY_SLIP '.
concatenate lv_url 'PNPXABKR=' lv_PNPXABKR ';' 'PNPPABRP=' lv_PNPPABRP into lv_url respecting blanks.
concate

BR, Saravanan

former_member199125
Active Contributor
0 Kudos

Yes exactly, but let me explain in a bit detail.

For example i have one field PNPPERNR and its values stored in variable in V_PERNR ( it will contain value as 1005 ),

So in URL if i pass value of PNPPERNR as V_PERNR, it dont take the internal value (1005 ), it will just take V_Pernr as text.

So here i am unable to pass variables.how can we?

For example

http:/XXXXXXX/sap/bc/gui/sap/its/webgui?~transaction=*PA30 RP50G-PERNR=4,

iF YOU EXCUTE ABOVE , IT WILL OPEN PA30 AND IN PERNR PLACE IT WILL TAKE 4.

say v_pernr = 4.

http:/XXXXXXX/sap/bc/gui/sap/its/webgui?~transaction=*PA30 RP50G-PERNR=V_PERNR

IF you excute above, it wil open PA30 and and in pERNR place it will take just V_PERNR. not 4.

Hope you understand my query.so how can we pass variable in urls?

Regards

Srinivas

saravanan_narayanan
Active Contributor
0 Kudos

Hello Srinivas,

did u check the CONCATENATE solution proposed by me? if you use the variables in the CONCATENATE statement it will add the data to the URL string.

BR, Saravanan

former_member199125
Active Contributor
0 Kudos

Yes Sarvanan,

Its worked. :). Simple but worked perfectly.

Regards

Srinivas

former_member199125
Active Contributor
0 Kudos

Hi Sarvanan,

How can we remove the standard menu bar in the window ( the window which comes from above url excutionl )?

Regards

Srinivas

Edited by: sanasrinivas on Aug 9, 2011 2:06 PM

Answers (1)

Answers (1)

former_member199125
Active Contributor
0 Kudos

..

saravanan_narayanan
Active Contributor
0 Kudos

Hello Srinivas,

I never tried this. check this thread and if works then let me know

BR, Saravanan

former_member199125
Active Contributor
0 Kudos

Hi Sarvanan,

Just now i checked ur link, it is removing complete menu option and keeping only EXIt button.

Sometimes I want to keep Save button also...so no luck : (

Regards

Srinivas