SmartView 11.1.2.2 VBA Macro Performance

Hi Good Day,
We have created a Macro in Excel that use VBA functions to connect, retrieve data, send data and run business rules.
The macro works fine (it takes around 5 minutes to execute), however we have detected that the retrieves using the command "hypretrieve" takes around 1 minute to be executed, but if I manually connect and execute the retrieve in the same sheet definition it is done in 20 seconds. So my guess is that the macro it’s making the retrieve to increment the time in 300%
Does somebody have some tips to reduce this time? Or tune the macro?
Kind Regards
P.d. We are not expert in excel macros, either vba.
Edited by: Pavel Moreno on Mar 12, 2013 5:34 AM

11.1.2.2.300 the latest release of Smart View does support Office 64 bit. You can download the latest version here http://www.oracle.com/technetwork/middleware/smart-view-for-office/downloads/index.html or on My Oracle Support.
Remember SV is backwards compatible so the client version does not need to match the server version.

Similar Messages

  • Essbase Smartview VBA macros error

    I have a Essbase Smartview VBA macros issue as below:
    I want get a value that I choose in POV dynamic dropdown list.
    And show the value in the excel.
    For example:
    There customer dimention -childs are IBM、ACR show in POV dynamic dropdown list.
    I choose IBM in POV then in excel sheet A1 show IBM.
    I try the below vba code:
    Private Sub CommandButton2_Click()
    Dim vtGrid As Variant
    Dim vtDimNames As Variant
    Dim vtPOVNames As Variant
    X = HypRetrieve("Sheet1")
    If X = 0 Then
    MsgBox ("Retrieve successful.")
    Else
    MsgBox ("Retrieve failed.")
    End If
    Range("F1").Select
    Sts = HypGetSourceGrid("Sheet1", vtGrid)
    Y = HypGetPOVItems(vtDimNames, vtPOVNames)
    Range("h1").Value = Y
    End Sub
    '==========================================
    But Y result is -3.
    How did I get the value in dynamic dropdown list.
    Thanks~

    Few comments:
    1. Range("F1").Select: Is F1 inside the grid you are rerieving? If you do a fresh retrieve Range("B2").Select is a better location and you will not get -3.
    2. Range("h1").Value = Y. You are setting the error message and not the POV member name. vtPOVNames is an array of POV members and you should use Range("h1").Value =vtPOVNames(1) to get the member name. (1) being the first dimension in the POV.
    3. Word of caution. You will not be able to put a valid member name in the grid if it already exists in the POV. I recommend you preface the member name by any string that will make it unique. For instance, you could use
    Range("h1").Value = vtDimNames(1) & ": " &vtPOVNames(1)
    This way you will see the DimensionName: Member Name.
    Here is the modified code:
    Sub test()
    Dim vtGrid As Variant
    Dim vtDimNames As Variant
    Dim vtPOVNames As Variant
    X = HypRetrieve("Sheet1")
    If X = 0 Then
    MsgBox ("Retrieve successful.")
    Else
    MsgBox ("Retrieve failed.")
    End If
    Range("b2").Select
    sts = HypGetSourceGrid("Sheet1", vtGrid)
    Y = HypGetPOVItems(vtDimNames, vtPOVNames)
    Range("h1").Value = vtDimNames(1) & ": " & vtPOVNames(1)
    End Sub
    Edited by: Toufic Wakim on May 3, 2010 11:54 AM

  • How Can I Schedule a Deski Report in Infoview that has a VBA Macro

    Hi experts,
    i've made a report that has a vba Macro. I published it in infoview. If I launch it manually (clicking on the refresh button) the macro works normaly. If I schedule it the macro doesn't work.
    What can I do?
    Is it possible to make a program that simulate the opening and click on the refresh button?
    Or i there is another solution?
    Here is my Macro:
    Private Sub Document_AfterRefresh()
    Dim filtervar As Variant
    Dim filterText, Filter As Long
    Dim DocName, NewName As String
    Dim Pathing, TodaysDate As String
    Dim folderName As String
    TodaysDate = Format(Date, "DDMMYYYY")
    Pathing = "
    Ktsdwh0\c$\OutputBO\"
    DocName = ThisDocument.Name
    filterText = "Dpre Cod Produttore"
    filtervar = ThisDocument.Evaluate("=<" & filterText & ">", boUniqueValues)
    For Each sepval In filtervar
        Filter = sepval
        For n = 1 To ThisDocument.Reports.Count
            Call ThisDocument.Reports(n).AddComplexFilter(filterText, "=<" & filterText & "> = " & Filter)
            ThisDocument.Reports(n).ForceCompute
        Next n
            MkDir (Pathing & Filter & "\")
            NewName = Pathing & Filter & "\" & Filter & "-" & TodaysDate & "-" & DocName   'for Prova_Prod.rep
    '        NewName = Pathing & Filter & "-" & TodaysDate & "-" & DocName   'for Prova_Prod.rep
            ThisDocument.ExportAsPDF (NewName)           'to Save as PDF
    Next
        For n = 1 To ThisDocument.Reports.Count
          Call ActiveReport.AddComplexFilter(filterText, "=<" & filterText & "> = <" & filterText & ">")
            ' To delete a Complex Filter, you set it equal to itself...
          ActiveReport.ForceCompute
        Next n
    End Sub
    Please Help!
    Best regards
    Camillo

    Hi Philippe,
    If you are using Windows 2003 with SP2 then it might be the issue as already logged for BOXIR2.
    You can test the issue by using only Windows 2003 without SP2.
    In case your operating system is only windows 2003 then following information and code might be helpful for you to resolve the issue.
    There are a number of things to check when setting up a macro to work through Infoview or scheduled. The first thing is that the macro needs to be triggered to run. This is done by putting a call to the macro in the Document_BeforeRefresh or the Document_AfterRefresh event handler.
    The report server and job server are designed to process one report at a time. Through a macro it is possible to open more than one report, and do various processing with those additional reports. Since the report and job servers are not designed to process more than one report, your macro should not open an additional report.
    The fact that only one report is processed at a time also affects the syntax you should use when referring to a document or report object. In the DeskI client you can use the ThisDocument object to refer to the report which is running the macro. You can also use the ActiveDocument object to refer to the report that is currently displayed. Most of the time these two objects will point to the same report. When the report server or job server process a report there would never be the possibility for a different report to be active, so the ActiveDocument object does not exist. This also applies to the ActiveReport object. Instead of using ActiveDocument your macro code should use the ThisDocument object. Instead of using the ActiveReport object you should use ThisDocument.Reports.Item(1) to refer to this first report tab in a report.
    These items are the most common issues that will cause a macro not to run through Infoview or when scheduled. The best way to debug a macro which is not working in either of those places is to include code which will log the macro's progress to a file. This makes it easy to determine exactly which line of code is causing issues so that it can potentially be corrected.
    #Region u201CWeb Form Designer Generated Code "
    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    End Sub
    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
    InitializeComponent()
    End Sub
    #End Region
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim myInfoStore As InfoStore
    Dim myEnterpriseSession As EnterpriseSession
    myInfoStore = CType(Session("InfoStore"), InfoStore)
    myEnterpriseSession = CType(Session("EnterpriseSession"), EnterpriseSession)
    Dim DOCUMENT_NAME As String = "document_name"
    Dim query As String = "Select SI_ID, SI_NAME, SI_SUBJECT, " _
    & "SI_COMMENTS, SI_OWNER From CI_INFOOBJECTS Where SI_KIND = 'FullClient' " _
    & "AND SI_INSTANCE=0 AND SI_NAME='" + DOCUMENT_NAME + "'"
    Dim myInfoObjects As InfoObjects = myInfoStore.Query(query)
    Dim myInfoObject As InfoObject = myInfoObjects(1)
    Dim myDeskiDoc As FullClient = CType(myInfoObject, FullClient)
    Dim mySchedulingInfo As SchedulingInfo = myDeskiDoc.SchedulingInfo
    mySchedulingInfo.Type = CeScheduleType.ceScheduleTypeOnce
    mySchedulingInfo.RightNow = True
    Dim myFullClientFormatOptions As FullClientFormatOptions = myDeskiDoc.FullClientFormatOptions
    myFullClientFormatOptions.Format = BusinessObjects.Enterprise.Desktop.CeFullClientFormat.ceFullClientFormatFullClient
    myInfoStore.Schedule(myInfoObjects)
    End Sub
    End Class
    I hope this will help you.
    Regards,
    Sarbhjeet Kaur

  • Using ms project 2007 and vba macro to list all the custom fields used in the project?

    Hi,Using ms project 2007 vba macro, I would like to be able to list all the custom fields used in the project and their corresponding field names. e.g. let us say I create a calculated duration field and name it "expected duration" and the name
    of the field I select is Duration1.
    I am trying to write a macro that will list all the used custom fields such as the result would look like:
    Duration1 ---> "expected duration"
    Text1       ---> "anything"
    Flag1        ---> "....."
    Number1  ---> "..............."
    Can anyone provide me with the solution?
    Regards,
    Chuck

    John,
    I found this module, which provides the the list of custom fields used in the project but does not provide the name given to the field. Here below is the module and hope you could help me achieve this by modifying the macro to list the renamed field.
    ' MSP Checks all Custom Task Fields
    Sub checkfields2()
    'This macro will check and report out which custom task fields are used
    'It requires Project 2002 and above as it relies on the GetField
    'and FieldNameToFieldConstant methods which were not introduced until
    '2002.
    'It does not include resource fields, however it is a simple matter to
    'do it by replacing the pjTask constant with pjResource.
    'Copyright Jack Dahlgren, Oct. 2004
    Dim mycheck As Boolean
    Dim myType, usedfields As String
    Dim t As Task
    Dim ts As Tasks
    Dim i, it As Integer
    Set ts = ActiveProject.Tasks
    usedfields = "Custom Fields used in this file" & vbCrLf
    myType = "Text"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 30
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> "" Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Number"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 20
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> 0 Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Duration"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 10
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If Left(ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)), 2) <> "0 " Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Cost"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 10
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> 0 Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Start"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 10
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> "NA" Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Finish"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 10
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> "NA" Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    MsgBox usedfields
    End Sub
    This is what the module gives me. But I would like to have beside Text 1 the name that is shown as below. e.g Text1 is "Test".
    Would you mind helping me achieve this?
    Thanks in advance.
    Chuck

  • Business Objects Financial Consolidation - Excel Link and VBA Macros

    Hi
    We use the excel links of Business Objects Financial Consolidation V10.5 to import and export data to/from BOF and excel
    We used VBA macros for the imports but do not know what VBA code is required to export - this code would include the package identifier that has to be selected in the window "Select item Package "
    Can anyone help?

    Hello Chrisitne,
    I am as well intersted by the same funtiont, did you find any answer?
    Can I also ask you the VBA code for Import and Export if you have it?
    Thank for your help!

  • Need Help Converting a VBA Macro to AppleScript 2.1.2 for Outlook 2011

    Hello AppleScript Experts:
    Can somebody help me convert the below VBA Macro to an equivalent AppleScript 2.1.2 for Mac Outlook 2011 (Version 14.1.3)
    I have a VBA macro program that pops message box when somebody sends an email to an external email address outside of the business domain name. I have deployed the below on WINDOWS 7 MS OFFICE OUTLOOK 2007/2010 and it's
    working successfully.
    I have few users using MAC Outlook 2011 v.14.0.1 & 14.1.3. I need to deploy the same application for MAC users.
    Here is the program...
    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim objRecipient As Outlook.Recipient
    Dim strExternalEmailAddress As String
    Dim strInternalEmailAddress As String
    Dim oRecip As Outlook.Recipient
    Dim oEU As Outlook.ExchangeUser
    Dim oEDL As Outlook.ExchangeDistributionList
    Set objRecipients = Item.Recipients
    strTemp = ""
    For Each objRecipient In objRecipients
        Set oRecip = Application.Session.CreateRecipient(objRecipient.Address)  
        If InStr(1, oRecip, "@") > 0 And InStr(1, oRecip, "company.org") = 0 Then
            strExternalEmailAddress = strExternalEmailAddress & objRecipient.AddressEntry & " - " & objRecipient.Address & "; "
            strExternalEmailAddress = strExternalEmailAddress & vbCrLf
        Else
            oRecip.Resolve
            If oRecip.Resolved Then
                Select Case oRecip.AddressEntry.AddressEntryUserType
                    Case OlAddressEntryUserType.olExchangeUserAddressEntry
                        Set oEU = oRecip.AddressEntry.GetExchangeUser
                        If Not (oEU Is Nothing) Then
                        End If
                    Case OlAddressEntryUserType.olExchangeDistributionListAddressEntry
                        Set oEDL = oRecip.AddressEntry.GetExchangeDistributionList
                        If Not (oEDL Is Nothing) Then
                        End If
                    Case Else
                        If (objRecipient.Type = 1) And InStr(1, oRecip, "company.org") = 0 Then
                            strExternalEmailAddress = strExternalEmailAddress & objRecipient.AddressEntry & " - " & oRecip & "; "
                            strExternalEmailAddress = strExternalEmailAddress & vbCrLf
                        ElseIf (objRecipient.Type = 1) And InStr(1, oRecip, "company.org") <> 0 Then
                            strInternalEmailAddress = strInternalEmailAddress & objRecipient.AddressEntry & " - " & oRecip & "; "
                            strInternalEmailAddress = strInternalEmailAddress & vbCrLf
                        ElseIf (objRecipient.Type = 2) And InStr(1, oRecip, "company.org") = 0 Then
                            strExternalEmailAddress = strExternalEmailAddress & objRecipient.AddressEntry & " - " & oRecip & "; "
                            strExternalEmailAddress = strExternalEmailAddress & vbCrLf
                        ElseIf (objRecipient.Type = 2) And InStr(1, oRecip, "company.org") <> 0 Then
                            strInternalEmailAddress = strInternalEmailAddress & objRecipient.AddressEntry & " - " & oRecip & "; "
                            strInternalEmailAddress = strInternalEmailAddress & vbCrLf
                        End If
                End Select
            Else
                If InStr(1, oRecip, "@") > 0 And InStr(1, oRecip, "company.org") = 0 Then
                    strExternalEmailAddress = strExternalEmailAddress & objRecipient.AddressEntry & " - " & objRecipient.Address & "; "
                    strExternalEmailAddress = strExternalEmailAddress & vbCrLf
                ElseIf InStr(1, oRecip, "@") > 0 And InStr(1, oRecip, "company.org") <> 0 Then
                    strInternalEmailAddress = strInternalEmailAddress & objRecipient.AddressEntry & " - " & objRecipient.Address & "; "
                    strInternalEmailAddress = strInternalEmailAddress & vbCrLf
                End If
            End If
        End If
    Next
    If Len(strExternalEmailAddress) > 0 Then
        If MsgBox("You are about to send this email message to one or more individuals outside of COMPANY.  Before you send the message," & _
        " please review the list below and confirm that you have addressed the message to the intended recipients." & vbCrLf & strExternalEmailAddress & vbCrLf & _     "Please click 'Yes' to send the message or 'No' to make changes to the recipients.", vbYesNo + vbDefaultButton2) = vbNo Then
            Cancel = True
        End If
    End If
    End Sub

    Hello AppleScript Experts:
    Can somebody help me convert the below VBA Macro to an equivalent AppleScript 2.1.2 for Mac Outlook 2011 (Version 14.1.3)
    I have a VBA macro program that pops message box when somebody sends an email to an external email address outside of the business domain name. I have deployed the below on WINDOWS 7 MS OFFICE OUTLOOK 2007/2010 and it's
    working successfully.
    I have few users using MAC Outlook 2011 v.14.0.1 & 14.1.3. I need to deploy the same application for MAC users.
    Here is the program...
    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim objRecipient As Outlook.Recipient
    Dim strExternalEmailAddress As String
    Dim strInternalEmailAddress As String
    Dim oRecip As Outlook.Recipient
    Dim oEU As Outlook.ExchangeUser
    Dim oEDL As Outlook.ExchangeDistributionList
    Set objRecipients = Item.Recipients
    strTemp = ""
    For Each objRecipient In objRecipients
        Set oRecip = Application.Session.CreateRecipient(objRecipient.Address)  
        If InStr(1, oRecip, "@") > 0 And InStr(1, oRecip, "company.org") = 0 Then
            strExternalEmailAddress = strExternalEmailAddress & objRecipient.AddressEntry & " - " & objRecipient.Address & "; "
            strExternalEmailAddress = strExternalEmailAddress & vbCrLf
        Else
            oRecip.Resolve
            If oRecip.Resolved Then
                Select Case oRecip.AddressEntry.AddressEntryUserType
                    Case OlAddressEntryUserType.olExchangeUserAddressEntry
                        Set oEU = oRecip.AddressEntry.GetExchangeUser
                        If Not (oEU Is Nothing) Then
                        End If
                    Case OlAddressEntryUserType.olExchangeDistributionListAddressEntry
                        Set oEDL = oRecip.AddressEntry.GetExchangeDistributionList
                        If Not (oEDL Is Nothing) Then
                        End If
                    Case Else
                        If (objRecipient.Type = 1) And InStr(1, oRecip, "company.org") = 0 Then
                            strExternalEmailAddress = strExternalEmailAddress & objRecipient.AddressEntry & " - " & oRecip & "; "
                            strExternalEmailAddress = strExternalEmailAddress & vbCrLf
                        ElseIf (objRecipient.Type = 1) And InStr(1, oRecip, "company.org") <> 0 Then
                            strInternalEmailAddress = strInternalEmailAddress & objRecipient.AddressEntry & " - " & oRecip & "; "
                            strInternalEmailAddress = strInternalEmailAddress & vbCrLf
                        ElseIf (objRecipient.Type = 2) And InStr(1, oRecip, "company.org") = 0 Then
                            strExternalEmailAddress = strExternalEmailAddress & objRecipient.AddressEntry & " - " & oRecip & "; "
                            strExternalEmailAddress = strExternalEmailAddress & vbCrLf
                        ElseIf (objRecipient.Type = 2) And InStr(1, oRecip, "company.org") <> 0 Then
                            strInternalEmailAddress = strInternalEmailAddress & objRecipient.AddressEntry & " - " & oRecip & "; "
                            strInternalEmailAddress = strInternalEmailAddress & vbCrLf
                        End If
                End Select
            Else
                If InStr(1, oRecip, "@") > 0 And InStr(1, oRecip, "company.org") = 0 Then
                    strExternalEmailAddress = strExternalEmailAddress & objRecipient.AddressEntry & " - " & objRecipient.Address & "; "
                    strExternalEmailAddress = strExternalEmailAddress & vbCrLf
                ElseIf InStr(1, oRecip, "@") > 0 And InStr(1, oRecip, "company.org") <> 0 Then
                    strInternalEmailAddress = strInternalEmailAddress & objRecipient.AddressEntry & " - " & objRecipient.Address & "; "
                    strInternalEmailAddress = strInternalEmailAddress & vbCrLf
                End If
            End If
        End If
    Next
    If Len(strExternalEmailAddress) > 0 Then
        If MsgBox("You are about to send this email message to one or more individuals outside of COMPANY.  Before you send the message," & _
        " please review the list below and confirm that you have addressed the message to the intended recipients." & vbCrLf & strExternalEmailAddress & vbCrLf & _     "Please click 'Yes' to send the message or 'No' to make changes to the recipients.", vbYesNo + vbDefaultButton2) = vbNo Then
            Cancel = True
        End If
    End If
    End Sub

  • Schedule a VBA macro based DeskI Report.

    Hi,
    We have a requirement to schedule a VBA macro based report via CMC and Infoview and I would like to acheive the below. Please help.
    1) To save the report output as CSV file after refresh in Xi R2 and I have the following code, which runs fine if I run manually, but if I schedule it in Xi R2, it does not run.Please help.
    Private Sub Document_AfterRefresh()
    Dim boDP As busobj.DataProvider
    Set boDP = ThisDocument.DataProviders.Item(1)
    OUTPUT_FILE_CSV = TARGET_FILE_DIR & OUTPUT_FILE_NAME & Format(Now, "YYYYMMDD") & "_" & Format(Now, "hhnnss") & ".csv"
    Call boDP.ConvertTo(5, 1, OUTPUT_FILE_CSV)
    End Sub
    The OUTPUT_FILE_CSV & TARGET_FILE_DIR are declared as global varilable. Please help.
    2) A prompt to be filled and the following syntax works fine when I run the macro manually. But does not work when I schedule in CMC (Variable prevented report to refersh error)..
    Private Sub Document_BeforeRefresh(Cancel As Boolean)
    newfromdate = DateAdd("M", -4, DateValue(Now))
    Application.Variables.Item("BOL Date").InterpretAs = boStringVariable
    Application.Variables.Item("BOL Date").Value = newfromdate
    End Sub
    Please advice.
    Thank You.

    Hi Sundaresan,
    Following are the important points related to scheduling deski report containing VBA macro:
    1. BusinessObjects XI Release 2 supports macros in
        Desktop Intelligence in InfoView, both when viewing or
        scheduling the document, but with caveats.
    2. There are slight differences in the execution flow when
        viewing a Deski in InfoView as opposed to viewing on
        the Desktop Intelligence client.
    3. A restriction on scheduling documents is that the
        scheduler can only open one document at a time u2013 so
        if you have macros that try and access another Deski
       document, it will fail.
    4. Whether a macro executes successfully or not would
        depend on the functionality used in the macro.
    May i know which service pack you are using,as this is known issue and it works fine with BOXI R2 SP2 and higher versions.
    I hope this helps you.
    Regards,
    Snehal

  • Run Data Package from custom Menu00F9/VBA macro

    HI guys,
    I have a problem:when creating VBA macro to run Data Package.
    I get the pop-up error "400" . This is the VBA code I'm using:
    Application.Run "MNU_eDATA_RUNPACKAGE(""Opening""; ""/CPMB/Opening_Balances""; ""Company""; ""Financial Processes"")"
    Have you any suggestion for me?
    Thanks
    Marco Uccello

    Hi Marco,
    I'm guessing by prompts you mean user inputs for Entity, Category, Time etc.
    These are controlled by the dynamic script associated with the data package.
    If you go to the menu eData -> Organise Packages then select a package and go through :
    Modify Package -> View Package -> Advanced
    You should get to the Data Manager Dynamic Script window.
    The following is an example of what should be in here. This is taken directly from the SAP How to Guide "How To Pass Dynamic Parameters to script logic.pdf"
    It's the "PROMPT" parts at the start that control the prompts shown to the user (and passed to the data package) :
    PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")
    PROMPT(TEXT,%WS_PERCT%,"Input W/S Percent in decimals",)
    PROMPT(TEXT,%EXP_PERCT%,"Input Exp. Percent in decimals",)
    INFO(%EQU%,=)
    INFO(%TAB%,;)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,TAB,%TAB%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,EQU,%EQU%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SUSER,%USER%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SAPPSET,%APPSET%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SAPP,%APP%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SELECTION,%SELECTION%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,LOGICFILENAME, INCREASEPERCENTAGE.LGF)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,REPLACEPARAM,WS_PERCT%EQU%%WS_PERCT%%TAB%EXP_PERCT%EQU%%EXP
    _PERCT%)
    If you paste that in exactly it will resolve into the right package information which can be seen one step back (via Modify Package -> View Package).
    You can modify the prompts as appropriate for the script you are running - the one above from the how to guide has two inputs for percentages which are used within the associated script logic calculation.
    Hope this helps.
    Thanks.
    Bradley Newcombe.

  • Copying Graphs and Pie Charts generated in Analysis View to Email item using Excel VBA Macro Code

    Hi
    I am currently working on an exce VBA macro code that would help me take snapshots of the Graphs and Pie charts generated in QC for a particular application and copy the same to an email item using excel VBA macro code.
    I was able to write the code to create an email item. But I have no clue of how i can take snapshot of the graphs in Analysis View using excel VBA
    Any help would be highly appreciated.
    Thanks in Advance
    Regards
    Amit

    useramit,
    You are in the consumer end products forum.  You will also want to ask your question over at the Enterprise Business Community.
    Click the plus sign (+) next to Discussion Boards to drop down all the options for servers, networking and any other professionally related problems.
    http://h30499.www3.hp.com/

  • VBA macros

    Hi Everyone!
    We are using RoboHelp 7 (WebHelp) and MS Word 2007 on 3
    machines. When selecting Printed Documentation and then selecting a
    MS Word Template in the Printed Documentation Dialogue box, two of
    the machines are able to print the documentation but an error
    appears on the third machine. The error reads:
    Waiting for VBA macros to be registered.
    The applications were all installed in the correct order
    according to the steps followed in another section on this site.
    Anyone have any idea why this machine is receiving the error and
    the other two are not/
    Thanks.
    Bill

    My guess is you need to change their macro security levels in
    Word.

  • I am mac user and want to create Object in VBA macro. when i write "set objwrd=createObject("Word.Application")"- it returns "runtime error "492" can't create object". now what it alternative to create object for word in excel macro???

    I am mac user and want to create Object in VBA macro. when i write "set objwrd=createObject("Word.Application")"… it returns "runtime error "492" can't create object". now what it alternative to create object for word in excel macro???

    Any help here...
    http://support.microsoft.com/kb/288117
    http://www.macworld.com/article/1154785/welcomebackvisualbasic.html

  • Blocked Error Messages and VBA Macros

    I have a client who is in the process of migrating their Essbase 6 VBA macros to 7. Will the error messages regarding the different APIs impede upon the macros running correctly and fully?<BR><BR>I don't think this would be the case but wanted to double-check...

    Hello.
    I have created an dynamic Excel VBA template which include as well this log-function.
    Public Function Create_Log(lngRow As Long, lngCol As Long, strLog As String)
        Dim lngCounter As Long
        Dim lngLast_Col As Long
        Dim strLog_Line As String
        lngCounter = lngRow
        lngLast_Col = lngCol
        strLog_Line = strLog
        If ThisWorkbook.Sheets("SAP_PROCESS").Cells(lngCounter, lngLast_Col).Value = "" Then
            ThisWorkbook.Sheets("SAP_PROCESS").Cells(lngCounter, lngLast_Col).Value = strLog_Line
        Else
            ThisWorkbook.Sheets("SAP_PROCESS").Cells(lngCounter, lngLast_Col).Value = ThisWorkbook.Sheets("SAP_PROCESS").Cells(lngCounter, lngLast_Col).Text & Chr(10) & strLog_Line
        End If
    End Function
    In my process code I use this function like this:
    'Log
    If Session.FindById("wnd[0]/sbar").Text <> "" Then Create_Log lngCounter, lngLast_Col, Session.FindById("wnd[0]/sbar").Text
    We can check as well if we receive an error (sy-msgty = 'E')
    If Session.FindById("wnd[0]/sbar").messagetype = "E" Then Create_Log lngCounter, lngLast_Col, Session.FindById("wnd[0]/sbar").Text
    Hope this give you an idea how to handle this.
    Best regards,
    Holger

  • Running multiple refreshes using a VBA macro

    My company has just moved from BO 5.1.5 to BO XI 3.0 and I'm having some probelms running a VBA macro which extracts a large ammount of sales data to a text file. The macro uses an array and a For Each Next loop to enter variable details before the Refresh and then it downloads the text data, looping back to enter different Major Product values before the next refresh.
    Here is the code I'm using in BO 5.1.5 and would like to rewrite as event based code ie BeforeRefresh/AfterRefresh.
    Sub Main_Report()
        Dim Docs As Documents
        Dim Doc As Document
        Dim Rep As Report
        Dim Reps As Reports
        Dim DocNum As Integer
        Dim RepNum As Integer
        Dim Location As String
        Dim VarName As Variable
        Dim DataPro As DataProvider
        Dim FileName
        Dim Majors
        Dim MajorList
        Dim Period
        Dim Counter
        MajorList = Array("001", "002", "003")
        Period = Format(DateAdd("m", -1, Now), "YYYYMM")
        Counter = 0
    '   Enter user prompt values into query for current period and YTD
        For Each Majors In MajorList
        Counter = Counter + 1
            For i = 1 To ActiveDocument.Variables.Count
                Set VarName = ActiveDocument.Variables(i)
                If VarName.IsUserPrompt Then
                    Select Case VarName.Name
                        Case "Major Group"
                            ActiveDocument.Variables(i).Value = Majors
                        Case "Period"
                            ActiveDocument.Variables(i).Value = Period
                    End Select
                 End If
            Next i
        '   Refresh the current report and save data
            Application.Interactive = False
            ActiveDocument.Refresh
            Location = "
    seausdcff015\saracm$\My Documents\Tables\Sales\"
            Set Docs = Application.Documents
            Set Reps = ActiveDocument.Reports
        '   Export each report as "TXT" files from current document
            Set Doc = Docs.Item(1)
            FileName = Location & Doc.Name & "_" & Counter & ".txt"
            Set DataPro = ActiveDocument.DataProviders.Item(1)
            Call DataPro.ConvertTo(boExpAsciiTab, 1, FileName)
            Application.Interactive = True
        Next
    End Sub
    Can you please help. Cheers Milos.

    A coworker found this thread on asktom:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:861518416236107::::P11_QUESTION_ID:10498431232211
    It sort of details a similar (if not the same) method to that above.

  • VBA macro for hiding a row

    Hi everyone,
    I have a question regarding VBA macros in BEx analyzer. I have few rows in which all values are zeros. I would like to hide such rows. I am trying to write a VBA macro to implement it. Could someone help me with this.
    Thanks
    R

    Hi Ram,
    I agree with Roberto that there is probably a way to do this entirely within BEx.  I would try a Condition.
    But ... here is what you've asked for.  Note that it is written assuming that there is more than one query in the workbook and that local Query ID for this query is SAPBEXq0001.  You might need to adjust these.
    This code would replace (or augment) what is currently in the Module named SAPBEX.
    Regards, Pete
    Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    'code to hide any row where all Key Figures are zero
    Dim n As Integer, qRow As Integer, RowOffset As Integer
    Dim ColOffset As Integer, FirstRow As Integer, FirstCol As Integer
    Dim numCells As Integer, LastRow As Integer, LastCol As Integer
    Dim i As Integer, KFRange As Range, HideThisRow As Boolean
    Dim c As Range
        If queryID = "SAPBEXq0001" Then
            'locate this query's location in DIM table
            Set bexWS = Sheets("SAPBEXqueries")
            numQueries = bexWS.Range("A2")
            For n = 1 To numQueries
                If bexWS.Range("F" & n + 3) = queryID Then
                    qRow = n + 3
                    Exit For
                End If
            Next n
            'determine Key Figures offset
            RowOffset = bexWS.Range("G" & qRow)
            ColOffset = bexWS.Range("H" & qRow)
            'define first & last rows & columns for Key Figures
            FirstRow = resultArea.Rows(RowOffset).Row
            FirstCol = resultArea.Cells(ColOffset).Column
            numCells = resultArea.Cells.Count
            LastRow = resultArea.Cells(numCells).Row
            LastCol = resultArea.Cells(numCells).Column
            'search for and hide any row where all Key Figures are zero
            For i = FirstRow To LastRow
                Set KFRange = Range(Cells(i, FirstCol), Cells(i, LastCol))
                HideThisRow = True
                For Each c In KFRange.Cells
                    If IsNumeric(c.Value) Then
                        If c.Value <> 0 Then HideThisRow = False
                    End If
                Next c
                Rows(i).Hidden = HideThisRow
            Next i
        End If
    End Sub

  • Live Office BOXI R2 VBA Macros & Scheduling

    Greetings,
    have an Excel heavy customer who is liking VBA for macro development and desktop productivity workflow automation ...
    Wondering if/how customer could hook VBA macros into the Live Office suite? 
    Alternatives for automating document refreshes?
    Martin

    Double post. Sorry

Maybe you are looking for

  • HT4623 Trying to install iOS 6 via itunes. Whats the proper procedure to follow?

    Trying to install iOS 6 with iTunes, whats the proper procedure to follow?

  • Chart w/ multiple scales

    Post Author: andeezlemoyo CA Forum: Charts and Graphs Hi All, I'm using CR XI Release 2. Is it possible to create a chart with multiple scales? Or in other words, plot multiple measures on a single chart. Thanks, Andy

  • Web Intelligence Report Formatting

    I have a Web Intelligence Report with a table and bar chart placed underneath it. As the report returns a different number of table rows each time it is run it resizes, sometimes 10 rows, sometimes 50 rows. I need the chart  to always be placed a few

  • How to Transfer apple mail data to windows outlook 2013

    Looking for a solution that will help me transfer all my data, from emails to address book and contacts from apple mail to outlook 2013 in windows system. I have gone through Imap way of email, but there are some few thousand emails stored as archive

  • Apply unapplied credit against future sales orders

    Hi, As per the current business scenario, there is a custom program which checks for the payment against the sales order and if it has not received, the program will put the order on Hold. Now, there are few scenarios where customer has paid the amou