Open item in query

I have a request for a query that displays open customer documents :
Selection customer number and date range 01.01.2008 to 31.12.2008
and return in columns : sum of open items amounts on 01.01.2008, sum of open items amoutns on 02.01.2009.... sum of open items amounts on 31.12.2008....
For a given date D this is simple : documents where postingDate <= D < clearingDate.
But how to do it for the full range ??
Please help !

Hi
Please try below query
select
distinct c.segment1
from
po_lines_all a,
po_line_locations_all b,
mtl_system_items_b c
where
a.po_line_id= b.po_line_id
and a.item_id=c.inventory_item_id
and b.closed_code='OPEN'
and a.item_id in ( select 
item_id
from
po_lines_all d,
po_line_locations_all e,
mtl_system_items_b f
where
d.po_line_id= e.po_line_id
and d.item_id=f.inventory_item_id
and e.closed_code in ('CLOSED','FINALLY CLOSED','CLOSED FOR INVOICE','CLOSED FOR RECEIVING'));

Similar Messages

  • Open Items List Query.

    Hi all,
    Could you please advise if itu2019s possible to run a query in SAP based on the Open Items List in the reporting area that can detail the following;
    Both AR Invoices and Credit Notes and show additional fields, taken from the AR invoice u2013 Account Manager, Item Group and Project Code?
    The  Project Code and Item Group can be taken from the Item Line however the Account Manager field is located below the item line area on the contents tab.
    Would someone have a query which might enable us to do this or at least give us a directing to go in ?
    Thank you,
    MB

    Hi Matthew,
    You can try this one.
    It will check if the document is open on document level. The query is written so that it will give a result for every line in the document so you might have a problem if there are many line per document. For the account manager I used Sales person, I am not sure if that is what you mean.
    select
    'AR Invoice'+' '+(convert(varchar (10), t0.docnum)) as 'Document',
    (select t7.slpname from oslp t7 where t7.slpcode = t0.slpcode) as 'Account Manager',
    (select itmsgrpnam from oitm t5 inner join oitb t6 on t5.itmsgrpcod = t6.itmsgrpcod
    where t5.itemcode = t1.itemcode) as 'Item Group',
    t1.project
    from
    oinv t0 inner join inv1 t1 on t0.docentry = t1.docentry
    where t0.docstatus = 'o'
    union
    select
    'AR Credit'+' '+(convert(varchar (10), t0.docnum)) as 'Document',
    (select t7.slpname from oslp t7 where t7.slpcode = t0.slpcode) as 'Account Manager',
    (select itmsgrpnam from oitm t5 inner join oitb t6 on t5.itmsgrpcod = t6.itmsgrpcod
    where t5.itemcode = t1.itemcode) as 'Item Group',
    t1.project
    from
    orin t0 inner join rin1 t1 on t0.docentry = t1.docentry
    where t0.docstatus = 'o'
    Let us know if it works out.
    Jesper

  • Purchase Oder open item list query

    Hi experts,
    i will like to have a query for open item list for  purchase order which will show the following;
         1. the details of any particular order from a Vendor in terms of:
         a.     How much of it has been delivered
         b.     How much of it is left.
    Of any order at any particular time?
    Urgent Reply will be appreciated.
    Regards
    Justice

    hi
    try this query and update the status
    SELECT T0.[DocNum] as "PO No", T0.[NumAtCard] as "PO Ref", T0.[DocTotal] as "PO Value", T1.[ItemCode] as "Item Code", T1.[Dscription] as "Items", T1.[OpenCreQty] as "Still to be delivered" FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry
    Thanks&Regards
    Andakondaramudu

  • Open items query in BW (restriction on amount)

    Hi all,
    from the open items report on FI-CA (transaction FPO4) it is possible to select based on the amount related to the balance at BP, CA... level.
    Does anybody know how to do the same with the query of open items from BW (0FC_C07_Q0001)?
    Example: We want to restrict only the open items for CA with a due amount grosser than 125 euros.
    Thanks!,
    Montserrat

    Solved

  • How to create ABAP Query for vendor open items

    HI,
    My client has requested me to create ABAP Query for vendor open items . So that it will be usefull for the users . Could anyone help me with this. I will assign you points.Thanks in advance.

    Hello,
    Use Table BSIK <Open Items of AP > & BSAK <AP Cleared items>......
    For Query you can use SQ01.
    USE BSID & BSAD for AR open/clear items...
    LFA1, LFB1 are vendor master data tables
    This is FYI
    Hope this helps.
    Rgds
    Rajendra

  • Query For Open Items

    Hi,
    We are trying to create a query for the open items (purchase orders ) in order to add some fields useful for users.
    Would you be able to advise with the query needed to show us only the open items?
    Best regards,
    MB

    Hi,
    Try this one:
    Select distinct t1.cardcode as Vendor, t1.CardName as Name, t1.docnum as PO#, t0.itemcode, t0.Dscription, t0.OpenQty as 'Open Qty', t0.linenum Row#, t1.DocCur as Currency, t0.price as 'Purchase Price', t0.whscode, t1.taxdate as "PO Date"
    from dbo.por1 t0
    inner join dbo.opor t1 on t1.docentry = t0.docentry
    where t1.DocType = 'I' and t0.linestatus = 'O'
    order by t1.docnum Desc, t0.linenum
    Thanks,
    Gordon

  • Restriction on amount on Open items query (FI-CA)

    Hello,
    we are trying to implement the queries 0FC_C07_Q0001 and 0FC_C07_Q0002 for reporting on open and cleared items from FI-CA to BW.
    From the open items report on FI-CA (transaction FPO4) it is possible to select based on the amount, and also to relate this balance at BP, CA... level.
    From BW team they say it is not possible to do the same with the open items queries in BW. They say the amount is not even available as a parameter. Is it like this? Can't we select only the open items for CA with more than a specific amount?
    Many thanks in advance,
    Montserrat

    Hi,
    It is possible if you are using conditions, like if the reqt is to show amounts greater than X (entered by user), then a Condition can be created on the amount key figure and use the condition type Greater Than and supply a variable which will be used by the user during run time. See here for full details:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/content.htm
    Hope this helps...

  • Query Regarding no of records in open items.

    hi,
         I am extracting open items monthly . but for this month the no. of records i am getting  is very large.even for different areas the no. of records are coming nearly same and in crores but last month it was in lakhs.in this month it is coming nearly ten times this month. is there any problem in extraction.pleae help me .
                                                                   thanks.
                                                                                    Ajay.

    Hi...........
    May be no of Transaction was more..............due to this number of records is huge............also check if there is any reverse transaction take place...........
    The base table in R/3 for open items data is DFKKOP..................check the table..........
    The only problem is.........the load may take more time..............Short dump  due to Time out may occur.............or may not be............is load fails due to time out...........then try to repeat the load by reducing the data packet size............also sometimes increasing data packet size also works..................otherwise u can spili the load by selection...........
    Regards,
    Debjani...............

  • Query: Open Item Management

    Dear All,
    I have made posting in General Ledger Account which was not ticked as Open Item Management.
    But now I want it to be as Open item management.
    I heard of some program that could do that.
    Please anyone suggest me on this.
    Thanks in Advance
    Sandeep Panwar

    Use program RFSEPA02
    check the following notes provided by SAP in the program
    THIS IS NOT A STANDARD PROGRAM.
    IT IS ONLY INCLUDED FOR CONVENIENCE IN CASE IT WILL BE NEEDED.
    ONLY USE IT AFTER CONSULTING WITH SAP.
    If you want to switch this function on retroactively for a certain
    account, you should create a new account with the correct setting and use this to make a transfer posting of existing items.

  • Open Item Report

    Hi SAP Gurus!!
    I have something in mind, i need your help guys.   I want to make a report of all open items ( vendor ).  I would like to customize a report for this. I want to:
    1. Display all open items net of payments. Line item should display remaining balances only.
    2.  I would like also to display all MIGO transactions that have no Invoice receipt yet.
    Requirements:  I want to do this in a query, what are the sap tables should i use to make this report.
    I already checked FBL1N and chose INVOICENET layout, but still i am not satisfied with that kind of report.
    Please help me guys. I will assign maximum points to useful answers.
    Thanks in advance.

    Hi,
    Check this SAP Standard report RFKEPL00 .Go to T.code se38 and enter the standard report RFKEPL00 ( Vendor open items) and execute.Check whether it meets your requirement or not.
    To see the tables used in this report, Enter the program name and click on display.and click on INCLUDE fkepl00_top.It will show yo the tables used in the report.
    In FBL1N changelayout (Ctrl + F8) , Select purchase document or other fields to meet your requirement.
    Please let me know if you need more information.
    Pelase let me know if you need more information.
    Assign points if useful.
    Regards
    Sridhar M

  • Vendor open items Overdue Analysis on top of 0FIAP_C03 ---" NO DATA FOUND"

    Hi All,
    I have created a vendor overdue analysis query on top of 0FIAP_C03 same as days overdue analysis on top OFIAR_C03.
    But when i am executing vendor open items overdue analysis i am getting " NO APPLICATION DATA FOUND" while my days overdue analysis of FIAR is working.
    So can you tell what are changes that need to be made in vendor overdue analysis as i have exactly copied days overdue analysis except here its vendor not customer.
    But i checked in ECC side data is there for vendor open item overdue analysis
    Looking for a quick reply.
    With regards,
    Montz

    I assume that there is data in the AP cube and the read pointer is upto date (ie all request are available for reporting)
    When doing a list cube on AP can you see the data?
    Then if all is fine it is a simple case of going through the RKFs and filters finding out where there is a join failure

  • Cleared item swowing as a Open item

    Hi All,
    I posted a document in f-02 for bank charges the entry was bank charges a/c debit and bank a/c is credit. and i posted the same data into ff67. and for reconsilation i upload the same data into FEBA for bank statement. now this document is cleared.
    but the problem is when i see this document in FBL3N this document numbe showing in Open items but i cleared allready.
    Please give me the solution for this.

    Hi....
    Those are items we cannot delete first we have to reverse those items using the FB08 for open items ..other wise use T.code FBRA for clearing items
    once done the all activites after that you have dleted the statment number number useing program Goto SE38 and execute the following report: RFEBKA96.
    On application put 0001. Here you will find all the statements. Mark the ones you want to delete... and press Delete Statements. This will permanently delete the load from your system.
    HINT: to search the statement you want to delete (Short Key), query it using table FEBKO.
    After delete the Bank Statement, the following steps can be solved. Please try:
    T.Code: FEBP
    The following parameters to be entered:
    Statement date: The same statement date
    Statement number: The same statement number
    Select u201CPost immed.u201D Select
    Execute
    Note:
    Please note that statement date is very important and same to be entered to process all the data for posting.
    Finally check the statement file debit and credit balance it must be Zero
    Than try to post once again ..it will allows you post
    I hope it will helps you
    Regards
    vamsi

  • Open items and line items

    Hi Gurus,
    Can anyone explain me regarding what is opening item management and what is use and to which type of accounts we will give opening item management check box. Please give me an example.
    Thanks and Regards
    Balu

    Here is the SAP help text on the field 'Open Item Management'.  Should answer your query!
    Indicator: Open item management?
    Determines that open items are managed for this account.
    Use
    Items posted to accounts managed on an open item basis are marked as open or cleared. The balance of these accounts is always equal to the balance of the open items.
    Procedure
    Set up accounts with open item management if offsetting entries are to be assigned to the postings made to these accounts. Postings to these accounts represent incomplete transactions.
    Example:
    A goods receipt/invoice receipt (GR/IR) clearing account should be managed on an open item basis so that you can check at any time whether invoices have been received for the goods received for an order.
    Set up accounts without open item management if no offsetting entry is to be made against a posting to this account.
    Examples
    Accounts that are managed on an open item basis include:
    Clearing accounts:
    Bank clearing account
    Payroll clearing account
    Cash discount clearing account
    GR/IR clearing account
    Accounts that are not managed on an open item basis:
    Bank accounts
    Tax accounts
    Raw material accounts
    Reconciliation accounts
    These are managed implicitly using the subledger open item function.
    Profit and loss accounts
    Materials Management (MM) accounts posted with a posting key that has account type 'M'

  • AR Open Items and Aging question

    Hi
    I have one question on AR Open Items aging. If Doc 100000 is posted on 4/1 with amount 25. Suppose it is cleared on 4/8. Now i get two records to BI. One will replace the existing record with Clearing Doc no and other one new posting for the clearing doc.
    Delta load on 4/1/2011               
    Posting Date     Doc no     Amount      Clearing Doc
    4/1/2011     1000000     25     
    Delta load on 4/8/2011               
    4/1/2011     1000000     25     1000025
    4/8/2011     1000025     -25     1000025
    My question is If I run the Aging report on 4/9/2011 with key date value 4/1/2011 will the result show 25 amount as Open item or cleared item?
    If I want to show status of the document as of old date, Should I take daily snapshots of the data?
    Please let me know your thoughts!
    Thank you
    Sree

    HI Sree..
    That document was open on 4/1/2011......and was cleared on 4/8/2011................
    If you execute the R/3 report FBL5N (Customer Line Item Display) with the "Open at key date" 4/1/2011.........the report will show the document as open item.....
    What your Aging Report in the BI side will show it depeds on the design of the report.....but as per my understanding if the Query get executed with key date value 4/1/2011 ....then the report should show the document as Open Item..
    In that case the restricted keyfigure should design in such a way that it will compare the Clearing Date with the Key date......if the Key Date < Clearing date then the document will be trreated as an Open Item........if Key Date >= Clearing date then the Document will be displayed as an Open Item.........
    We are also using such a report.......Infact we have also designed in such a way so that the report can display how old the document is 90 days, 30 days....etc. by giving the Offset value......
    But frankly speaking it depends on your requirement and the design of the Query....
    Regards,
    Debjani......

  • Trouble creating a open items report (BSID and BSAD tables)

    Hi guys,
    im creating a report that must display open items for an especific date, and i do it very well with a query from BSID table.
    The problem comes when u use a date on the past, example last week.
    if u do that, the items are now closed and are no longer stored in BSID table, so i think that they must be now in BSAD table, but i dont know how to relate wich ones are recently closed...
    i also tried to do a query from BSAD with augdt >= last week date, and i almost get the items that i needed(this items plus the ones from BSID), but is not exactly because u can close an item with a date in the past..
    is there any way to relate that 2 tables, or what exactly happens when an items change from bsid to bsad??
    any ideas?

    Hi;
    I think the best way to recive the necessary information is using logical data base DDF.  You can use report RFITEMAR to see how use the logical data base.
    Some months ago I've read the data in my report in following way:
    1. make Z-copy of report RFITEMAR
    2. in Z-copy after end-of-selection insert
    export it_pos to memory id 'POS_TABLE'.
    3. In your report write a form similar to my form below:
    *&      Form  submit_zrfitemar
    FORM submit_zrfitemar  tables    rkunnr  type trgr_kunnr
                                     it_pos  type it_rfposxext
                           using     ibukrs  type bukrs
                                     idatsd  type sy-datum.
       data: rspar    type table of rsparams,
             l_rspar  type rsparams,
             l_pos    type rfposxext,
             akunnr  type kunnr.
       l_rspar-selname = 'DD_KUNNR'.
       l_rspar-kind    = 'S'.
       loop at rkunnr.
           move-corresponding rkunnr to l_rspar.
           if l_rspar-high = ''.
               l_rspar-option  = 'EQ'.
               else.
               l_rspar-option  = 'BT'.
           endif.
           append l_rspar to rspar.
        endloop.
        clear: l_rspar.
        l_rspar-selname = 'DD_BUKRS'.
        l_rspar-kind    = 'S'.
        l_rspar-sign    = 'I'.
        l_rspar-option  = 'BT'.
        l_rspar-low  = ibukrs.
        append l_rspar to rspar.
        clear: l_rspar.
        l_rspar-selname = 'PA_STIDA'.
        l_rspar-kind    = 'S'.
        l_rspar-sign    = 'I'.
        l_rspar-option  = 'BT'.
        l_rspar-low  = idatsd.
        append l_rspar to rspar.
        clear: it_pos[].
      submit ZRFITEMAR
      with selection-table rspar
      and return.
      import it_pos from memory id 'POS_TABLE'.
    ENDFORM.                    " submit_zrfitemar
    You find the necessary data in table IT_POS.
    JS
    Edited by: John Smith on Oct 9, 2008 5:42 PM

