sapexperts _ automate a personalized title in an sap bw web report

5
Figure 1 BW Web Application title click here to view a larger version of this image Automate a Personalized Title in an SAP BW Web Report by Vitaliy Rudnytskiy, Senior BW Consultant, HP Enterprise Services February 1, 2006 When you create a new Web template, Web Application Designer (Web AD) titles reports “BW Web Application” (Figure 1). Unfortunately, I could not find a delivered way to make the system show the Web template description as a title. However, the good news is that you can still automate it using a trick I am going to show you. To change it you have to switch to the HTML tab in Web AD (Figure 2) and manually edit text for the title tag.

Upload: bhupendrasingh1975

Post on 07-Dec-2015

6 views

Category:

Documents


0 download

DESCRIPTION

SAPexperts _ Automate a Personalized Title in an SAP BW Web Report

TRANSCRIPT

Page 1: SAPexperts _ Automate a Personalized Title in an SAP BW Web Report

Figure 1

BW Web Application titleclick here to view a largerversion of this image

Automate a PersonalizedTitle in an SAP BW WebReportby Vitaliy Rudnytskiy, Senior BWConsultant, HP Enterprise ServicesFebruary 1, 2006When you create a new Web template,Web Application Designer (Web AD)titles reports “BW Web Application”(Figure 1). Unfortunately, I could notfind a delivered way to make thesystem show the Web templatedescription as a title. However, thegood news is that you can stillautomate it using a trick I am going toshow you.

To change it you have to switch tothe HTML tab in Web AD (Figure 2)and manually edit text for the titletag.

Page 2: SAPexperts _ Automate a Personalized Title in an SAP BW Web Report

Figure 2

Go to the HTML tab clickhere to view a larger versionof this image

NoteFor more information about TextElements Web Items, refer toSAP/BW 3.5 help documentation(http://help.sap.com) at BI Suite:Business Explorer>BEx Web>WebApplication Design: BEx WebApplication Designer>Web Items andclick on Text.

You can use Text Elements, which arestandard components for buildingWeb reports in Web AD, to customizethe title of your report. They areavailable in the Web Items window.Let’s say you want to use adescription of the query on which youbased your report. Switch to theHTML tab and put the code in Figure3 between the title tags.

<span class="mceItemObject" > <span name=”OWNER” value=”SAP_BW”class="mceItemParam"></span> <span name=”CMD” value=”GET_ITEM”class="mceItemParam"></span> <span name=”NAME” value=”TEXTELEMENTS_1”class="mceItemParam"></span> <span name=”ITEM_CLASS” value=”CL_RSR_WWW_ITEM_TEXT_ELEMENTS”class="mceItemParam"></span> <span name=”DATA_PROVIDER” value=”DATAPROVIDER_1”class="mceItemParam"></span> <span name=”GENERATE_CAPTION” value=””class="mceItemParam"></span> <span name=”ELEMENT_TYPE_1” value=”COMMON”class="mceItemParam"></span> <span

Page 3: SAPexperts _ Automate a Personalized Title in an SAP BW Web Report

Figure 4

HTML code generates newtitle click here to view alarger version of this image

name=”ELEMENT_NAME_1” value=”REPTXTLG”class="mceItemParam"></span> <span name=”ONLY_VALUES” value=”X”class="mceItemParam"></span> ITEM: TEXTELEMENTS_1 </span> Figure 3 Enter code between title tagsNoteClick these links to download the code in Figure 3and Figure 5.

This HTML code displays only valuesof general text element REPTXTLG(describes the query) without thegenerated caption. In my example, thesystem assigns the query to dataprovider DATAPROVIDER_1. ReplaceDATAPROVIDER_1 with a technicalname of a DataProvider used in yourWeb template.

Now run the Web template via menupath Web Template>Execute in theBrowser and check the title (Figure4).

You can further enrich the titledescription. Let’s say you have amandatory one-entry variable for yourorganization that you want to showon a report title. You also want toshow the BW user ID of the personwho ran the report. Use the code in

Page 4: SAPexperts _ Automate a Personalized Title in an SAP BW Web Report

Figure 6

New title shows the GBUvariable and the user ID clickhere to view a larger versionof this image

Figure 5 with GBU (global businessunit) as the variable for theorganization characteristic.

<span class="mceItemObject" > <span name=”OWNER” value=”SAP_BW”class="mceItemParam"></span> <span name=”CMD” value=”GET_ITEM”class="mceItemParam"></span> <span name=”NAME” value=”TEXTELEMENTS_1”class="mceItemParam"></span> <span name=”ITEM_CLASS” value=”CL_RSR_WWW_ITEM_TEXT_ELEMENTS”class="mceItemParam"></span> <span name=”DATA_PROVIDER” value=”DATAPROVIDER_1”class="mceItemParam"></span> <span name=”GENERATE_CAPTION” value=””class="mceItemParam"></span> <span name=”ELEMENT_TYPE_1” value=”COMMON”class="mceItemParam"></span> <span name=”ELEMENT_NAME_1” value=”REPTXTLG”class="mceItemParam"></span> <span name=”ONLY_VALUES” value=”X”class="mceItemParam"></span> ITEM: TEXTELEMENTS_1 </span> for <span class="mceItemObject" > <span name=”OWNER” value=”SAP_BW”class="mceItemParam"></span> <span name=”CMD” value=”GET_ITEM”class="mceItemParam"></span> <span name=”NAME” value=”TEXTELEMENTS_2”class="mceItemParam"></span> <span name=”ITEM_CLASS” value=”CL_RSR_WWW_ITEM_TEXT_ELEMENTS”class="mceItemParam"></span> <span name=”DATA_PROVIDER” value=”DATAPROVIDER_1”class="mceItemParam"></span> <span name=”ELEMENT_TYPE_1” value=”VARIABLE”class="mceItemParam"></span> <span name=”ELEMENT_NAME_1” value=”GBU”class="mceItemParam"></span> ITEM: TEXTELEMENTS_2 </span> - <span class="mceItemObject" > <span name=”OWNER” value=”SAP_BW”class="mceItemParam"></span> <span name=”CMD” value=”GET_ITEM”class="mceItemParam"></span> <span name=”NAME” value=”TEXTELEMENTS_3”class="mceItemParam"></span> <span name=”ITEM_CLASS” value=”CL_RSR_WWW_ITEM_TEXT_ELEMENTS”class="mceItemParam"></span> <span name=”DATA_PROVIDER” value=”DATAPROVIDER_1”class="mceItemParam"></span> <span name=”GENERATE_CAPTION” value=””class="mceItemParam"></span> <span name=”ELEMENT_TYPE_1” value=”COMMON”class="mceItemParam"></span> <span name=”ELEMENT_NAME_1” value=”SYUSER”class="mceItemParam"></span> <span name=”ONLY_VALUES” value=”X”class="mceItemParam"></span> ITEM: TEXTELEMENTS_3 </span>Figure 5 Code to enter variable for the business unit and the user IDThe new title appears in Figure 6.AC3339 is the BW user’s ID.

Note that the method I’m describing

Page 5: SAPexperts _ Automate a Personalized Title in an SAP BW Web Report

Figure 7

Do not check the Can bechanged in query navigationbox for variables in thissolution click here to view alarger version of this image

works only for variables that are notchecked as Can be changed in querynavigation in the variable propertywindow (Figure 7). This window isavailable in BEx Query Designer. Youcan change this property in theexisting variable or you can create anew variable that fulfills your needs.