Skip to Content
Author's profile photo Harish Kumar

Common issue when open excel/URL / Cache issue

Hello everyone,

Recently we got chance to work on excel download/upload/open functionality from CRM UI.

In result table view of custom application we have some field of type hyperlink, on click of these hyperlink fields we have to display different data of customers

in excel form. The issue we were facing that the open of excel was working only first time means when we were opening excel  on click of hyperlink field it was opening perfectly only for first time but second time none of hyperlink field was working.

Event if we were opening same excel twice , it was not working.

I searched this issue on SCN and find number of incomplete threads on the same , so just sharing a small solution that is working fine to remove this issue.

We are using callback class approach to open excel and using window.open() method in .HTM page to oprn excel URL.

After preparing all data in callback class when we were opening the URL from HTM page with Window.open() , system was considering the every URL as same one. So to remove this one we have to pass unique URL every time on click of any hyperlink field.

so in HTM page we change our final URL as::

<script type  = “text/Javascript”    language  = “Javascript” >

<%   IF lv_our_URL is not initial.  %>

Window.open(“<% lv_our_url  %> , <%   sy-uzeit %> “);

<%

Clear lv_our_url.

endif .  %>

</script>

Above code made URL unique each time and open excel without any issue.

Hope it will Help.

Regards,

Harish kumar.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Devashish Bhattacharya
      Devashish Bhattacharya

      Good one Harish