Customer query

Hey Guys,
I need some help wrting a customer query. I'd like the query to return the customer name, the item that he orders and the total amount he owes. I've already got the joins between the customer name (hz_parties) and the amount owed (ra_customer_trx_all & ar_payment_schedules_all). I'm trying to figure out the join between these two previous tables and the inventory table (mtl_system_item) where I should get the items that were ordered. Can anybody give me a hint on that ?

Hi
can you share your query to calculate the " total amount owed by the customer" till date.
I have to pull up this info on a report and I have little knowledge about the underlying tables.
Thank you in advance
jo

Similar Messages

  • Error in running custom query from jspx(site) for Content Tracker Report

    Hi All,
    I want to generate a custom Content Tracker Report. I am able to do so from Content Tracker console, but when i try to invoke the service 'SCT_GET_DOCUMENT_INFO_ADMIN' or 'SCT_GET_DOCUMENT_INFO' with my custom query(which simply counts the number of rows in a table) from my jspx page, it gives the following error.
    oracle.stellent.wcm.server.request.RequestException: Error
    occurred in Content Server executing service
    'SCT_GET_DOCUMENT_INFO_ADMIN'
    Caused By: oracle.stellent.ridc.protocol.ServiceException: Unable to get
    document info. Unable to execute service method 'sctExecuteQuery'. The
    error was caused by an internally generated issue. The error has been
    logged.
    What could be the reason and the resolution?
    Also, I know that i am invoking the service in the right way as custom report from query as 'select * from users' works fine from site.
    P.S. I am using UCM 11g + SSXA

    Things are turning weird. The below two queries work from jspx.
    1. SELECT * FROM Users
    2. SELECT dname FROM Users
    But, the following query gives error (SQL is correct).
    select dname, count(dname) from users group by dname
    Unable to execute service method 'sctExecuteQuery'. Null pointer is dereferenced.
    $Unable to get document info.!csUnableToExecMethod,sctExecuteQuery!syNullPointerException
    intradoc.common.ServiceException: !$Unable to get document info.!csUnableToExecMethod,sctExecuteQuery
    *ScriptStack SCT_GET_DOCUMENT_INFO_ADMIN
    3:sctExecuteQuery,**no captured values**
    at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
    at intradoc.server.Service.buildServiceException(Service.java:2260)
    at intradoc.server.Service.createServiceExceptionEx(Service.java:2254)
    at intradoc.server.Service.createServiceException(Service.java:2249)
    at intradoc.server.Service.doCodeEx(Service.java:584)
    at intradoc.server.Service.doCode(Service.java:505)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
    at intradoc.server.Service.doAction(Service.java:477)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
    at intradoc.server.Service.doActions(Service.java:472)
    at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)
    at intradoc.server.Service.executeActions(Service.java:458)
    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)
    at intradoc.server.Service.doRequest(Service.java:1890)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:435)
    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
    at intradoc.util.IdcConcurrentHashMap.get(IdcConcurrentHashMap.java:60)
    This works fine from Content Tracker UI.
    Anyone has any idea, what could be the issue here?

  • Add custom query to standard PLD layout

    Hi Everybody,
    I need to change the standard Invoice PLD report, in order to include additional data that is
    kept in my UDO.
    Is it possible to define a custom query inside PLD to retrieve data from the UDO
    (the UDO is linked to the Invoice) and show it in the Invoice layout?
    Thanks all,
    Manuel Dias

    Hi Manuel,
    One workaround you can try is to use UDF and formatted search to retrive the info on the invoice screen and then directly display it on the invoice PLD.
    Hope it helps.
    Regards,
    Hamsa

  • How to find Tables behind a Custom Query in SAP

    Hi Gurus,
    Can anyone please help me find tables behind a custom query in SAP.
    Regards
    As

    Hi
    Check the name of the programm assigned to transaction, it should be like this:
    AQZZ<user group>=======<query name>======
    or
    AQIC<user group>=======<query name>======
    It depends of the query area is global or cross-client
    So run SQ01, select the quey area, select the quey group and so your query: now you can see the infoset and then you see it by SQ02 transaction
    Max

  • Can I use custom query in DB Adapter with Polling

    Hi All,
    I am getting problem while using db adapter with polling. Can I use custom query in db adapter with polling.
    I am using 2 tables; table 1 and table2
    Structure of table1 is as:
    File_name
    Batch_id
    Creation_date
    Status
    Structure of table2 is as:
    Batch_id
    Employee_ID
    Last_Name
    First_Name
    Middle_Name
    Group_ID
    Site_ID
    Dept_Num
    Report_id
    I have to use below query while polling to table1
    Select count(*) as NOSEXP, Report_id
    from table1, table2
    where table2.batch_id =
    table2.batch_id
    and table1.Status= 0
    group by Report_id;
    I mean, when I use DB adapter to poll table1, I have to use above query.
    Can you Please suggest on this.
    Thanks in advance.

    I will check for existance not based on Primary key but based on three other fields in the table. I think , by default DB adapter configured for MERGE checks for existance based on PK. Can we change the Primary Key in the mapping file after the DB adapter is configured. In that case , will it check for existance based on the fields , I mention.
    Edited by: user12020809 on Sep 16, 2012 6:08 PM

  • Custom query conditions in db adapter

    Hello,
    How to execute custom query in bpel db adapter?
    For example :
    1. select * from employee where status = 'N' and address is not null
    2. select * from empoyee where substatus = 'Y' and phone is null
    after where keyword - query part is dynamic, parameter combinations and count is unlimited ( depends on business logic ). It is not possible to implement each condition parameter as parameter in db adapter configuration.
    Db adatper query has to be something like  : select * from employee where #condition# , but #condtion# need to be interpretated as condition not string with quotes..
    best Regards,
    Uldis

    Say your complete query looks like this -
    select SUBJECT_NAME from RELATION
                where PID_GID_SSID IN (select PARTY_KEY from  xref WHERE row_id='123')
    1). In assign activity, write out the query part which comes after where clause and assign to variable query
    (select PARTY_KEY from  xref WHERE row_id='123') , replace the value of row_id from input value in assign.
    2. Now open DB adapter and pass the rest of query as input -
    select SUBJECT_NAME from RELATION
                where PID_GID_SSID IN #query

  • SCCM Custom Query

    Hello,
    I am looking for a 2007 SCCM custom query that will look for KB2964358 installed. My trouble lies when I specify the below query to see if an update is installed, and it only returns XP computers since it is looking for the ADD Remove Programs feature.
    ConfigMgr is not collecting the list of Software Updates (patches) for Window 7/Vista/ 2008/ 2008 Core operating systems. Because, on these operating systems this information is stored
    in “Win32_QuickFixEngineering”  WMI class (it’s not listed in Add Remove Programs) and the inventory of this class is NOT enabled in SMS_DEF.MOF (by def ault). Hence ConfigMgr. report won’t be able to provide these details unless and until you’ve enabled
    the appropriate WMI class in SMS_DEF.MOF. Is there any other way to look for an update installed in custom queries that will return Windows 7 machines as well?
    SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID
    = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%KB2964358%"

    Hi,
    take a look at the article below to extend the SMS_DEF.mof file to include the WMI class.
    http://technet.microsoft.com/en-us/library/cc180866.aspx
    Blog: http://theinfraguys.com
    Follow me at Facebook
    The Infra Guys Facebook Page
    Please remember to click Mark as Answer on the answer if it helps you in anyway

  • Custom Query modified/Altered By BO

    Hi All,
        I am facing a strange behavior in Info view of WEB XI 3.1. I have 4 cross tabs in my report & has written a custom query using full outer join for the fourth cross tab with Year, Month & URL as Filter. I ran the queries & it gave me accurate results. I refreshed my report at least 7 times & i did not face any issue but when i refreshed the report by changing the URL for which i need to see the data i get some different results. 1st 3 cross tabs give me accurate result but the 4th gives me inaccurate result. When i clicked on edit query to check the SQL of the 4th Cross tab my custom query no longer remained custom query it was turned to a BO generated query. I don't understand why this strange behavior happened.
         Can any one please let me know as to why this happens.
    Thank You

    Mohd,
    by changing the URL for which i need to see the data i get some different results.
    Did you perform this activity back in Edit Query? 
    my custom query no longer remained custom query it was turned to a BO generated query
    If you modify your query on the Edit Query screen (either by removing or adding objects to Results Object panel or adding/deleting objects in the Filters) you will cause the app to revert back to the default query (e.g. lose your custom code).
    Thanks,
    John

  • Fetch current Quarter and pass it to custom query

    Hi
    I need to pass the current date and find the quarter in which the date falls.
    The start and end date of the quarter need to be passed as a query parameter, in a custom query in UI designer.
    My query is as follows
    As shown in above screenshot,I have close_dt_upd(datatype Date).This field should have end date of the quarter as a condition.
    Similarly I will have a field start_date which should have Start date of the quarter as condition.
    I got the following table in 1402 documentation.
    But the above transformation rule is not visible in  the query.
    Can anyone tell which namespace to use?
    How can I retrieve the current quarter start and end dates, and then pass them  to the above query?
    Thanks,
    Vijaya Chavan

    Hi,
    the most easiest and straight forward approach is
    - Ckick the "Binding" tab at the bottom of the Visual Editor
    - In the Bindings section click teh green plus icon and choose Generic Bindings | Attribute Value
    - point the iterator selection to the iterator used by the table
    - choose the column's attribute name from the list of attributes
    - Create a method on the ApplicatioNModule IMPL class (should take single argument)
    - expose it as a client interfaces so it shows in the Data Controls panel
    - In the "Binding" tab, create a method binding for this exposed method
    - point the method binding argument to #{bindings.column-attribute-name.inptValue}
    So whenever you need to pass the value on to the AM, you just call the method binding
    OperationBinding oper = (OperationBinding) bindings.get("name of method");
    oper.execute();
    Frank

  • Configure custom query group in navigation menu

    How do we configure custom query groups? Say for example: I have created a custom query group and added my custom query definitions to it. How do I configure this so that when I click on Contract Management Tab on the workbench, my custom query group is invoked?
    I need to configure custom query group in navigation menu. Any help would be appreciated.
    Regards,
    Bindu Sharma

    Hi Bindu,
    As per my understanding, it is standard and query group cannot be added in the navigation but you can add your quries under Agreement and Claus Library.
    Kindly refer the blog for the same: http://scn.sap.com/docs/DOC-55733
    Let me know if you need any other information.
    Thanks,
    Kushagra A

  • Max customized query length

    Hi all,
    anyone knows if it's possible to extend the maximum length (it seems to be 210 chars) of the data-block mask for customized query? I mean that mask Forms displays when, in enter-query mode, you use '&' to insert particular query conditions.
    Thanks,
    Marco

    I'm not sure.
    But one option is to build this mechanism on your own. Just popup a window to get the where clause and then use set_block_property(default_where) to attach it to the block.

  • Schedule Export Processes with Custom Query

    Hi,
    Can I use Schedule Export Processes, with a custom query over HZ_PARTIES and HZ_LOCATIONS, in order to export suppliers data in a specific field order with join conditions?
    I used Schedule Export Processes with "PARTY", selecting proper fields, but exported csv is in a different field order than the required by an external system.
    Thanks,
    Erick.

    Can you elaborate on the issue here. Are you looking for a way to run "ad-hoc" SQL queries for the filters ? I do not think that is possible, depending on your environment you may be able to create a custom view object to match your requirements.
    As for the orders I think you should be able to control the order using the sequence as the FAQs state:
    What happens if I change the sequence number or header text?
    Changing the sequence number changes the order of the attributes in the exported data file. Changing the header text enables you to give a more intuitive meaning to the attribute and the associated data.
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • Assinging a custom infoset to a custom query

    I have copied a production sapquery to a custom query to make modifications. i have also created a custom infoset. when I look at my custom query inSQ01, it displays the production infoset. I cannot find where or how to change my custom query to point to my custom infoset? If someone could please let me know if I missed a step in the creation of either the infoset or the sapquery which is causing this.
    thanks in advance for your help

    I think you have to recreate the query from scratch in order to tied the new infoset.
    Regards,
    Rich Heilman

  • Use custom query script webi

    Hello,
    I have created an SQL query to MS SQL Server. I want this query to run for my results at webi reports. When I copy this query, I validate it without errors, but afer saving it, the webi losses it and has the query created by the tool. How can I make the webi run this custom query?
    Thanks

    What is your BO version ?
    Did you check the below SAP KBAs ?
    1761949 - Custom SQL is being lost when editing Webi document
    1812889 - Custom SQL dissapears and reverts to the generated SQL after cancelling the prompt window when refreshing a WebIntelligence report

  • Custom query button in form

    Hi there,
    I want to create custom query button in a Portal Application form component in 3.0.9. How do I do this? I need to perform a restricted where clause query, therefore the default doQuery option is not sufficient.
    Thanks in advance.
    John

    Hi John,
    You can add a new button from the "Formatting and Validation " section by clicking on the FORM+ at the top of all the table fields.You can not do your own where clause as the query is made which includes all the columns of the form as shown on the form .
    for your own queries what you van do is that you can leave the field blank if you do not want that field to be added in the where clause.If you want to add the field to the where clause you can use operators (against each field in there text boxes) to make your own where clause.More operators support are supported in the
    latest version.
    Hope this give you some Information regarding your doubt.
    rahul

