Skip to Content
avatar image
Former Member

context menu

i want to add a new help option to the context menu for the column headers of a table web item.

i.e.

characteristic key fig key fig key fig

char val data data data

and behind this option i will call a javascript function which in turn executes a url to a bsp

i have two questions:

1. how do i make the context menu entry only appear for the header cells of my report? both characteristic and key figure but NOT for the data cells.

2. how do i get the value of the infoObject behind the header??

i.e. scenario: i click on characteristic header OCALMONTH and the context menu opens with my custom help entry. now i want to be able to click on that entry and my javascript function would populate my url with http://mycompany.com/sapbc/bsp/sap/help_app/help_docs.do?context=0CALMONTH

is there a standard BW javascript function which returns this value?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 14, 2004 at 04:08 PM

    Hi,

    please have a look on the online documentation which will give you some examples:

    http://help.sap.com/saphelp_nw04/helpdata/en/a0/0b863be3047e19e10000000a114084/frameset.htm

    and

    http://help.sap.com/saphelp_nw04/helpdata/en/80/0b863be3047e19e10000000a114084/frameset.htm

    This should answer the questions 1 and and 2

    Usage of the parameter cell_type and filter should do the trick.

    Regards

    Heike

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 15, 2004 at 08:48 AM

    thanks heike.

    i've made it work using the javascript below BUT this will only work for the specific characteristic header. i need it to be much more generic than this.....

    i.e. the help context menu entry is available for any table header(characteristic or key_figure)

    CHARACTERISTIC KEY_FIGURE KEY_FIGURE KEY_FIGURE

    JULY2004 DATA DATA DATA

    if i use filter it will only point to 1 cell. in this case 0CALMONTH.

    i really need to be able to put something along the lines of CAPTION_CELL. could i use the STRUCTURE parameter? haven't found any documentation for how it works?

    SAP Documentation extract

    "cell_type

    ‘ ’ = No restriction

    ‘CHARACTERISTIC’ = Characteristic

    ‘CHARACTERISTIC_VALUE’ = Characteristic value

    ‘STRUCTURE’ = Structure

    ‘STRUCTURE_MEMBER = Structural component"

    <SCRIPT language="JavaScript">

    SAPBWAddToMenu("Help","myMenuProcessor","","CHARACTERISTIC","0CALMONTH","X","TOP","DATAPROVIDER_1","");

    function myMenuProcessor(parameter,cell_type,filter,parameter1,parameter2,item,dataprovider,x,y){

    var url;

    url = "http://mycompany.com/sap/bc/bsp/sap/z_bpa_help_app/help_docs.do";

    url = url + "?context=" + escape(filter);

    SAPBWOpenWindow(url, "Help", 600,400);

    }

    </SCRIPT>

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      you have to use twice the javascript function once for the CHARACTERISTIC and once for the STRUCTURE_MEMBER.

      SAPBWAddToMenu("i","myMenuProcessor","1","CHARACTERISTIC","","X","TOP","","");

      SAPBWAddToMenu("Hi","myMenuProcessor","2","STRUCTURE_MEMBER","","X","TOP","","");

      then for the menuProcessor:

      function myMenuProcessor(parameter,cell_type,filter,parameter1,parameter2,item,dataprovider,x,y) {

      switch (parameter) {

      case '1' : alert('Iobjnm: ' + filter );

      break;

      case '2' : alert('Structure element :' + parameter1 );

      break;

      }

      }

      Heike