Data Query combining GL, AP & AR

Hi Guys,
I work in a support project and having a hard time for finding the solution for the following request. Please help:
"The information requested is as follows: - Number of GL entries per period - Number of manual GL entries per period - Number of GL entries done during the closing period (days 1, 2, and 3, or 1 and 2 for LA) - Number of A/P invoices processed (total number of invoices and total number of lines in the A/P invoices) - Number of A/P payments processed (could we also capture the type of payment: check, electronic transfer) - Number of manual A/R entries (manual invoices, other manual entries like reclassification of balances, etc). - Number of credit notes raised - Number of cash application entries (can we distinguish manual and automated) - Number of users in each module (we are looking for actual users of the system). The fields I believe I need to satisfy this request are: For GL: GL posting date, posting period, company, batch id, number of records in batch, manual jnl/system jnl flag For AP: GL posting date, posting period, company, invoice/credit/payment id, number of distribution lines, transaction type For AR: GL posting date, posting period, company, invoice/credit/receipt id, number of distribution lines, transaction type method of payment"
Regards,
Ranjith

Hello.
select b.posted_date pdate,
h.period_name period,
sob.name company,
decode (l.reference_9, 'TRADE_REC', 'Receipt 1st Aplication',
'TRADE_UNID', 'Unidentified Receipt',
'TRADE_UNAPP', 'Receipt Unaplication',
'MISC_REMITTANCE', 'Miscellaneous Receipt',
'MISC_MISCCASH', 'Misc Receipt Distribution',
'TRADE_ACC', 'On Account Receipt',
'TRADE_REMITTANCE', 'Remmited Receipt',
'CMAPP_REC', 'Credit Memo',
'CCURR_REC', 'Receipt Aplication',
'CCURR_CURR_ROUND', 'Receipt App Rounding',
'INV_REC', 'Invoice Receivable',
'INV_TAX', 'Invoice Tax',
'INV_REV', 'Invoice Revenue') Event,
count(l.je_line_num) num_lines,
h.je_category trx_type
from gl_je_batches b,
gl_je_headers h,
gl_sets_of_books sob,
gl_je_lines l
where h.je_header_id = l.je_header_id
and b.je_batch_id = h.je_batch_id
and b.set_of_books_id = sob.set_of_books_id
and h.je_source = 'Receivables'
and h.period_name = <your period_name>
group by b.posted_date, h.period_name, sob.name, h.je_category, h.je_source, l.reference_2,decode (l.reference_9, 'TRADE_REC', 'Receipt 1st Aplication',
'TRADE_UNID', 'Unidentified Receipt',
'TRADE_UNAPP', 'Receipt Unaplication',
'MISC_REMITTANCE', 'Miscellaneous Receipt',
'MISC_MISCCASH', 'Misc Receipt Distribution',
'TRADE_ACC', 'On Account Receipt',
'TRADE_REMITTANCE', 'Remmited Receipt',
'CMAPP_REC', 'Credit Memo',
'CCURR_REC', 'Receipt Aplication',
'CCURR_CURR_ROUND', 'Receipt App Rounding',
'INV_REC', 'Invoice Receivable',
'INV_TAX', 'Invoice Tax',
'INV_REV', 'Invoice Revenue')
To get the id is very tricky...

