cancel
Showing results for 
Search instead for 
Did you mean: 

attach_file_to_response

Former Member
0 Kudos

Hi experts,

I have a requirement to provide user a link to download the files, if he gets the file successfully, he are not allow to download anymore.

So I create a link and use method attach_file_to_response.

But my question ist, how do you konw the user have download the file succesfully

I user sy-subrc to track but it donest help:

the worse case are: 1) IE block my window; 2) user lose the intenet connection. how can I catch this?

p.s: I try to use ICM Monitor (transaktion: SMICM), but who can explain how to use it?

thanks

Rui

Edited by: gurui1980 on Jul 1, 2009 6:46 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

you can get information when the user clicks on a particular link.. like when the user clicks on the link the PAI module will get triggered so you use the logic inside the module to get the info about the user and can store that in the database after the module gets executed completely by using the sy-subrc... so next time the user tries to access that file you can check the same in your PAI module before allowing the user to download.

also you can process this after the module is executed but by using the above method you can get the info about the user prior so that you can also determine how many times the user has clicked on the link, no of users, etc...

Hope this will help you!!!

Thanks & Regards,

Punit Raval.

Former Member
0 Kudos

hi,

sy-subrc doesnt catch errors for data Transfer, lets say, even IE blockt window or server connection problem, sy-subrc is always 0.

I use the logic that if user click on the link, it gets inactiv. But it doesn't mean my client have already get the data completly.

still waiting for a solution or work around.

Former Member
0 Kudos

hi,

that is absolutely right.

i was thinking about the same previously but i thought you maybe having just the requirement to get the user info ...

but if you want to go with that then let me bring something in focus... let say the user clicks the link .. then its up to ie/browser to block the window or if the downloading starts but then if the downloading suddenly breaks in the middle ... even the downloading is also handled by the ie/brower or if the user choose to not cancel the one .... rght.. this are the cases.

so in all case its become to difficult to get the information about whether the downloading is completed or not from sap..

you have to use javascript to achieve this functionality.

or else you can take the user in another page where you will ask the user "downloading over ... back" or else click here to start downloading again... so when the user clicks back then you can save the info about the user.

hope this will surely help you!!!

Thanks & Regards,

Punit Raval.

Edited by: punit raval on Jul 3, 2009 4:17 PM

Former Member
0 Kudos

any idea?