Skip to Content
0
Former Member
Sep 17, 2005 at 12:58 AM

Web Template Print from Context Menu

28 Views

Hello BW Experts,

How to enchance Web Printing document describes to use print functionality from Context Menu.

I have done the following things in sequence as mentioned in the paper.

1) Added the following code for the context menu

<object>

<param name="OWNER" value="SAP_BW"/>

<param name="CMD" value="SET_PROPERTIES"/>

<param name="TEMPLATE_ID" value="Z_TEST"/>

<param name="SUPPRESS_SYSTEM_MESSAGES" value="X"/>

<param name="SUPPRESS_WARNINGS" value="X"/>

<param name="VARIABLE_SCREEN" value="X"/>

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

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

TEMPLATE PROPERTIES

</object>

-


2) Added the Javascript function

<script>

<script language=javascript>

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

var url = SAP_BW_URL_Get();

var print_service = "Z_PRINT_HELP_SERVICE"

if ( parameter == "inches") print_service = "Z_PRINT_HELP_SERVICE_IMP";

var cmd = url + "&DATA_PROVIDER=DATAPROVIDER_9&HELP_SERVICE_CLASS=" + print_service;

SAP_BW_URL_Get();

<!var logo = "'&IMG:Mime/BEx/Icons/KODAK_corp.jpg&'";->

url = url + "&CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=ZPRINTING&DATA_PROVIDER=DATAPROVIDER_9&P_HEADER_LEFT=";

url = url + logo ;

url = url + "&P_STYLESHEET=/sap/bw/mime/BEx/StyleSheets/BWReports_smallfont_print.css&P_PAGE_WIDTH=29&P_PAGE_HEIGHT=18&P_HEADER_CENTER=Restricted Information";

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

</script>

-


When I click the Print in the context menu, printing does not happen.

-- Am I missing the call to the javasript function ?

-- Wondering if the call to the javasricpt function should be different (should contain the paramters to the fucntion)

-- Is there any alternate method to achieve the print functionality from context menu.

Please share your experiences with the print functionality of web templates. Any experiences of print functionality would be helpful. Appreciate your suggestions.

Thanks,

BWer