Maybe you are looking for

  • HT1386 I have a new sytsem with Windows 8...

    I downloaded iTunesto a new Dell tower with windows 8 OS and when I hook my iPhone 4s to the computer, it just repeatedly chimes and the display on the phone bllnks and it never connects to iTunes nor do the drivers download, nor does the phone show

  • Anyone had problems with jFilechooser?

    I have problems with JFilechooser freezes when invoking returnVal = chooser.showDialog(this, "Select"); For some reason it freezes the entire program, allthough sometimes (rarely), it doesn't freeze. Are there currently any problems with JFileChooser

  • Sharing a monitor with a PC

    I have a Biege G3MT with G4 upgrade card- running 10.2.8- I just moved and have to share office space with my wife who uses a PC- she is running Windows XP- My question is this- we have limited desktop space- Is it possible to share her monitor? It's

  • Attaching style sheets to whole website?

    My question about attaching CSS style sheets remains unanswered as far as globally having them appear in the panel for the whole site. David Powers did answer me about how to add them to new sheets, but I have a site I imported from GoLive and what i

  • Text BOM Explosion

    Hello CRM Gurus,   When we create standard order with the product which contains text line items following issues errors occurs: 1. With 1 product will generate error on CRM Order     item 20 product does not exist and No item category     could be c