Maybe you are looking for

  • Why is my search bar not working?

    I'm running Firefox 8.0 on Windows 7. Recently, my search bar (the one with Google, YouTube, Amazon, etc.) has stopped working: if I enter a search string, it does not load a results page, it just spins and says "Connecting..." forever - this happens

  • Just update to 10.6.3 and NWN2 no longer works.

    Alright I updated to the latest operating system and suddenly when ever I try and load a game, start a new game in Neverwinter Nights 2 the game crashes to the desktop. I checked and the update didn't screw with any permissions I can find and I even

  • OIM 11g: Error After starting OIM server :retrieving database connection

    Hi All, After patching OIM 11.1.1.5.0 to BP02 I am getting following error in logs of OIM and not able to see Import Deployment Manager File and..continuously this error bounce back Error <Error> <XELLERATE.DATABASE> <BEA-000000> <Class/Method: DBPoo

  • SB Live! 5.1 how to connect with my HiFi-Syst

    Hey, I want to connect my Soundblaster Li've! 5. with my amplifier. The amplifier is connected to two stereo loudspeaker. It?s kind of an old amplifier with DIN connections, so I have to use a Cinch to DIN adapter. But the adapter has two cinch cable

  • Center JComboBox in BoxLayout

    I try to center a single JComboBox in a JPanel with BoxLayout. But it is still left aligned. I use: jpanel.setLayout(new BoxLayout(jpanel,BoxLayout.X_AXIS)); ...add(jpanel); jcombo.setAlignmentX(0.5F); jpanel.add(jcombo); What is missing?