BP Activity Query

Hi All --
Can someone help us with a Query where we can select by Activity creation date range.  After selecting range, the Query should pull all "Other Activities" and show the following info:
BP Acct#...Contact...Company...Bill To Address...Bill To City...Bill To State...Bill To Zip...Phone...Activity Type
Thanks!!
Mike

Mike,
I believe Others is something you defined.  Since each Activity has a number (code) associated with it, knowing the code would help filter it better.
But for now..this would work
SELECT T1.CardCode [BP Acct#], T0.CntctPrsn [Contact], T0.CardName [Company],
T0.Address, T0.City, T0.State1, T0.ZipCode, T0.Phone1, T2.Name [Activity Type]
FROM [dbo].[OCRD] T0 INNER JOIN [dbo].[OCLG] T1 ON T0.CardCode = T1.CardCode
INNER JOIN [dbo].[OCLT] T2 ON T2.Code = T1.CntctType
WHERE T2.Name Like '%Others' AND T1.CntctDate BETWEEN '[%0]' AND '[%1]'
Suda

Similar Messages

  • Error while activating query element.

    Dear All
                  Can any one tell this error .
                  When iam transporting the queries to BI production there is an errror in Transportation log that  error while activating query element.
    But  the querysis fine in Bi quality.
    Error : Error while activating "6899QYGVHJPGYUBLKA9SPHORZ".

    Hi
    Might be that query element was deleted(not used n was used before in dev) while creating cross check once in your query.
    First check what is that element which is not transported?
    use table RSZELTDIR to find out weather its a Var or CKF or RKF etc...
    then check for the same in the query in QA weather its active and ported fine to QA if not try to collect the element and transport to QA in a separate request.
    Regards
    KP

  • Hide Active Query

    Hi All,
    We have installed Buyer business package on portal . In Transaction processing view currently the POWL view shows all the active queries given below:-
    1. My Purchase Requisitions
    2. Purchase Requisitions to be created
    3. Purchase orders with confirmations
    4. Purchase Requisitions to be assigned
    5. Purchase orders on hold.
    I do not want to show "Purchase orders on hole" active query on portal. How can I remove this active query ?
    Regards,
    Namrata

    Hi,
    Thanks. Can you let me know where do I see this option to hide the query, I mean which transaction?

  • Sales Oportunity / Activity Query Question

    I am trying to create a query to look up all Activities assigned / associated with a specific Sales Oportunity. I can not determine how to join the the Activity / Activities to the Sales Oportunity.  I see the the table OCLG, Activities table , that there is a Business Partner column, but how do I determine if the Activity is associated with an Activity and if so, which Sales Oportunity?
    Is there another table I need to join to?
    Hope this makes sense.
    Thanks in advance
    Dana

    hi,
    Activity can be linked to a business partner,not to sales opportunity,
    U can link sales opportunity indirectly with Acitivity via BP Code.
    Develop this query
    SELECT T0.OpprId, T0.CardCode, T1.ClgCode, T1.CardCode, T1.Notes
    FROM OOPR T0 INNER JOIN OCLG T1 ON
    T0.CardCode = T1.CardCode
    Jeyakanthan

  • Problem when activating Query from Business Content

    Hi Gurus,
    I'm currently encountering problems when activating a query (Financial Statement and P&L: Actual/Actual Comparison) in the business content under these 2 cubes (0FIGL_VC1 and 0FIGL_VC2). Since I was told that these cubes are Virtual Cubes I also have already activated Basis Cubes (0FIGL_C01 and 0FIGL_C02)  as a prerequisite of the 2 Virtual Cubes. I have also loaded the data for the 2 cubes and have encountered no problem at all.
    But while activating the said Query (Financial Statement and P&L: Actual/Actual Comparison). I have encountered a problem during activation and only this error message appears 1. Error when activating element DO9NE34DKNREWIBWNVAW8BS7M (Technical Name of the Query) and 2. BEx transport request '' is not available or not suitable.
    What other possible steps am I missing here?Is there anything else I should do or activate before activating the Query. Thank you again for all the help.
    - Kit

    Hi Kristian,
    Do the following ->
    Goto transaction RSA1 -> Transport Connection -> Edit -> Transport -> Switch On Standard.
    After this try activating your Query again.
    Hope this helps!
    Regards,
    Saurabh

  • Activity Query

    1,. I have one activity which should completed withih three visits of the customer ( cusomer- person). if that activity is finished thed system should not allow for next activity.
    Please do suggest
    2.I want to perform certain activity again & again after every 10 acitvities
    please do suggest

    good evening,
    I have tested your query and modified as follows;
    SELECT T0.ClgCode as ActivityCode, T0.Recontact
    as Date, T0.BeginTime as Time, T2.U_NAME as DDTContact, T0.Action as Activity, T1.CardName as BP,
    T0.CntctCode as CustomerContact, T0.Details
    as Remarks, T0.Notes as Content FROM OCLG
    T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
    INNER JOIN OUSR T2 ON T0.AttendUser = T2.INTERNAL_K
    WHERE T0.Action = '[%0]' and
    T0.AttendUser = '[%1]'
    When I run it asked about activity and dealt by. After I fill, it succeed.
    I also delete groupby. Here is the cause;
    GROUP BY Clause
    Specifies the groups into which output rows are to be placed and, if aggregate functions are included in the SELECT clause <select list>, calculates a summary value for each group. When GROUP BY is specified, either each column in any non-aggregate expression in the select list should be included in the GROUP BY list, or the GROUP BY expression must match exactly the select list expression.
    Note  If the ORDER BY clause is not specified, groups returned using the GROUP BY clause are not in any particular order. It is recommended that you always use the ORDER BY clause to specify a particular ordering of the data.
    Rgds,

  • Sales Order + Activity query

    Hi,
    I set up the following query in one company:
    SELECT T0.DocNum, T1.ClgCode, T3.U_NAME, T2.name, T1.endDate, T1.Priority, T0.CardCode, T0.CardName, T0.NumAtCard, T0.DocDate, T0.DocTotal
    FROM ORDR T0 LEFT OUTER JOIN OCLG T1 ON T0.DocNum = T1.DocNum LEFT OUTER JOIN OCLA T2 ON T1.status = T2.statusID LEFT OUTER JOIN OUSR T3 ON T1.AttendUser = T3.INTERNAL_K
    WHERE T0.DocStatus = 'O'
    When I replicate it in another company, I get the following error:
    SQL Server Native Client 10.0|| SQL Server||  Conversion failed when converting the nvarchar value 'STBs-EN-0002' to data type int. 'Received Alerts' (OAIB)
    The STBs value indicated is an Item Code/IMD record which isn't even referred to in the query so not sure why it's getting picked up and/or causing an error.
    When I separate the two parts of the query - one query on just open sales orders, another on activities - they both work. It seems to be with the linking of ORDR to the Activities tables (if I try just ORDR and OCLG I get the same error above).
    Any assistance on figuring out how to fix the query would be much appreciated,
    Heather

    Hi Heather,
    Try:
    SELECT T0.DocNum, T1.ClgCode, T3.U_NAME, T2.name, T1.endDate, T1.Priority,
    T0.CardCode, T0.CardName, T0.NumAtCard, T0.DocDate, T0.DocTotal
    FROM ORDR T0
    LEFT JOIN OCLG T1 ON T0.DocNum = T1.DocNum AND T1.DocType = '17'
    LEFT JOIN OCLA T2 ON T1.status = T2.statusID
    LEFT JOIN OUSR T3 ON T1.AttendUser = T3.INTERNAL_K
    WHERE T0.DocStatus = 'O'
    Thanks,
    Gordon

  • FaceTime dynamic activation query

    Is there any way known to have FaceTime only active when the program is running (like Skype)?
    I've tried the Preferences, but that only allows global on & off.  What I'm looking for is being able to launch FaceTime and leave it in the background if I'm able to take a call, but otherwise have it offline.  There is nothing in any of the manuals that I can locate on this matter, and Google only mentions the Preferences option.
    After some awkward moments at work I've had to resort to leaving it off permanently.  Would be nice to be able to use it occasionally, but in a professional setting it's less than appropriate.

    Thank you.  It would be nice if it would deactivate itself somehow when one quit the program - having to remember to do it is too awkward & will eventually be forgotten (probably just before giving a Keynote presentation to a whole auditorium!)
    I have also looked for Applescript/Automator access to it (and through writing defaults) to have it automatically disabled everytime you restart; unfortunately this too has been unsuccessful.

  • PSE 7 Activation query. Serial number is invalid

    Trying to activate an old PSE 7 version on a new PC and serial number is coming up as invalid. Can you assist please

    Got the exact same response from the tech guy on the chat.  It's terrible support in my opinion.
    I have the exact same problem as you and they sent me to this forum to resolve it.  C'mon Adode!!!
    Photoshop Elements 7 works fine on Windows 8.1 as I am running the trial version it just wont accept my serial number which is valid

  • Livecache - Redo log management activation query

    Hi,
    A livecache system is in use with redo management deactivated status over one month.
    Now planning to activate it and ON the LOG WRITING
    what is the best procedure can be followed. if I activate them now , can the livecache/maxdb data get affected?
    I would like to get clarified these doubts. Please guide and provide your inputs
    Thanks in advance

    Hello,
    the liveCache/Maxdb data will be not affected after you will activate the log writing.
    Please review the SAP note 869267 - FAQ: SAP MaxDB Log area:
    Starting the log writer:
    Set
    the database to the operational state ADMIN. Execute the following DBM
    command:
    util_execute SET LOG WRITER ON
    Create a complete data
    backup in the ADMIN or ONLINE operation status."
    After the databackup will be created, activate the auto-save logbackup. Manage the logbackup archiving, see SAP note 1377148 - FAQ: SAP MaxDB backup / recovery < 10. & 11. >
    Regards, Natalia Khlopina

  • How do you query activity data for accounts?

    I need to extract account activity data. When I try to use the Activity WSDL it doesn't seem to provide any account information even though I do see fields like AccountId, AccountName. They are blank. Also it looks like there is way to do a activity query using the Account WSDL. Does anyone have an example of this?
    We are using Release 18 with V2 WSDL.
    Thank you,
    Dan
    Edited by: dansshin on Oct 14, 2010 2:33 PM

    I'm not sure what you mean by XML string but I'm trying to extract to CSV file using this code. It provides activity data but looks like account information fields are blank.
    Thank you,
    Dan
    private static void ExtractGrowerAccountActivity(String sessionID, String csvFileName)
    try
    // Download the opportunity wsdl from the Admin section of the CRM application
    // Add web reference to the wsdl
    // Create the instance of the account entity
    Activity myAcctAct = new Activity();
    myAcctAct.Url = ConfigurationManager.AppSettings["OnDemandURL"] + "/Services/Integration;jsessionid=" + sessionID;
    // Set the query
    // To find the record with account type as grower
    Activity_WS.queryType myAcctName = new Activity_WS.queryType();
    myAcctName.Value = "";
    // Create query instance and set the appropriate parameters
    Activity_WS.ActivityQuery myAcctActQuery = new Activity_WS.ActivityQuery();
    myAcctActQuery.AccountId = new Activity_WS.queryType();
    myAcctActQuery.AccountName = myAcctName;
    myAcctActQuery.AccountExternalSystemId = new Activity_WS.queryType();
    myAcctActQuery.Id = new Activity_WS.queryType();
    myAcctActQuery.Activity = new Activity_WS.queryType();
    myAcctActQuery.CreatedByFullName = new Activity_WS.queryType();
    myAcctActQuery.CreatedDate = new Activity_WS.queryType();
    myAcctActQuery.DueDate = new Activity_WS.queryType();
    myAcctActQuery.Completed = new Activity_WS.queryType();
    myAcctActQuery.CompletedDatetime = new Activity_WS.queryType();
    myAcctActQuery.Subject = new Activity_WS.queryType();
    myAcctActQuery.Type = new Activity_WS.queryType();
    // Set ListOfAccountQuery
    Activity_WS.ListOfActivityQuery lstOfAcctActQuery = new Activity_WS.ListOfActivityQuery();
    lstOfAcctActQuery.Activity = myAcctActQuery;
    // Number of records to fetch
    lstOfAcctActQuery.pagesize = "100";
    // set ActivityQueryPage_Input
    ActivityQueryPage_Input myActInput = new ActivityQueryPage_Input();
    myActInput.ListOfActivity = lstOfAcctActQuery;
    // Get the output
    ActivityQueryPage_Output myOutput = myAcctAct.ActivityQueryPage(myActInput);
    // Get ListOfAccountData
    Activity_WS.ListOfActivityData myAcctActData = myOutput.ListOfActivity;
    Activity_WS.ActivityData[] acctActData = myAcctActData.Activity;
    // Write to output file
    if (acctActData.Length > 0)
    using (var sw = new StreamWriter(csvFileName))
    // Write header
    sw.WriteLine("AccountID, AccountName, AccountType, ExternalID, ActivityID, ActivityType, CreatedBy, CreatedDate, DueDate, IsCompleted, CompletedDate, Subject, Type");
    for (int i = 0; i < acctActData.Length; i++)
    // Write detail
    sw.WriteLine(string.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}",
    acctActData.AccountId,
    acctActData[i].AccountName,
    "Account Type",
    acctActData[i].AccountExternalSystemId,
    acctActData[i].Id,
    acctActData[i].Activity,
    acctActData[i].CreatedByFullName,
    acctActData[i].CreatedDate,
    acctActData[i].DueDate,
    acctActData[i].Completed == true ? "Y" : "N",
    acctActData[i].CompletedDatetime,
    acctActData[i].Subject,
    acctActData[i].Type));
    // Write to log
    log.Message = string.Format("INFO: {0} Grower account activity record(s) extracted.", acctActData.Length);
    log.Categories.Add(Category.General);
    log.Priority = Priority.Normal;
    writer.Write(log);
    catch (Exception ex)
    log.Message = string.Format("ERROR: " + ex.ToString());
    log.Categories.Add(Category.Error);
    log.Priority = Priority.High;
    writer.Write(log);

  • Error in Query Activation from Business Content

    Hi Gurus,
    I'm having problems when I'm activating Query 0FIGL_VC1_Q0001 (Financial Statement and P&L: Actual/Actual Comparison) under Virtual Cube (0FIGL_VC1). Everytime I activate it, it displays these errors 1. Error when activating element 2GXNYXWAV1FOYLM46UJ2U2Q2D , 2. Error when activating element 2LOL3P78C15MAEBIFHL8MNR7R, etc.
    Then when I look at the query elements, I noticed that not all elements (Structure, Formulas, etc) are activated and it displays this message "Is existentially required by : 0FIGL_VC1_Q0001 [ELEM]". Although when I search for the elements in the Business Content to activate them it seems that these elements do not exists. Please advice. Thank You.
    - kit

    Hi
    Check if the Query : 0FIGL_VC1_Q0001 has all the Query Elemenst(Restricted Keyfigures, Calculated Keyfigures etc) have D version to install.
    You can also check in the Source System if all the Query Elements corresponding to the Query are transported in D-version.
    If something is missing do transport it agian.
    Regards, Hyma

  • Need to join two queries A/R statemet and Activity report

    I have two  separate queries that need to be one. I have an A/R statement where I want to add notes next to each invoice. Currently these are two separate reports. How can I link the activity Report to the A/R Statement. Below are the two separate reports. I am not sure how to join the files. A/R Aging Report Declare @d datetime set @d /*Select 1 from jdt1 t where t.duedate*/=[%1] select * from ( SELECT T1.CardCode, T1.CardName, T0.RefDate, T0.Ref1 'Document Number',     CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'           WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'           END AS 'Document Type',     T0.DueDate, (T0.Debit- T0.Credit) 'Balance'     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)=0 and DateDiff(day, T0.DueDate,@d)30 and DateDiff(day, T0.DueDate,@d)60 and DateDiff(day, T0.DueDate,@d)90 and DateDiff(day, T0.DueDate,@d)=121),0) '121+ Days' FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode WHERE  T1.CardType = 'C' ) sub Activity Report SELECT T1.[ClgCode],T2.[U_NAME], T4.[Name] as Status, T0.[CardCode], T0.[CardName], T0.[DocNum], T0.[U_AIS_DVIInvName] as 'SF Invoice Name', (T0.U_AIS_DVISFSO) as 'SO#', T0.[DocDate],T0.Taxdate as 'Month Of Service',T0.[U_AIS_DVIOpptyNm],T0.[U_AIS_DVIAdvNm],T0.[U_AIS_DVIManNm],T0.[U_AIS_DVIAcctNm], T0.[DocTotal], T0.[DocStatus],  T1.[Recontact],  T1.[Details], T1.[Notes], T1.[CntctType], T3.[Name] FROM OINV T0 left join OCLG T1 on t0.docentry = t1.docentry and  T0.[ObjType]  =  T1.[DocType] left outer JOIN OUSR T2 ON T1.UserSign = T2.USERID left outer join OCLT T3 ON T1.CntctType = T3.Code left outer join OCLS T4 ON  T1.CntctSbjct = T4.Code where T1.[CntctType] =6 or T1.[CntctType] =7

    This is what I have so far.. it finally produced results but I notice the amount on the Activity + Aging does not match what is on the Aging and that seems to be what the issue is... that was my check to know the report is working. Basically the report should show the aging + any activity associated with the open invoice. The amount on the report is lower than the aging.. I am attaching the aging query  and the aging with activity Query. It looks like something is not joining correctly as the amounts do not match on the balance. Aging Report Declare @d datetime set @d /*Select 1 from jdt1 t where t.duedate*/=[%1] select * from ( SELECT T1.CardCode, T1.CardName, T0.RefDate, T0.Ref1 'Document Number',     CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'           WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'           END AS 'Document Type',     T0.DueDate, (T0.Debit- T0.Credit) 'Balance'     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)=0 and DateDiff(day, T0.DueDate,@d)30 and DateDiff(day, T0.DueDate,@d)60 and DateDiff(day, T0.DueDate,@d)90 and DateDiff(day, T0.DueDate,@d)=121),0) '121+ Days' FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode WHERE  T1.CardType = 'C' ) sub Activity + Aging Declare @d datetime set @d /*Select 1 from jdt1 t where t.duedate*/=[%1] select * from ( SELECT T1.CardCode, T1.CardName, T0.RefDate, T0.Ref1 'Document Number',     CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'           WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'           END AS 'Document Type',     T0.DueDate, (T0.Debit- T0.Credit) 'Balance'     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)=0 and DateDiff(day, T0.DueDate,@d)30 and DateDiff(day, T0.DueDate,@d)60 and DateDiff(day, T0.DueDate,@d)90 and DateDiff(day, T0.DueDate,@d)=121),0) '121+ Days', T6.[FirstName] as 'AP Contact First Name', T6.[LastName] as 'AP Contact Last Name' , T6.[E_MailL], T6.[Notes1] as ' AP Supervisor', T2.[ClgCode],T7.[U_NAME], T4.[Name] as Status, T5.[DocNum], T5.[U_AIS_DVIInvName] as 'SF Invoice Name', (T5.U_AIS_DVISFSO) as 'SO#', T5.[DocDate],T5.Taxdate as 'Month Of Service',T5.[U_AIS_DVIOpptyNm],T5.[U_AIS_DVIAdvNm],T5.[U_AIS_DVIManNm],T5.[U_AIS_DVIAcctNm], T5.[DocTotal], T5.[DocStatus],  T2.[Recontact],  T2.[Details], T2.[Notes], T2.[CntctType], T3.[Name] FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode INNER JOIN OCLG T2 ON T1.CardCode = T2.CardCode INNER JOIN OCLT T3 ON T2.CntctType = T3.Code INNER JOIN OCLS T4 ON T2.CntctSbjct = T4.Code INNER JOIN OINV T5 ON t5.docentry = t2.docentry and  T5.[ObjType]  =  T2.[DocType] left outer join OCPR T6 ON T2.CntctCode = T6.CntctCode left outer JOIN OUSR T7 ON T2.UserSign = T7.USERID WHERE  T1.CardType = 'C' and (T2.[CntctType] =6 or T2.[CntctType] =7) ) sub

  • Time out error in POWL query

    Hello Experts,
    The user selected Purchase Order  ALL and ran the query with wild search, it contains around 40K POs showing in Active query list.  When he wants to access these POs by cliking on hyper link ALL (40451).  Its going to Time out error, because requestor number is missing.
    Kindly throgh some light how to clear this filter.
    Highly appreciated for prompt responses.
    Regards,
    Suneel Kumar

    Hi Poonam Patil,
    Try to provide BELNR and GJAHR in where condition...
    BKPF-DBBLG ==> BSAK-BELNR
    Also check
    BKPF-BLDAT ==> BSAK-AUGDT
    Check out above relation...
    If data is there in these fields of the table and both are matching then you can pass it and as they are in primary key of BSAK it will improve the performance...
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Query with boolean values

    Hi all,
    is it possible to create query which check boolean attributes? If yes, how?
    Thanks,
    Michele

    Hi Michele,
    If you have an attribute (e.g. "Active") of type boolean, then it should be something like:
    QueryExp exp = Query.eq(Query.attr("Active"),Query.value(true));Hope this helps,
    -- daniel
    JMX, SNMP, Java, etc...
    http://blogs.sun.com/jmxetc

Maybe you are looking for

  • Issue with calling Web Services from Adobe Interactive Forms

    Hi, I have created Web Services for remote enabled function module and imported it in the data connection in adobe form. In the adobe form created the button (Drag&Drop from Data Connection) as HTTP submit button. In the submit URL I have given the W

  • Problem sync iTunes+iPod

    According to iTunes, I have 5,15GB of songs in my library. However, iTunes won't allow me to sync them to my iPod touch 8GB, saying I need to clear 3 GB. How do I solve this problem?

  • Songs won't authorize after upgrade to itunes 9

    So, I recently upgraded my os, and then got an iphone and upgraded itunes to 9. I go to play the the album I purchased on before the upgrade, and the computer gives me a message that the computer is not authorized to play it. I haven't put it on more

  • Is there a way to hide...

    ...a "bcc:" in a mailto: link so that when a user clicks the link and their email client window opens, the only pre-filled address they see is the main mailto: recipient?

  • Bottom and right with getwidth or getheight

    I need to get the size of a button in a applet I am building the problem is that when I use Button.getHeight() IE 5.0 throws a java exception. Are there any other ways I can do this? Other then getheight and getwidth.