Macro in query

Hi all!
I would like to know how (if possible at all) to assign VBA macro to a query, not a single workbook. I want it to be executed when running a query.
Will appreciate any hints!

Hi Marek,
This is not possible, it can only be achieved by BEX since it is embedded in excel. There is no such functionality for queries.
Regards,
Michael

Similar Messages

  • APO-DP Macro formula query

    Hi SAP experts,
    I'm having a problem in a planning book in which a negative value appears in a consumed AATP in which negative value should not occur. Because of this a customised functionality was affected. This was the formula of the macro:
    Carry Over Alloc w = MAX (AATPw-1;0) + HUB Inventory Sat w
    Thus MAX (AATPw-1;0) means that if the value is in negative, the macro will calculate this as zero? For example -150 is the value of AATPw-1, Hub inventory is 200. Thus the macro having a automatically change this -150 to 0 and calculating it to:
    Carry Over Alloc w = 0 + 200
    Please help on what MAX (AATPw-1;0) means.
    Thanks in advance!
    Raymond

    Hello there...yes you are right...the function Max(1....n) will return the maximum value in the range 1....n and so from your example if u have -150 to 0 as your interval then Max would return 0..
    Hope this helps!
    Thanks!

  • How to email all BPs who received an invoice this week

    I would like to send an email to all BPs that received an invoice between two date ranges. I can write the query, but how do I get B1 to send each one an email with their information?
    Thank you

    Hi Sal,
    there is no mass (e)-mailing function in SAP implemented. We have an addon for layout design & printing, that allows to install batch jobs and auto email marketing documents.
    e.g. Instead of printing invoices, we are automatically sending all invoices by mail.
    Instead of this, you could create a small macro that query your records and use e.g. outlook for mailing a template.
    Regards Steffen

  • How to run a VB macros code on Query refresh?

    Hi BW gurus,
    Please help me out with this task.
    I have a macros as below
    <b>Sub Table_To_Cons()
        'Copy the occupied rows
        Application.DisplayAlerts = False
        TargetSheet = ActiveSheet.Name
        Sheets("Table").Activate
        j = 2
        For i = 21 To 65536
            If Range("F" & i).Value = "" Then
                'MsgBox "The Cell is Empty"
            Else
                f = Range("F" & i).Value
                g = Range("G" & i).Value
                Sheets("Consolidated Data").Range("A" & j).Value = f
                Sheets("Consolidated Data").Range("B" & j).Value = g
                j = j + 1
            End If
        Next
        Sheets("Consolidated Data").Activate
        MsgBox "Finished"
        ' Update Chart
        Sheets("Chart1").Select
        ActiveChart.PlotArea.Select
        ActiveChart.SetSourceData Source:=Sheets("Consolidated Data").Range("A2:B6") _
            , PlotBy:=xlRows
    End Sub</b>
    User are not interested to run the VB macros manually.
    Instead they are asking like this.The macros should run and show the latest result everytime when we refresh the query.
    Can someone help me out how to achieve this.
    Any kind of help is appreciated.
    Thanks in Advance
    Have a nice day
    Regards
    Sam Mathew

    Hi Sam,
    Very interesting that the Properties dialog has changed.  I have no experience with NW2004s.  I will answer your questions based on what I do have experience with; then, we will need to do some testing to check my assumptions.
    Your first question: does this subroutine already exists in a workbook, or do we have to manually type it in?  In the days before Excel 2002, the answer was "yes", the subroutine already exists.  Since Excel 2002, the answer is maybe.  More often than not, "no" ... and you have to type it in.
    But, whether it exists or not, you will find out when I answer yoru second question:  exactly where should I search for it?  Since you have written a macro, you already know about the Visual Basic Editor (VBE).  Since I am not sure how much you know about the VBE, I will explain it as if you know nothing.  Please do not be offended.
    As a general orientation to the Visual Basic Editor (VBE), there are 4 Windows you want to become familiar with:
    1.     the Project Explorer Window;
    2.     the Properties Window;
    3.     the Object Browser Window; and,
    4.     the Code Window.
    You should see the Project Explorer window on the left side of the VBE.  If it is not already visible, make it visible in one of 3 ways:
    i.     use the VBE menu bar and select View >> Project Explorer
    ii.     use shortcut keys Ctrl+R
    iii.     use the VBE Standard toolbar and select the icon for Project Explorer
    In the Project Explorer window you can all of the "Projects" (workbooks and add-ins), that are loaded. 
    In the view of your workbook (the one with the macro) there are at least twol groups of "objects" shown:
    •     Microsoft Excel Objects (these are Worksheets and Workbooks)
    •     Modules (I call these "General Code Modules")
    There are two other possible types of objects:
    +  Forms
    +  Class Modules
    Visual Basic Code is always written in a Code Window.  There are 3 types of code windows:
    i.     Object Code Windows
    ii.     General Code Modules
    iii.     Class Modules
    When you use the Excel macro recorder, it always creates the macro in a General Code Module.  The subroutine SAPBEXonRefresh also will be in a General Code Module. 
    To find it (if it exists), you can start in any code module in your workbook, press Ctrl+F, enter SAPBEXonRefresh, click the radio button to Search in Current Project.
    Now, to test my assumptions ... while you are in the Visual Basic Editor, with the Project Explorer Window open, please look under Microsoft Excel Objects and see if there is an object named "SAPBEXqueries".  If not, stop right there.  I cannot help you.
    If the SAPBEXqueries object is there, let me explain what it is.  This is a worksheet that is VERY hidden.  That means, it is hidden so that it cannot be made visible from Excel.  It can only be made visible from the VBE.  Let's do not now.
    Select the SAPBEXqueries object (double-click), then open the Properties window in the VBE.
    You can open the properties window using:
    +  View Properties Window
    +  press F4
    +  use the standard toolbar and click the Properties icon
    Look at the Visible property.  It should 2 - Very Hidden.  Change it to Visible.  Now switch back to the Excel view.  Look in cell F4.  What do you see in this cell?  It should be:  SAPBEXq0001, or something very similar to that.
    Now (still in Excel) open the GoTo dialog (Edit >> Go To; or, press F5).  This will list all of the Named Ranges in the workbook.  If you are on the SAPBEXqueries worksheet, the GoTo dialog should list a number of Named Ranges starting with SAPBEXq000,,,,,  Do you see this?
    I am very interested to learn what you see when you do these things.  And, I am very willing to answer any questions you have as a result of doing this testing.
    By the way, when you make the SAPBEXqueries worksheet hidden again, be careful.  As soon as you make it hidden (or very hidden), the selection in VBE will change to an object that is NOT hidden.  So, if you are not watching carefully, you might think that you are still on the SAPBEXqueries sheet and that you failed to hide it.  And, pretty soon, if you are not careful, you will have hidden every worksheet in the workbook!
    - Pete

  • VBA Analyzer: Macro to "Change Query (Global Definition)"

    Dear All,
    I search a macro wich allows in Analzer to launch Query Designer with the right query name ?
    Thanks for your help
    Rodolphe.

    Hi
           If u migrate the query of the 3.5 version to 7.0 version u ca only do the edition for that query in 7.0 only,u cannot edit that one in 3.5,but only u can open

  • Refresh a query, by assigning macro to a object

    Hi,
    I am trying to use an object on a worksheet to refresh a query on another worksheet. I am not quite sure how we do it.
    I looked at the thread, BEx query refresh macro
    But, i do not how to use it. please provide suggestions as to how to proceed?
    Thanks,
    raj

    reposting for suggestions, did not solve my problem yet.
    so far what i know is, i have to assign macro to the object but, do i need record the refresh query or do i need to call the standard funtion,
    "Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    End Sub"
    But, how do i call or assign this as a macro to the object
    peter knoer, can you provide suggestions?
    Thanks,
    raja.

  • VBA Macro code to refresh query

    Hi people,
    First post...
    I am running BI7.1 and have set up a workbook with various queries that have to be run on separate days.
    I have a cover page that I have set up and want to have buttons on this page that when clicked will only refresh the relevant query for that specific day.
    I have searched online in various places and have only found the VBA code to do this using the old BEx Analyser (3.5)
    Is there a way or code available to enable me to automaticallt refresh a query using a macro?
    Thanks
    Steve

    Hi,
    I have tried to do this on numerous occasions, and no matter what I do the macro recorder does not pick up any of the refresh activities.
    The VBA code I have used in the past is "Run "SAPBEX.XLA!SAPBEXrefresh", False"
    This worked when I used to use Analyzer 3.5 however it doesn't work in the current version.
    I am looking for a similar piece of code that will allow me to add to existing macro which will trigger the refresh of the query.
    Any help is much appreciated
    Thanks
    Steve

  • Query on reading infotype 0001 using the macro rp-provide from last p0001

    Dear Friends,
            I have a question rgarding relating the infotype 0001 when we are using in the program the logical database PNP.
    iam using rp-provide-from-last p0001 space sydatum sydatum
            if pnp-sw-found eq 1.
            append p0001 into i_p0001.
            endif.
    iam getting a problem in production , in the selection screen iam passing for emloyee subgroup with multiple values option.
    i have passed E,H,S  -> where E means Executive , H means hourly and S means salaried employee...
    one particular scneario is iam having an employee whose
    employee subgroup is C (contactor) and on the selection screen if am passing this personnel no and on the selection screen iam only having in the multiple selection option only E,H,S but not C so this record should  should fail but it is getting success and appending to internal table i_p0001
    which is wrong
    , i mean to say the macro is getting success
    rp-provide-from-last p0001 space sydatum sydatum
    this employee .
    my question is will the macro will not check on the selection screen the employee gropu which we have passed and should i exclusively check
    if p0001-persk in pnppersk ?? or please let me knwo how to check this wrong employee not getting appended to my internal table.
    please let me know
    regards
    madhuri

    Hi Madhuri
      The macro rp-provide-from-last p0001 will not fetch data from the database, it simply extracts the last record from the available internal table P0001[]  for the time frame provided(as 3rd and 4th parameters). You can check the definition of the macro from the database table TRMAC, it simply uses the LOOP....ENDLOOP and IF conditions to arrive at the last record and populates the fields pnp-sw-found, pnp-sw-tabix.
        And coming to your problem, please check all the IT0001 records of the EE concerned, it can happen that the EE is attached to different employee subgroups in different time frames and hence the LDB is fetching all the available records of the EE (even if the employee subgroup is not among the one's selected in  the selection screen). If this is the case, I reckon, u've to perform manual check before appending to the internal table.
    Note:  The macro  rp-provide-from-last p0001 space sydatum sydatum will only fetch the valid IT0001record as on date - sy-datum

  • Excel query/macro , delete records where the aggregate value is not over 100

    I have a spreadsheet with about 5000 records. I need to delete out the records where the Amount column is less than $10.00 unless the aggregate of the amount column is greater than or equal to $100. I have an ID column that matches to the name on the record.
    So is it possible to create something that for each ID number in the ID column if the Amount column is less than $10 delete it unless the same ID appears again and is greater than $100? TIA

    HI mkozz28,
    >> I need to delete out the records where the Amount column is less than $10.00 unless the aggregate of the amount column is greater than or equal to $100.
    In my option, you could sort the data by column ID, then loop through the column Amount, if the value of the Amount is less than 10, then find the cell according the same ID, if the Amout is less than 100, delete the enterRow.
    For more information about Find method, you could turn to the link below
    # Range.Find Method (Excel)
    https://msdn.microsoft.com/en-us/library/office/ff839746.aspx
    For the row delete, the link below might be useful to you
    # Delete Method [Excel 2003 VBA Language Reference]
    https://msdn.microsoft.com/en-us/library/office/aa223863(v=office.11).aspx
    A simple demo as below, you need to modify it to your own requirement.
    Sub test1()
    For i = 2 To 8 'row number
    Debug.Print ActiveSheet.Cells(i, 2).Value
    'ActiveSheet.Cells(i, 2).Select
    If (ActiveSheet.Cells(i, 2).Value <= 10) Then
    Set cell = ActiveSheet.Range("A1:A8").Find(ActiveSheet.Cells(i, 1).Value, After:=ActiveSheet.Cells(i, 1), LookIn:=xlValues)
    If cell Is Nothing Then
    ActiveSheet.Cells(i, 2).EntireRow.Delete
    Else
    Debug.Print ActiveSheet.Cells(cell.Row, 2).Value
    If ActiveSheet.Cells(cell.Row, 2).Value < 100 Then
    ActiveSheet.Cells(i, 2).EntireRow.Delete
    End If
    End If
    End If
    Next i
    End Sub
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • BO XI 3.1 LiveOffice VBA macro to refresh all query

    hi,
    we have migrated from BO 6.5 to BO XI 3.1.
    some Business queries have to be manually converted to LiveOffice.
    we still have a issue have we had in 6.5 a button to refresh all queries which a vba function
    the code was the following:
    Public Sub RefreshBO()
                Application.Run ("BQ_Load")
                Application.Run ("BQ_RefreshAll")
    End Sub
    does anybody knows how to do it in BO XI 3.1 ?
    thank you for your help.
    Pascal
    Note :Plateform BO XI 3.1 Windows, BO Enterprise

    You can refresh all objects by executing the appropriate LiveOffice menu item:
    Application.CommandBars(1).Controls("&LiveOffice").Controls(6).Execute
    I.e. CommandBars(1)=application menu; Controls("&LiveOffice")=LiveOffice submenu; Controls(6)=6th item in menu ("Refresh All Objects")

  • Memory usage of excel stays high after Macro is executed and excel crashes after trying to close it

    Hi,
    I'm trying to resolve an issue with an excel based tool. The macros retrieve data from an Oracle database and do calculations with the data. They also open and write into files in the same directory. The macros all run and finish the calculations. I can
    continue to use and modify the sheet. I can also close the workbook, however excel memory usage I see in the windows Task manager stays elevated.If I  close Excel it says: Excel stopped working and then it tries to recover information...
    I assume something in the macro did not finish properly and memory was not released. I would like to check what is still open (connection, stream or any other object) when I close the workbook I would like to have a list of all still used memory. Is there
    a possibility to do so.
    Here the code I'm using, its reduced to functions which open something. Functions   
    get_v_tools() and get_change_tools() are same as get_client_positions().
    Public conODBC As New ADODB.Connection
    Public myPath As String
    Sub get_positions()
    Dim Src As range, dst As range
    Dim lastRow As Integer
    Dim myPath As String
    lastRow = Sheets("SQL_DATA").Cells(Sheets("SQL_DATA").rows.Count, "A").End(xlUp).Row
    Sheets("SQL_DATA").range("A2:AD" & lastRow + 1).ClearContents
    Sheets("SQL_DATA").range("AG2:BE" & lastRow + 2).ClearContents
    Sheets("SQL_DATA").range("AE3:AF" & lastRow + 2).ClearContents
    k = Sheets("ToolsList").Cells(Sheets("ToolsList").rows.Count, "A").End(xlUp).Row + 1
    Sheets("ToolsList").range("A2:M" & k).ClearContents
    'open connection
    Call open_connection
    lastRow = Sheets("SQL_DATA").Cells(Sheets("SQL_DATA").rows.Count, "A").End(xlUp).Row
    If lastRow < 2 Then GoTo ErrorHandling
    'copy bs price check multiplications
    Set Src = Sheets("SQL_DATA").range("AE2:AF2")
    Set dst = Worksheets("SQL_DATA").range("AE2").Resize(lastRow - 1, Src.columns.Count)
    dst.Formula = Src.Formula
    On Error GoTo ErrorHandling
    'new prices are calculated
    newPrice_calculate (lastRow)
    Calculate
    myPath = ThisWorkbook.Path
    'Refresh pivot table in Position Manager
    Sheets("Position Manager").PivotTables("PivotTable3").ChangePivotCache ActiveWorkbook. _
    PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
    myPath & "\[Position_Manager_v1.0.xlsm]SQL_DATA!R1C2:R" & lastRow & "C31" _
    , Version:=xlPivotTableVersion14)
    ErrorHandling:
    Set Src = Nothing
    Set dst = Nothing
    If conODBC.State <> 0 Then
    conODBC.Close
    End If
    End Sub
    Sub open_connection()
    Dim sql_data, sql_data_change, sql_data_v As Variant
    Dim wdth, TotalColumns, startRow As Integer
    Dim rst As New ADODB.Recordset
    Errorcode = 0
    On Error GoTo ErrorHandling
    Errorcode = 1
    With conODBC
    .Provider = "OraOLEDB.Oracle.1"
    .ConnectionString = "Password=" & pswrd & "; Persist Security Info=True;User ID= " & UserName & "; Data Source=" & DataSource
    .CursorLocation = adUseClient
    .Open
    .CommandTimeout = 300
    End With
    startRow = Sheets("SQL_DATA").Cells(Sheets("SQL_DATA").rows.Count, "A").End(xlUp).Row + 1
    sql_data = get_client_positions(conODBC, rst)
    wdth = UBound(sql_data, 1)
    Sheets("SQL_DATA").range("A" & startRow & ":AA" & wdth + startRow - 1).Value = sql_data
    'Run change tools instruments
    startRow = Sheets("ToolsList").Cells(Sheets("ToolsList").rows.Count, "A").End(xlUp).Row + 1
    sql_data_change = get_change_tools(conODBC, rst)
    wdth = UBound(sql_data_change, 1)
    Sheets("ToolsList").range("A" & startRow & ":M" & wdth + startRow - 1).Value _
    = sql_data_change
    'open SQL for V tools instruments
    startRow = Sheets("ToolsList").Cells(Sheets("ToolsList").rows.Count, "A").End(xlUp).Row + 1
    sql_data_v = get_v_tools(conODBC, rst)
    wdth = UBound(sql_data_v, 1)
    Sheets("ToolsList").range("A" & startRow & ":L" & startRow + wdth - 1).Value = sql_data_v
    conODBC.Close
    ErrorHandling:
    If rst.State <> 0 Then
    rst.Close
    End If
    Set rst = Nothing
    End Sub
    Private Function get_client_positions(conODBC As ADODB.Connection, rst_posi As ADODB.Recordset) As Variant
    Dim sql_data As Variant
    Dim objCommand As ADODB.Command
    Dim sql As String
    Dim records, TotalColumns As Integer
    On Error GoTo ErrorHandling
    Set objCommand = New ADODB.Command
    sql = read_sql()
    With objCommand
    .ActiveConnection = conODBC 'connection for the commands
    .CommandType = adCmdText
    .CommandText = sql 'Sql statement from the function
    .Prepared = True
    .CommandTimeout = 600
    End With
    Set rst_posi = objCommand.Execute
    TotalColumns = rst_posi.Fields.Count
    records = rst_posi.RecordCount
    ReDim sql_data(1 To records, 1 To TotalColumns)
    If TotalColumns = 0 Or records = 0 Then GoTo ErrorHandling
    If TotalColumns <> 27 Then GoTo ErrorHandling
    If rst_posi.EOF Then GoTo ErrorHandling
    l = 1
    Do While Not rst_posi.EOF
    For i = 0 To TotalColumns - 1
    sql_data(l, i + 1) = rst_posi.Fields(i)
    Next i
    l = l + 1
    rst_posi.MoveNext
    Loop
    ErrorHandling:
    rst_posi.Close
    Set rst_posi = Nothing
    Set objCommand = Nothing
    get_client_positions = sql_data
    End Function
    Private Function read_sql() As String
    Dim sqlFile As String, sqlQuery, Line As String
    Dim query_dt As String, client As String, account As String
    Dim GRP_ID, GRP_SPLIT_ID As String
    Dim fso, stream As Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    client = Worksheets("Cover").range("C9").Value
    query_dt = Sheets("Cover").range("C7").Value
    GRP_ID = Sheets("Cover").range("C3").Value
    GRP_SPLIT_ID = Sheets("Cover").range("C5").Value
    account = Sheets("Cover").range("C11").Value
    sqlFile = Sheets("Cover").range("C15").Value
    Open sqlFile For Input As #1
    Do Until EOF(1)
    Line Input #1, Line
    sqlQuery = sqlQuery & vbCrLf & Line
    Loop
    Close
    ' Replace placeholders in the SQL
    sqlQuery = Replace(sqlQuery, "myClent", client)
    sqlQuery = Replace(sqlQuery, "01/01/9999", query_dt)
    sqlQuery = Replace(sqlQuery, "54747743", GRP_ID)
    If GRP_SPLIT_ID <> "" Then
    sqlQuery = Replace(sqlQuery, "7754843", GRP_SPLIT_ID)
    Else
    sqlQuery = Replace(sqlQuery, "AND POS.GRP_SPLIT_ID = 7754843", "")
    End If
    If account = "ZZ" Then
    sqlQuery = Replace(sqlQuery, "AND AC.ACCNT_NAME = 'ZZ'", "")
    Else
    sqlQuery = Replace(sqlQuery, "ZZ", account)
    End If
    ' Create a TextStream to check SQL Query
    sql = sqlQuery
    myPath = ThisWorkbook.Path
    Set stream = fso.CreateTextFile(myPath & "\SQL\LastQuery.txt", True)
    stream.Write sql
    stream.Close
    Set fso = Nothing
    Set stream = Nothing
    read_sql = sqlQuery
    End Function

    Thanks Starain,
    that's what I did the last days and found that the problem is in the
    newPrice_calculate (lastRow)
    function. This function retrieves data (sets it as arrays) which was correctly pasted into the sheet, loops through all rows and does math/calendar calculations with cell values using an Add-In("Quantlib")
    Public errorMessage as String
    Sub newPrice_calculate(lastRow)
    Dim Type() As Variant
    Dim Id() As Variant
    Dim Price() As Variant
    Dim daysTo() As Variant
    Dim fx() As Variant
    Dim interest() As Variant
    Dim ObjCalend as Variant
    Dim newPrice as Variant
    On Error GoTo Catch
    interest = Sheets("SQL_DATA").range("V2:V" & lastRow).Value
    Type = Sheets("SQL_DATA").range("L2:L" & lastRow).Value Id = Sheets("SQL_DATA").range("M2:M" & lastRow).Value Price = Sheets("SQL_DATA").range("T2:T" & lastRow).Value
    daysTo = Sheets("SQL_DATA").range("K2:K" & lastRow).Value
    fx = Sheets("SQL_DATA").range("U2:U" & lastRow).Value
    qlError = 1
    For i = 2 To lastRow
    If (i, 1) = "LG" Then
    'set something - nothing spectacular like
    interest(i, 1) = 0
    daysTo(i , 1) = 0
    Else
    adjTime = Sqr(daysTo(i, 1) / 365)
    ObjCalend(i,1) =Application.Run("qlCalendarHolidaysList", _
    "CalObj", ... , .... other input parameters)
    If IsError(ObjCalend(i,1)) Then GoTo Catch
    'other calendar calcs
    newPrice(i,1) = Application.Run( 'quantLib calcs)
    End If
    Catch:
    Select Case qlError
    Case 1
    errorMessage = errorMessage & " QuantLibXL Cal Error at: " & i & " " & vbNewLine & Err.Description
    ObjCalend(i,1) (i, 1) = "N/A"
    End Select
    Next i
    Sheets("SQL_DATA").range("AB2:AB" & lastRow).Value = newPrice
    'Sheets("SQL_DATA").range("AA2:AA" & lastRow).Value = daysTo
    ' erase and set to nothing all arrays and objects
    Erase Type
    Erase id
    Erase Price
    Set newPrice = Nothing
    Is there a possibility to clean everything in:
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    End Sub
    Thanks in advance
    Mark

  • 'ORA-01722: Invalid Number' error while Running a Query

    Hi,
    I'm trying to run a query built on a DSO. The DSO has a field 'Start Date'. This Start Date InfoObject has a reference Char as 0DATE.
    This Start Field has blank values due to which I'm getting the ORA-01722 error. I came across many threads with same topic of discussion. As mentioned in one of the Threads I have written a program to update 'Start Date' with 00000000. The code wriiten is "UPDATE /BIC/AZ_MONINV00 SET /BIC/ZSTR_DTE = '00000000' where /BIC/ZSTR_DTE = ' '.
    Now when I see the data in the active data table of DSO the blank value is replaced with '00000000'.
    But If I right click on the DSO click on display data the 'Start Date' field is blank. And now the Query also gets executed without any error. But in the output of the query the 'Start Date' Field has "#" values.
    Can anyone suggest on how can I make these "#" values appear as 00000000 in the report?

    In this case, you have to write a macro to avoid # in Analyzer.
    Right Click-->Display Data will show data from Active table of DSO only.
    If you don't want to show any blank date values in the report, you can exclude in Filter in Query.

  • System unable to read table in Adhoc Query

    Hi Experts,
    I am trying to extract a report based on Infotype 0022 through Adhoc query. Even after maintaining data for IT0022 for a few employees the system is unable to read the educational details of those employees.
    I am unable to trace the defect . can anybody please tell me what could be the reason. I have checked the table PA0022, there the data is been stored.
    Thanks & Regards,
    Smitha

    Hi paul and experts
    actuall im reading data from 0022 infotype .  im using  macro
    rp_provide_from_last p0022 '11' pn-begda pn-endda.
    no data found for this.
    but in pa30 for that particular employee data is there.
    please help me out of this.
    thanks a lot

  • VB Macro in Bex Analyser is taking long time to complete execution

    Hi Experts,
    In a FI query , we have a VB macro which update the excel sheets by taking values from the previous excel sheets .
    The issue is its taking long time for query execution and if we are keep on pressing 'ENTER' button . The query is running very fastly and is giving the results ,but its not a correct way to do.
    Its a critical issue in Production and can anyone help me to resolve the issue.
    Regards,
    Anju

    Hi Anju,
    I need to create a VB macro in one of my query but i not familiar how i can plug the VB code into the query.
    Please can you give me some basic procedure on how to do that?
    What i need to do exactly is to bring a KF from a query into another query. Not sure if this is possible using VB.
    Let me know.
    Thanks.
    Cesar

  • Error when trying to open new query from Bex

    Hi guys,
    I m trying to open query designer from Bex explorer and i get the following error: The macro 'sapbex.xla!reponewquery'cannot be found.
    Can anyone please tell me how to rectify this? thanks in advance

    Sunil,
    Go to  Business explorer>Analyzer>Business Explorer-->Installation check and click on Start button.
    You will be able to know if its properly installed or not.
    Also check note 197460;938540
    -Doodle
    Message was edited by: Doodle

Maybe you are looking for

  • App automatic bank pick up

    Dear Experts, I have issue regarding automatic bank pick up. I have activated partner bank type in my MIRO/FB60 and user has to enter this field manually while posting. My user wantst to fill this field automatically based on the currency given while

  • Aurora 27.0a2 (2013-11-15) ModernUI - SYNC´ed bookmarks are not visible

    Using ModernUI in Win 8.1 with SYNC seems to work on hand: Typing in keywords associated to URLs displays the right SYNC´ed URLs. But the bookmarks are not displayed. In desktop mode the SYNC runs properly in all aspects. How can I enable the visibil

  • Exporting QT from FCP for website

    I recently posted about this and got a good answer, but now I have more questions..... I have a DV NTSC 48K 4:3 project in FCP that is 2 minutes long. I exported it as a QT through QT Conversion at a size of 320x240, and chose AAC as a sound format,

  • Xcel output from Reports 6.i

    I applied the patchset and I am now able to get my resultset into Excel, however the headings and totals are screwed up and I need this for my users, how do I fix this problem? Thanks Kathy

  • JSP Compilation

    As all know that a JSP is compiled first time when the server initializes an application. The server does not compile jsp at each request to the jsp. My question is whenever there are any changes made to a JSP, how the running server recognises that