cancel
Showing results for 
Search instead for 
Did you mean: 

Modification to print function from SAP

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

sorry, enhancing the contextmenu with sub menus is not supported.

Heike

Former Member
0 Kudos

Thanks,

What about my other question on passing parameters? Any ideas?

Former Member
0 Kudos

Hi,

this is probably an escaping problem. Transfering / in a query string might cause problems.

Escape the / with %2F.

Regards

Heike

Former Member
0 Kudos

Keike,

Could not get it to work, but i built it another way which allows the user to choose the print size.

Thanks a lot,

Guylaine