cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancing Save View button functionality

former_member204618
Active Contributor
0 Kudos

Hi All,

I have a business requirement to enhance what the save view button currently does.

I will try to explain what we need to achieve.

As it stands the current Save View button just opens a new window requesting Description and Technical Name of the view and a tick box to Overwrite Existing View.


javascript:SAPBWOpenWindow(SAP_BW_URL_Get() + '&CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=HW_SAVE_VIEW&item=QueryName', 'SaveView',500,250);

However this is not very practical from a user experience point of view, since they will not know the technical names of the views they are looking at from the Query View Selection web item (Selection box).

So what I attempted to do was to place the table from the dialog box into a hidden div element and when they click on the button show the div element and populate the technical name and description of the view they currently have displayed. :-


      function showPopup(p)
      {
        greyout(true);
        document.getElementById(p).style.display = 'block';
        var sel = document.getElementsByName("VIEWLISTDD")[0];
        var selIndex = sel.options.selectedIndex;
        var technam = document.getElementById("TECH_NAME_0"); 
        var desc = document.getElementById("DESCRIPTION_0");
        if (selIndex != 0) 
        {
        technam.value = sel.options[selIndex].value;
        desc.value = sel.options[selIndex].text; 
        }
      }
      function hidePopup(p)
      {
        greyout(false);
        document.getElementById(p).style.display = 'none';
      }

But the problem I have now is how to interact with the back end help service to be able to save the view either new or overwriting existing as it currently works.

I have tried replacing the FORM action with a onsubmit event and calling a new function as below :-


function saveview()
  {
     var template = SAPBWTemplateProp[9];
     document.VIEW.action = template+'&CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=HW_SAVE_VIEW&ITEM=QueryName&SUBCMD=SAVE';
  }

But this doesn't work.

Essentially I need the help service to not open a new window but become part of the existing document so I can fill in the missing technical name and description dynamically.

Can anyone offer any help with this?

Thanks

Craig

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Craig,

Can you share with us some of the knwoledge you've gained in interacting with this sort of web items. In our case, we actually have a requirement to hide the the tabs that appear when clicking on the "Save As" button and these tabs are the "BEx Porfolio" and "My Portfoloi" button since we are not willing to support KM folders.

Therefore we only want to display the favourites tabs when users press on "Save As". If you have any idea how to achieve that could you please provide details on the neccessary steps.

Cheers,

Jad

former_member204618
Active Contributor
0 Kudos

Jad,

Unfortunately we are still working with 3.x Web Templates and Items as we currently have no Java Stack / EP.

If this opens a new window as I encountered, you may have a lot of work on your hands to remove or should I say hide these buttons. Unless of course there is a standard way of doing it with BI7 Templates. I don't have any exposure at the minute to these newer templates, so I am unable to comment.

Regards

Craig

former_member204618
Active Contributor
0 Kudos

Hi All,

Doesn't matter I have managed to enhance the original save view popup window instead.

Cheers

Craig

former_member205400
Active Participant
0 Kudos

Craig,

Does this give you the name of the query being executed:

var technam = document.getElementById("TECH_NAME_0");

Mike

former_member204618
Active Contributor
0 Kudos

Mike,

No this only gives me access to the Text Input Box for the Technical Name, allowing me to modify it or in my case populate it with the actual technical name.

Cheers

Craig