Skip to Content
avatar image
Former Member

Popup for download to excel on WEB UI

Hi,

I have a reuirement where i need to put a button (Download to Excel) on WEB UI,

Can anyone please let me know as to what should be the piece of code to be put in the event which i will be making for the button, so that when i click on download to excel button a popup comes up asking me to either save the file to desktop or cancel.

Best Regards,

Saurabh Garg

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 14, 2010 at 06:13 AM

    Saurabh,

    There are few limitation in the way you can download the excel from Web UI. The standard functionality of Export to Excel have been coded by the Framework and there is a lot of runtime code that is generated during the call. Moreover the Pop Up that comes up after such an event is not a Web UI pop Up, it's a Windows Pop Up , so the coding from the Framework ensures that it call Windows API and then the excel sheet is opened with the necessary data.

    It may be possible by making use of some Javascript code, which i am not too sure and even SAP best practices advices you not to do such coding.

    Regards,

    Harshit

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 13, 2010 at 02:53 PM

    Hi Saurabh,

    Excel Download is a standard functionality available in CRM WEB UI for all the table views. You might need to enable in the .htm coding of the view where you want this button.

    You will see similar code below. You can add the

    <chtmlb:configTable id = "Table"

    xml = "<%= lv_xml %>"

    onRowSelection = "select"

    table = "//result/Table"

    selectedRowIndex = "<%= result->SELECTED_INDEX %>"

    selectedRowIndexTable = "<%= result->SELECTION_TAB %>"

    selectionMode = "<%= lv_select_mode %>"

    downloadToExcel

    actions = "<%= controller->gt_button %>"

    actionsMaxInRow = "5"

    usage = "SEARCHRESULT"

    visibleFirstRow = "<%= result->VISIBLE_FIRST_ROW_INDEX %>"

    showNoMatchText = "FALSE"

    forceScrollable = "TRUE" />

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Saurabh,

      Excel Download is a standard functionality available in CRM WEB UI for all the table views. You might need to enable in the .htm coding of the view where you want this button.

      You will see similar code below. You can add the following bold letter line.

      <chtmlb:configTable id = "Table"

      xml = "<%= lv_xml %>"

      onRowSelection = "select"

      table = "//result/Table"

      selectedRowIndex = "<%= result->SELECTED_INDEX %>"

      selectedRowIndexTable = "<%= result->SELECTION_TAB %>"

      selectionMode = "<%= lv_select_mode %>"

      downloadToExcel = "TRUE"

      actions = "<%= controller->gt_button %>"

      actionsMaxInRow = "5"

      usage = "SEARCHRESULT"

      visibleFirstRow = "<%= result->VISIBLE_FIRST_ROW_INDEX %>"

      showNoMatchText = "FALSE"

      forceScrollable = "TRUE" />

        • R3wrd pnts if helpful **

        Thanks

        Vishal