Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

encoding url in web dynpro

Former Member
0 Likes
1,047

hi

i have creatend an abap webdynpro which send to an Employee pdf file with his details. In the url i have the a variable which contains the employee pernr and the program in the webdynpro controller calculate his details according to this pernr.

Is there a way to hid or encode this part in the url (cause i dont want that the user will have a way to chabge the pernr no in the url and watch other employee details ) ?

thanks

elad

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
962

Not sure about this one, but it may be easier to send a GUID instead of the pernr in the URL. If it doesn't exist, you can add a field GUID it to the master data table (and use FM GUID_CREATE to create unique GUIDs). You can use the GUID as a secondary index since it can identify the employee.

Hope this helps!

Cheers, Roel

8 REPLIES 8
Read only

Former Member
0 Likes
963

Not sure about this one, but it may be easier to send a GUID instead of the pernr in the URL. If it doesn't exist, you can add a field GUID it to the master data table (and use FM GUID_CREATE to create unique GUIDs). You can use the GUID as a secondary index since it can identify the employee.

Hope this helps!

Cheers, Roel

Read only

0 Likes
962

sorry but what is GUID ?

Read only

0 Likes
962

GUID = Global Unique IDentifier. It is a generated string of characters and always unique (example: DFEC37D77015D8F19D1B005056995118). Attach it to the masterdata table of your employees and you can identify the employee with this GUID.

Cheers, Roel

Read only

0 Likes
962

is there a reverse fm GUID - which i send it the uniqe string and get the pernr back ?

because i want it both ways

Read only

0 Likes
962

Another approach would be to avoid sending any personal data in the URL at all.

The application could check the logon userid and retrieve the personnel number. Then produce the PDF only for the logged on user.

Rob

Read only

0 Likes
962

You should generate a GUID for every employee in your database and save it in the same table. For instance you have employee 1234. You run FM GUID_CREATE and the GUID is DFEC37D77015D8F19D1B005056995118. Now save this GUID in the table where your employee master data is stored (use an append structure or so). When you generate the URL include this GUID instead of the pernr so something like http://my.system/wdapp/get_details?guid=DFEC37D77015D8F19D1B005056995118. In your application you can select the corresponding employee from the masterdata table as you saved the GUID with his pernr. I can't make it simpler than this

Rob's approach is the best way to go, security-wise! But it requires that all employees have a user ID in the system.

Cheers, Roel

Read only

0 Likes
962

i am sending the url to the user microsoft inbox there he will press the url link and will get the pdf. he is loging in in a non dialog usr i define in the webdynpro in order to get into the sap

Read only

0 Likes
962

Is it a single general userid for all users or does each employee have a unique userid?

Rob