Skip to Content
0
Former Member
Apr 16, 2004 at 06:21 PM

Modification to print function from SAP

29 Views

Hi everybody,

I implemented the print option from SAP and I would like to be able to specify different CSS print sheet.

I added the print option in the context menu. What I would like is a 'sub-menu' that will expand (like with 'SortÂ… ' and then you get the options if you put the mouse over it) and give me the available sizing options (xxsmall, xsmall, regular, etcÂ…). Selecting one of those would be passing the appropriate printing style sheet to the Java function.

How do I modify the call to pass a parameter and have the &P_STYLESHEET to use the appropriate print sheet?

Does any one know how to define the entries in the context menu for the 'sub-menu'?

I tried to put the command

<param name = "CMENU_PARAMETER" value="/sap/bw/mime/BEx/StyleSheets/BWReports_xsmallfont_print.css"

but I could not get it to execute in the function.

Here is what is actually in place working :

<param name="CMENU_LABEL" value="Print">

<param name="CMENU_FUNCTION" value="callPrintHelpService">

<script language=javascript>

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

var url = SAP_BW_URL_Get();

url = url + "&CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=ZPRINTING&ITEM=TABLE_1&P_PAGE_HEIGHT=25.5&P_PAGE_WIDTH=43&P_DATA_AREA_ROWS=80&P_STYLESHEET=/sap/bw/mime/BEx/StyleSheets/BWReports_xsmallfont_print.css";

if( dataprovider == "DATAPROVIDER_1")

window.open(url, "Print", "width=800, height=600, menubar=yes, toolbar=no, scrollbars=yes, resizable=yes");

}

</script>

I tried a couple of things but my Java knowledge is not good enough. Your help would be appreciated.

Guylaine