Similar Messages

  • Data Query combining AP, AR & GL

    Hi Guys,
    Can anyone give a solution for this please. This is a ticket pending with me and i am confused with this request. Please Help:
    "The information requested is as follows: - Number of GL entries per period - Number of manual GL entries per period - Number of GL entries done during the closing period (days 1, 2, and 3, or 1 and 2 for LA) - Number of A/P invoices processed (total number of invoices and total number of lines in the A/P invoices) - Number of A/P payments processed (could we also capture the type of payment: check, electronic transfer) - Number of manual A/R entries (manual invoices, other manual entries like reclassification of balances, etc). - Number of credit notes raised - Number of cash application entries (can we distinguish manual and automated) - Number of users in each module (we are looking for actual users of the system). The fields I believe I need to satisfy this request are: For GL: GL posting date, posting period, company, batch id, number of records in batch, manual jnl/system jnl flag For AP: GL posting date, posting period, company, invoice/credit/payment id, number of distribution lines, transaction type For AR: GL posting date, posting period, company, invoice/credit/receipt id, number of distribution lines, transaction type method of payment."
    Regards,
    Ranjith

    Use the reference columns i.e REFERENCE_1 to REFERENCE_10 of gl_je_lines table to join the AP, AR tables with the GL tables like the below query.
    SELECT gjl.reference_1,
    gjl.reference_2,
    gjl.reference_4,
    gjl.reference_5,
                        gjl.reference_10,
    aia.doc_sequence_value,
    aia.invoice_type_lookup_code,
    aia.description invoice_description,
    ada.prepay_distribution_id,
    gjl.description,
    aca.doc_sequence_value payment_doc_seq_number,
                        ada.invoice_id,
    aia.doc_sequence_value
    FROM gl.gl_je_headers gjh,
              gl.gl_je_lines gjl,
    ap.ap_checks_all aca,
    ap.ap_invoices_all aia,
    ap.ap_invoice_distributions_all ada
    WHERE gjl.je_header_id = gjh.je_header_id
    AND aia.invoice_id(+) = gjl.reference_2
    AND ada.invoice_id(+) = gjl.reference_2
    AND ada.invoice_id(+) = gjl.reference_3
    AND aca.check_id(+) = gjl.reference_3;
    Thanks,
    Lokesh.

  • JSP Data Query tag and case sensistivity

    Hello,
    When using BC4J Data Query tag in JSP apps how to make queries case INSENSITIVE? I undestand that string comparison in Oracle is case sensiteve and hence my dynamic query will be also. However, I would like to do something like
    select * from bla
    where upper(attribute) = upper(string) where the string is from the JSP query form entered by user.
    rade

    Use a standard INPUT tag combined with the DataValue tag. This will allow you to control the input tag while still getting the data from a BC4J attribute.

  • Detail differentiation between add query,combined query and sub query

    HI
    I would like to know the detail differentiation between add query,combined query and sub query with  universe
    correct me if I a wrong
    Add query : adding of different query from different universe and also with in same universe.
    Combined query : combining query using operators(Union,intersection,minus)with in same universe.
    Sub query :getting results from the sub query and the result serves as the data for main  query within same universe.

    Hi,
    I would advise you to check the product documentation under http://help.sap.com/
    regards
    Steph

  • How to read a data file combining strings and data

    Hello,
    I'm having a data file combining strings and datas to read. I'm trying to read the filename, time, constants and comments into four seperate string indicators (the lines for the comments varies for different files). And read the data into a 2-D numeric array. How can I do this? Is there any function that can serch special characters in the spreadsheet file so I can exactly locate where I should start reading the specific data. The following is how the data file appears. Thank you very much.
    Best,
    Richard
    filename.dat
    14:59:00 12/31/2009
    Sample = 2451
    Frequency = 300, Wait time = 2500
    Temperature = 20
    some comments
    some comments
    some comments
    some comments
    some comments
    7.0000E+2    1.5810E-5
    7.0050E+2    1.5400E-5
    7.0100E+2    1.5500E-5
    7.0150E+2    1.5180E-5
    Message Edited by Richard1017 on 10-02-2009 03:10 PM
    Solved!
    Go to Solution.

    Hi,
         I'm fairly new to the NI forums too and I think you just have to wait longer.  Your post was done right.  I do a similiar function as to what you are talking about except I read in numbers from a file.  I create an ini file (just a notepad file of type *.ini) that is is set up with sections inside brackets [] and keys with whatever name followed by an = sign.  You may be able to use a *.dat file too, I just haven't.  Then the vi attached goes to that file and reads the keys from those sections.  You just repeat for the different sections and keys you want to read.  You can use similar provide VI's to write to that same file or create it.  Let me know how that works. 
    Attachments:
    Help1.ini ‏1 KB
    Help1.vi ‏10 KB

  • How can I use FK description in a BC4J data query component?

    Hi all,
    I am facing the following problem.
    Although I use renderers in the DataEdit component for displaying the descriptions of the FKs this is not useful for the BC4J data query components.
    How can I get the same functionality as in the dataEdit components?
    Thanks in advance,
    Aggelos

    Anfortunately,
    This is not the same when I have a DataQuery component.
    The question now becomes as following:
    How can I use FK description in a BC4J data query component?
    Thanks in advance
    Aggelos

  • Lowest value from 2 date fields combined

    Morning!
    Need a way to combine two separate date fields to determine the lowest combined value. The idea being finding an empno's overall seniority by looking at seniority date and birthdate, birthdate settles the tie in the event two empno's have the same seniority date.
    Can't find a way to do this using two date fields, only a single date field.
    I also need a way to continue finding the next empno in seniority after that, and so on. Need to increment some value or get the nextval somehow to find the next highest in seniority until the entire table has been reviewed.
    Thanks folks.

    Hey Thanks!!
    Table= Requests
    Fields: Empno, LastNme, FirstNme, Seniority_DT, Birth_DT,ReqDate,ReqTime,ChoiceNum
    Field values: vchar, vchar, vchar, date,date,date,date-time,vchar
    Examples in above order: 36525,smith,bob,08-jun-80,23-sep-60,15-mar-10,14:00,1
    The idea is that we assign (1) single day per month per employee of overtime based on seniority, and in case of a tie the birthdate settles seniority. Employees make more than one request per month so their empno appears in the table multiple times. Also a single empno can ask for one of two start times per requested day. At most, a single employee can make requests for any one of (12) days per month, on days Sun-Thu they can ask for one of (2) start times and on Fri-Sat they can ask for one of 3 start times. The "choice" field lets them indicate start time in order of preference.
    On each day on each start time, (2) different people work together, so for days 1-5 there are (2) shifts of (2) people each, total of (4) people assigned per day 1-5 and (6) people assigned on days 6-7.
    The needed output is that for Sunday-Thursday (2) people start at 14:00 and another (2) start at 18:00.
    On Friday-Saturday (2) people start at 14:00, (2) people start at 18:00 and (2) people start at 20:00.
    The idea for the report would be:
    Saturday, 13 March 2010
    1400 Bob Smith, Seniority Date
    1400 Ted Jones, Seniority Date
    1800 Tom Williams, Seniority Date
    1800 Karen Hu, Seniority Date
    2000 Mike Smith, Seniority Date
    2000 Jim Thomas, Seniority Date
    Sunday, 14 March 2010
    1400 Ed Davis, Seniority Date
    1400 Ron Thomas, Seniority Date
    1800 Tiger Woods, Seniority Date
    1800 Joe Davis, Seniority Date
    Each person may only work one day per month. In the event that there is a hole where no one put a request in, we need to go back over the remaining requests to fill them in. The original idea was to do this by:
    All choice #1 first, then start over looking at choice #2 and so on until all the days in the upcoming month are full.
    That's about the best I can explain it. The only way I can see is to do it by seniority and choice# then go around again if there's a hole. I just can't figure out how to look at both the seniority date and birthdate to ensure seniority nor can I figure the logic necessary to find the person, check if the spot is available and assign him or if not go to his next preference for that day and check if it's available and then continue to the next guy.
    It may have been simpler to explain the need in detail and ask that the structure and code be done from scratch but that's asking way too much so I thought I'd ask how to solve this problem and keep working on it from there.
    Thanks in advance again!
    ps... Haven't started the coding yet.... just need the code to accomplish finding seniority based on two date fields combined, then I'll start coding the entire thing.
    Edited by: user9320509 on Mar 10, 2010 5:33 AM

  • Hierarchical Tree Data Query/Record Group Question

    I need help with Hierarchical Forms right now. I'm currently trying to implement a hierarchical tree to display the different items in different categories. I have been reading up on it for the past few days, and i do not understand a few things.
    What is the difference between a data query and record group? they seem the same to me.
    How does the XX = prior XXX work? i understand that this is what connects the parent to the child.
    How do you determine what depth the node is? its done in the record group/data query, but how do i decide what level it is dynamically?
    Thanks a lot in advance!

    Thanks! I am unable to create a table specifically for the tree because i am using tables that have been ported live and are in use. My question about levels is how do I know which depth the node is. For example, i have a category called Information Technology and a category item called Business Informatics. I want to know how to decide that the Category(information technology) is on level 1 and the Item(business informatics) is on level 2.
    Information Technology
    |_
    Business Informatics
    And i do know how the Connect By XX = prior XXX works in the data query/record group.
    Thanks for your help!

  • Date Query for SimpleDateFormat

    HI,
    I’m trying to create a Toplink query for Date. Toplink always generates the date query in the following format for my Oracle DB:
    1.     If I pass the value new Date() in then it generates
    to_date('2005-01-05 30368','yyyy-mm-dd sssss')
    2.     If I use SimpleDateFormat with the format “yyyy/mm/dd" it creates
    to_date('2007-07-05 0','yyyy-mm-dd sssss')
    What is the value that comes after the day (30368 and 0) in each query?
    How can I make the Toplink to generate date without the time component? Preferably if there is a way for toplink to generate the date based on the Java SimpleDateFormat that would be good.
    Thanks
    -Mani

    The DATE type in Oracle stores both a date and time. The 0/30368 is the time in seconds sssss, 0 means no time. You should not have any issue with this format, what are you trying to do?

  • Date query problem

    Hi,
    On a report I'm trying to do a date query:
    select * from table v
    where ..........
    and ( to_date(v.fecha_inicio, 'dd/mm/yyyy')
    between nvl(to_date(:P_BEGIN, 'dd/mm/yyyy'),
    to_date('01/01/0001', 'dd/mm/yyyy'))
    and nvl(to_date(:P_END, 'dd/mm/yyyy'),
    to_date('31/12/9999', 'dd/mm/yyyy')) )
    and could not get the right data (return no rows), I though it was a problem with my itmes so changed the item reference for the actual values:
    select * from table v
    where ..........
    and ( to_date(v.begin_date, 'dd/mm/yyyy')
    between nvl(to_date('01/10/2006', 'dd/mm/yyyy'),
    to_date('01/01/0001', 'dd/mm/yyyy'))
    and nvl(to_date('31/10/2006', 'dd/mm/yyyy'),
    to_date('31/12/9999', 'dd/mm/yyyy')) )
    and the result is the same.
    If change to
    and (to_char(v.fecha_inicio, 'dd/mm/yyyy')
    between nvl(to_date('01/10/2006', 'dd/mm/yyyy'), to_date('01/01/0001', 'dd/mm/yyyy') )
    and nvl(to_date('31/10/2006', 'dd/mm/yyyy'), to_date('31/12/9999', 'dd/mm/yyyy') ) )
    Sends a not a valid month error but if run the same query on sqldeveloper it works right.
    My question is why I could not get the right data on apex ?
    Thanks you

    I made the changes and is the same thing, no rows returned. If I try to evaluate between or > < is the same.
    I tried
    AND (to_char(v.fecha_inicio, 'yyyy') = '2006' )
    AND (to_char(v.fecha_inicio, 'mm') = '11' )
    And is the only thing I found that works !!!
    So I'm thinking to change my conditions so select a month and year to show. Don't think my user will be happy but for the moment ......
    Thanks

  • HFR - Data Query Optimization Settings

    hi
    In HFR, in a grid there are Data Query Optimization Settings, can you please help me on the settings property.
    Our report fetches data using lot of attributes. When we don't use MDX setting, it fetches very fast, but the alias doesn't come.
    However, when we use MDX setting, the alias comes, but the report takes lot of time to run(approx 1 min / row of data fetched)
    Can you please guide on the same.
    Thanks

    pm wrote:
    Hi ,
    I am working on below query optimization/Tuning.
    SELECT
    c_date,
    c1,
    c2,
    c3,
    c4,
    c5,
    c6
    FROM tab1
    WHERE
    ROWNUM <= &param
    AND ( c_date BETWEEN &date1 AND &date2 )
    AND c3 in (
    select c3
    from tab2
    where xxx='abc')
    ORDER BY c1, c_date;
    Note : &param,&date1 ,&date2 are parameters runtime getting from UI code .
    tab1 having huge data around 10lacs to crores. and it has range partition on c_date column and subpartiotion on c1 column.
    To get best throughput in less time, what i need to do ?
    Please do let me know steps to tune/optimize the sql query.Also which hint we can use on sql query to better results.
    Thanks in advanced.
    PMBefore you start worrying about performance tuning you should worry about the query being incorrect.
             WHERE
                 ROWNUM <= &param
                 AND   ( c_date BETWEEN &date1 AND &date2 )
                 AND c3 in (
                                             select c3
                                             from tab2
                                             where xxx='abc')
             ORDER BY c1, c_date;Presumably you want to limit the number of rows with the ROWNUM predicate AFTER the ORDER BY clause is applied.
    Please read this and learn how queries are actually processed, I can almost guarantee you this query is not doing what you think it is doing at present.
    http://www.oracle.com/technetwork/issue-archive/2006/06-sep/o56asktom-086197.html
    Cheers,

  • IQ data from combined satellites

    Hi,
       I am working on the GPS toolkits, and I would like to know:
     How is the IQ data from several satellites combined and where does this process take place?
    Regards,
    Arpi 

    Hello Arpi,
    The IQ data from several satellites
    is comibed using the GPS standard.  All the details on how the IQ data
    is combined is available within this standard.  We simply implement the
    standard within our GPS toolkit vi's in the niGPS Write Waveform To
    File.vi example.  Unfortunately, the details of how our VI is coded is
    proprietary.  Please let me know if you have anymore questions and I
    will do my best to assist with the information that I can provide.
    Regards,Paul C.

  • BETWEEN DATE Query help

    Dear Experts, I am new to PL/SQL and need your expert advice and help on below query,
    SELECT * FROM SCHEMA.TABLE
    WHERE DATETIME BETWEEN (TO_DATE('SYSDATE-1 07:00:01','MM/DD/YYYY, HH24:MI:SS')) AND (TO_DATE('SYSDATE-1 14:59:59','MM/DD/YYYY, HH24:MI:SS'));
    I want to automate above query which will select yesterday data from mentioned starttime (07:00:01) to endtime (14:59:59).
    Please help.
    BR,

    Hi,
    DBA wrote:
    I am using below duration in between to get a complete day duration data (of yesterday),
    DTIME BETWEEN TRUNC(SYSDATE-1) + 0/24 + 1/12/60/60 AND TRUNC(SYSDATE-1) + 23/24 + 1799/12/60/60
    Is it valid for a complete one day duration (of yesterday)?
    Please help in clarifying this confusion.
    Bundle of thanks!If you have to ask, then that means it will be hard to debug and maintain.
    Here's a simpler way to find rows where dttime is after 7:00 AM yesterday, but before 3:00 PM yesterday:
    WHERE     dtime     >  TRUNC (SYSDATE - 1) + ( 7 / 24)
    AND     dtime     <  TRUNC (SYSDATE - 1) + (15 / 24)This will pick rows where dtime is as little as 1 second after 7:00 AM, but not 7:00 AM itself. If you want to include 7:00:00 exactly, change the > to >=.

  • Not able to show data in combination chart

    Hi Experts,
    I am new to BO Design studio and I am facing some issues in beginning itself. My issue is, I have 12 months data for some KPI's and I need to show two KPI's values in a single chart(Combination or Dual axis).
    In Initial view I have selected needed KPI's and measures
    once inserted chart, in data selection I have selected only those two KPI's which i want to show in chart but when i select 2nd KPI's measures I am getting following error.
    Am I doing in right way? Is there any other way to show two KPI's measures in combination chart?
    Please help
    Regards,
    Mathivanan.M

    What type of object is Vendor_KPI in your screen shot?  Is it a measure?
    Separately it looks like some fixes are planned for Design Studio 1.3, planned for end of May (roughly) - this is what we heard last week.  See http://service.sap.com/sap/support/notes/1979823

  • Timeout Short Dump on a Data Query to a blank table.

    Hi,
    My program gives a short dump on quering a blank table. The dump says timeout.
    what could the possible problem be.
    regards,

    Runtime Error          TIME_OUT                                                       
           Occurred on     02/19/2009 at   10:35:35                                                                               
    Time limit exceeded.                                                                               
    What happened?                                                                               
    The program "SAPLE31C" has exceeded the maximum permitted runtime without             
    interruption, and has therefore been terminated.                                                                               
    What can you do?                                                                               
    Print out the error message (using the "Print" function)                              
    and make a note of the actions and input that caused the                              
    error.                                                                               
    To resolve the problem, contact your SAP system administrator.                        
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer              
    termination messages, especially those beyond their normal deletion                  
    date.                                                                               
    Error analysis                                                                               
    After a certain length of time, the program is terminated. In the case                
    of a work area, this means that                                                       
    - endless loops (DO, WHILE, ...),                                                     
    - database accesses producing an excessively large result set,                        
    - database accesses without a suitable index (full table scan)                                                                               
    do not block the processing for too long.                                                                               
    The system profile "rdisp/max_wprun_time" contains the maximum runtime of a
    program. The                                                              
    current setting is 5400 seconds. Once this time limit has been exceeded,   
    the system tries to terminate any SQL statements that are currently        
    being executed and tells the ABAP processor to terminate the current       
    program. Then it waits for a maximum of 60 seconds. If the program is      
    still active, the work process is restarted.                                                                               
    successfully processed, the system gives it another 5400 seconds.          
    Hence the maximum runtime of a program is at least twice the value of      
    the system profile parameter "rdisp/max_wprun_time".                                                                               
    How to correct the error                                                                               
    You should usually execute long-running programs as batch jobs.            
    If this is not possible, increase the system profile parameter             
    "rdisp/max_wprun_time".                                                                               
    Depending on the cause of the error, you may have to take one of the       
    following measures:                                                        
    - Endless loop: Correct program;                                           
    - Dataset resulting from database access is too large:                     
      Instead of "SELECT * ... ENDSELECT", use "SELECT * INTO internal table   
      (for example);                                                           
    - Database has an unsuitable index: Check index generation.                                                                               
    You may able to find an interim solution to the problem                    
    ~~~~~~~
    The line to which it points is a select query on a table that has not records.

