{"id":32,"date":"2011-04-12T21:14:00","date_gmt":"2011-04-12T21:14:00","guid":{"rendered":"http:\/\/www.sapbpc.sapag.co.in\/?p=32"},"modified":"2011-04-12T21:14:00","modified_gmt":"2011-04-12T21:14:00","slug":"how-to-do-drill-through-bw-data-from-bpc-ms-7-and-bpc-nw-7","status":"publish","type":"post","link":"https:\/\/www.sapbpc.sapag.co.in\/?p=32","title":{"rendered":"How to do Drill-Through BW data from BPC MS 7 and BPC NW 7"},"content":{"rendered":"<p>If you know BPC and had a chance to meet some customers, you might hear about a request or question that &quot;Can we do Drill-Through BW data from BPC?&quot; <\/p>\n<p>Unfortunately, current BPC 7 NW and MS version doesn&#8217;t support. <strike>In addition, even though user uses 7.5 version, BPC 7.5 MS version will not support it.<\/strike> (BPC 7.5 NW support it and BPC 7.5 MS supports URL based drill through in SP3.) <\/p>\n<p>When I visit a customer site during last week, I heard a BIG complaint about this so I tried to develop a simple excel macro to mimic similar function as BPC 7.5 NW Drill-Through.<\/p>\n<p>Here is the features of my prototype.<\/p>\n<p>1. This is excel workbook macro so user should add this macro into each workbook that needs BW drill-through.<\/p>\n<p>2. User can maintain URL and its parameter like EVDRE<\/p>\n<p>Note : It is open source so anyone can modify and use it<\/p>\n<p>Let&#8217;s try it step by step. <\/p>\n<p>1. Create a EVDRE Report. ROW : Account, Column : Time <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"image\" src=\"https:\/\/weblogs.sdn.sap.com\/weblogs\/images\/251844296\/step1.jpg\" width=\"508\" height=\"494\" \/><\/p>\n<p>2. After you create it, Press Alt + F11 key then it will open EXCEL macro as below screen shot.<\/p>\n<p>3. Find workbook name that has EVDRE report and Double-click &#8216;This Workbook&#8217; then it will open macro edit window.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"image\" src=\"https:\/\/weblogs.sdn.sap.com\/weblogs\/images\/251844296\/step23.jpg\" width=\"622\" height=\"303\" \/><\/p>\n<p>4. Paste macro code and save it<\/p>\n<p>5. close macro edit window&#160; (Alt + F4)<\/p>\n<p>6. Make Drill Through Control panel as below screen shot. Under EVDRE control panel will be good location. Screen shot will open Yahoo website based on the selected account member.&#160; parameter name is p and we need to get account dimension member in the same row so specify column name<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"image\" src=\"https:\/\/weblogs.sdn.sap.com\/weblogs\/images\/251844296\/step6.jpg\" width=\"477\" height=\"104\" \/><\/p>\n<p>7. Save&#160; and close workbook. <\/p>\n<p>8. Open workbook again and make enable macro<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"image\" src=\"https:\/\/weblogs.sdn.sap.com\/weblogs\/images\/251844296\/step8-1.jpg\" width=\"435\" height=\"61\" \/>     <br \/><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"image\" src=\"https:\/\/weblogs.sdn.sap.com\/weblogs\/images\/251844296\/step8-2.jpg\" width=\"482\" height=\"428\" \/><\/p>\n<p>9. Select any value cell and right click then popup menu will be shown. Select NW_Drill Through menu under original Drill Through menu.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"image\" src=\"https:\/\/weblogs.sdn.sap.com\/weblogs\/images\/251844296\/step9.jpg\" width=\"654\" height=\"250\" \/><\/p>\n<p>10. It will open Yahoo web page with selected Account name query result.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"image\" src=\"https:\/\/weblogs.sdn.sap.com\/weblogs\/images\/251844296\/step10.jpg\" width=\"659\" height=\"264\" \/><\/p>\n<p>You can extend it with changing control panel as below to execute NW query. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"image\" src=\"https:\/\/weblogs.sdn.sap.com\/weblogs\/images\/251844296\/anotherexample.jpg\" width=\"484\" height=\"191\" \/><\/p>\n<p>In conclusion, this can be a workaround to achieve drill-through NW data from BPC 7 MS and NW.<\/p>\n<p>If you have any comment, please let me know.<\/p>\n<p>=========== Macro code ========================<\/p>\n<p>Cost APP_SHORTNAME = &quot;NW_DRILLTHROUGH&quot;    <br \/>Private iRow As Integer     <br \/>Private iCol As Integer<\/p>\n<p>Private Sub Workbook_Open()<\/p>\n<p>Call setmenu<\/p>\n<p>End Sub<\/p>\n<p>Private Sub Workbook_Activate()<\/p>\n<p>Call setmenu<\/p>\n<p>End Sub<\/p>\n<p>Private Sub Workbook_Deactivate()<\/p>\n<p>&#8216;when workbook is deactivated, remove menu    <br \/>On Error Resume Next     <br \/>Application.CommandBars(&quot;Cell&quot;).Controls(APP_SHORTNAME).Delete<\/p>\n<p>End Sub<\/p>\n<p>Public Sub setmenu()<\/p>\n<p>&#8216;Developed by James Lim SAP RIG America&#160; 2010. Jan. 8&#8217;    <br \/>&#8216;This macro should put it in the thisworkbook     <br \/>&#8216;When workbook is opened or activated, macro will be called and menu will set.<\/p>\n<p>Dim ctlNewMenu As CommandBarControl    <br \/>Dim ctlNewGroup As CommandBarControl     <br \/>Dim ctlNewItem As CommandBarControl     <br \/>Dim iBPCDrillThrough As Integer<\/p>\n<p>On Error GoTo Err_Trap<\/p>\n<p>On Error Resume Next<\/p>\n<p>Application.CommandBars(&quot;Cell&quot;).Controls(APP_SHORTNAME).Delete<\/p>\n<p>On Error GoTo 0<\/p>\n<p>&#8216;Get position of default Drill Through menu    <br \/>iBPCDrillThrough = Application.CommandBars(&quot;Cell&quot;).Controls(&quot;Drill Through&#8230;&quot;).Index<\/p>\n<p>&#8216;Put New Drill Through menu under it    <br \/>Set ctlNewItem = Application.CommandBars(&quot;Cell&quot;).Controls.Add(, , , Before:=iBPCDrillThrough + 1)<\/p>\n<p>&#8216;Set menu caption    <br \/>ctlNewItem.Caption = APP_SHORTNAME<\/p>\n<p>&#8216;Assign macro to open browser    <br \/>ctlNewItem.OnAction = &quot;ThisWorkbook.ProcessData&quot;<\/p>\n<p>Err_Trap:<\/p>\n<p>If Err &lt;&gt; 0 Then<\/p>\n<p>Err.Clear<\/p>\n<p>Resume Next<\/p>\n<p>End If<\/p>\n<p>End Sub<\/p>\n<p>Public Sub ProcessData()    <br \/>&#8216;get URL information from Control panel<\/p>\n<p>Dim lcol As Long    <br \/>Dim lrow As Long     <br \/>Dim sParamName As String     <br \/>Dim sParamValue As String     <br \/>Dim sURL As String     <br \/>Dim sURLHeader As String     <br \/>Dim sURLTail As String<\/p>\n<p>lrow = pFindPosRow(&quot;URLHeader&quot;)    <br \/>If lrow = 0 Then Exit Sub     <br \/>lcol = pFindPosCol(&quot;URLHeader&quot;)<\/p>\n<p>sURLHeader = Range(numToAddress(lcol + 1) &amp; CStr(lrow)).Value    <br \/>sURLTail = Range(numToAddress(lcol + 1) &amp; CStr(lrow + 1)).Value<\/p>\n<p>sURL = sURLHeader<\/p>\n<p>i = lrow + 2<\/p>\n<p>Do While Trim(Range(numToAddress(lcol) &amp; CStr(i)).Value) &lt;&gt; &quot;&quot;<\/p>\n<p>&#160;&#160;&#160; sParamName = Range(numToAddress(lcol) &amp; CStr(i)).Value    <br \/>&#160;&#160;&#160; sParamValue = Range(numToAddress(lcol + 1) &amp; CStr(i)).Value<\/p>\n<p>&#160;&#160;&#160; If IsNumeric(sParamValue) Then    <br \/>&#160;&#160;&#160;&#160;&#160;&#160; sParamValue = Range(numToAddress(Application.ActiveCell.Column) &amp; sParamValue).Value     <br \/>&#160;&#160;&#160; Else     <br \/>&#160;&#160;&#160;&#160;&#160;&#160; sParamValue = Range(sParamValue &amp; Application.ActiveCell.Row).Value     <br \/>&#160;&#160;&#160; End If<\/p>\n<p>&#160;&#160;&#160; sURL = sURL &amp; sParamName &amp; &quot;=&quot; &amp; sParamValue &amp; &quot;&amp;&quot;    <br \/>&#160;&#160;&#160; i = i + 1     <br \/>Loop<\/p>\n<p>sURL = Mid(sURL, 1, Len(sURL) &#8211; 1)    <br \/>sURL = sURL &amp; sURLTail<\/p>\n<p>&#8216;open browser    <br \/>ActiveWorkbook.FollowHyperlink Address:=sURL<\/p>\n<p>End Sub<\/p>\n<p>Private Function pFindPosRow(sText As Variant, _    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Optional SearchDirection As XlSearchDirection = xlNext, _     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Optional SearchOrder As XlSearchOrder = xlByRows) As Long<\/p>\n<p>Dim sResult As String, oRg As Range    <br \/>Set oRg = Cells.Find(What:=sText, LookIn:=xlValues, _     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; LookAt:=xlPart, SearchOrder:=SearchOrder, _     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SearchDirection:=SearchDirection, _     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; MatchCase:=False, SearchFormat:=False)<\/p>\n<p>If Not oRg Is Nothing Then    <br \/>&#160; sResult = oRg.Row     <br \/>Else     <br \/>&#160; MsgBox &quot;Can&#8217;t find &quot; &amp; sText, vbCritical + vbOKOnly, &quot;Error&quot;     <br \/>&#160; GoTo Exit_sub     <br \/>End If<\/p>\n<p>pFindPosRow = sResult<\/p>\n<p>Exit_sub:    <br \/>Set oRg = Nothing<\/p>\n<p>End Function<\/p>\n<p>Private Function pFindPosCol(sText As Variant, _    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Optional SearchDirection As XlSearchDirection = xlNext, _     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Optional SearchOrder As XlSearchOrder = xlByColumns) As Long<\/p>\n<p>Dim sResult As Long, oRg As Range    <br \/>Set oRg = Cells.Find(What:=sText, LookIn:=xlValues, _     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; LookAt:=xlPart, SearchOrder:=SearchOrder, _     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SearchDirection:=SearchDirection, _     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; MatchCase:=False, SearchFormat:=False)<\/p>\n<p>If Not oRg Is Nothing Then sResult = oRg.Column<\/p>\n<p>pFindPosCol = sResult    <br \/>Set oRg = Nothing<\/p>\n<p>End Function<\/p>\n<p>Function numToAddress(lAddress As Long) As String    <br \/>&#160;&#160; Dim iCol As Long     <br \/>&#160;&#160;&#160; Dim sColAddress As String     <br \/>&#160;&#160;&#160; iCol = lAddress     <br \/>&#160;&#160;&#160; While (iCol &gt; 0)     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; iCol = iCol &#8211; 1     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; sColAddress = Chr(Asc(&quot;A&quot;) + (iCol Mod 26)) + sColAddress     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; iCol = iCol \\ 26     <br \/>&#160;&#160;&#160; Wend<\/p>\n<p>&#160;&#160;&#160; numToAddress = sColAddress    <br \/>End Function<\/p>\n<p><a href=\"http:\/\/sapbpctutorials.blogspot.com\/\" target=\"_blank\">SAP BPC Tutorials | SAP BPC Training | SAP BPC Interview Questions |SAP BPC Books<\/a>    <\/p>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:89765909-99f0-4cb8-a35d-1e53601ef5a4\" class=\"wlWriterEditableSmartContent\">Technorati Tags: <a href=\"http:\/\/technorati.com\/tags\/sap+bps+tutorials\" rel=\"tag\">sap bps tutorials<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bcs+tutorials\" rel=\"tag\">sap bcs tutorials<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+tutorials\" rel=\"tag\">sap bpc tutorials<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bps+help\" rel=\"tag\">sap bps help<\/a>,<a href=\"http:\/\/technorati.com\/tags\/abap+bps+tutorials\" rel=\"tag\">abap bps tutorials<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+examples\" rel=\"tag\">sap bpc examples<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+examples+sap+bpc+definition\" rel=\"tag\">sap bpc examples sap bpc definition<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bps+examples\" rel=\"tag\">sap bps examples<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+list\" rel=\"tag\">sap bpc list<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+types\" rel=\"tag\">sap bpc types<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+applications\" rel=\"tag\">sap bpc applications<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+cpm+examples\" rel=\"tag\">sap cpm examples<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+help\" rel=\"tag\">sap bpc help<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+download+sap+bpc+material\" rel=\"tag\">sap bpc download sap bpc material<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+guide\" rel=\"tag\">sap bpc guide<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+cheats\" rel=\"tag\">sap bpc cheats<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+problems\" rel=\"tag\">sap bpc problems<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+tips\" rel=\"tag\">sap bpc tips<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+business+planning+and+consolidation+help\" rel=\"tag\">sap business planning and consolidation help<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+training+sap+bpc+training\" rel=\"tag\">sap bpc training sap bpc training<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+training+material\" rel=\"tag\">sap bpc training material<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+overview\" rel=\"tag\">sap bpc overview<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+training+courses\" rel=\"tag\">sap bpc training courses<\/a>,<a href=\"http:\/\/technorati.com\/tags\/business+objects+bpc\" rel=\"tag\">business objects bpc<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+7.0\" rel=\"tag\">sap bpc 7.0<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+certification\" rel=\"tag\">sap bpc certification<\/a>,<a href=\"http:\/\/technorati.com\/tags\/sap+bpc+documentation+sap+bpc+training+in+india\" rel=\"tag\">sap bpc documentation sap bpc training in india<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you know BPC and had a chance to meet some customers, you might hear about a request or question that &quot;Can we do Drill-Through BW data from BPC?&quot; Unfortunately, current BPC 7 NW and MS version doesn&#8217;t support. In &hellip; <a href=\"https:\/\/www.sapbpc.sapag.co.in\/?p=32\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-sap-bpc-tutorials"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.sapbpc.sapag.co.in\/index.php?rest_route=\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sapbpc.sapag.co.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sapbpc.sapag.co.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sapbpc.sapag.co.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sapbpc.sapag.co.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32"}],"version-history":[{"count":0,"href":"https:\/\/www.sapbpc.sapag.co.in\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sapbpc.sapag.co.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sapbpc.sapag.co.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sapbpc.sapag.co.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}