Maybe you are looking for

  • 17" iMac (1.6Ghz PPC) can use Ram with Heat Spreader?

    Hello There Apple Community, i have a vintage 17" PPC iMac, it support 2GB of max ram., here in my country those memories are hard to find, the ones i found, there are DDR 1GB 400Mhz which is the right one, BUT they have "Heat Spreader" can i use the

  • I want to control the front panel of a lab View program with C code??

    I want to be able to run lab View via Corba. So I need some way to control my lab Vew programs with C code. I really hope this is enough INFO.

  • Change Tax Jurisdiction code (TXJCD) in Cost Center Master Data

    Hi There, We have a problem of making change to Tax Jurisdiction Code in Cost Center Master Data. We are on ECC 6.0 with Vertex system as external tax system. When we create Cost center, system automatically derive tax jurisdiction code from vertex)

  • NO AUDIO ON PLAYBACK

    Hi everyone, I'm having a really serious issue. I've got no audio when playing back my files. I've locked tracks. I've muted tracks. I've converted midi files to real instrument files. I've adjusted settings in preferences to maximize for playback. Y

  • .vbs to disable firewall based on OS

    I need to determine OS and disable firewall accordingly.  Windows xp works, however HNetCFg.FwMgr  does not work on Vista or 7 - oh and GPO is not an option - any help much appreciated.  (ignore msgbox as i was simply testing) Set objWshShell = WScri