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

Similar Messages

  • What happens to the open item in bsid table when it is cleared

    hi experts,
                   i have a doubt about open and cleared items of accounting documents. as we know open items of customers are stored in bsid and cleared ones in bsad. For suupose, an open item is closed ina particular period then what happened to the entry in bsid and bsad table. an entry regarding is stored in bsad (cleared),and what happens to the entry in bsid, still it will be there or removed from it.

    Hi,
    When ever we clear the document(Complete payment) that document will be moved to BSAD table. Other wise it will remain in BSID.
    If u are making partial payment then all the partial payment documents along with original document will be stored in BSID till u made the complete payment for that invoice.
    Assumption is u have to give all partial payment documents made for particular invoice item while u are making complete payment in F-28 transaction. So that these partail payment documents will also be cleared while making complete payment and moved to BSAD table.
    This trasaction can be used for both partial and complete payments.
    Irrespective of complete or partial payments made all the documents will remain stored in BKPF and BSEG tables.
    BSID and BSAD are index tables to address performance issues with BKPF and BSEG tables.
    So all open and cleared documents will be there in BKPF and BSEG tables.
    All cleared documents will be there in BSAD table.
    Alll open documents will be there in BSID table.
    Hope it is clear.
    Thanks,
    Vinod.

  • Performance Issues on BSID and BSAD

    Hello guys,
    for a custom report I need the balance data of a couple of vendors for different keydates. Therefor I tried to use function 'BAPI_AR_ACC_GETKEYDATEBALANCE' which works fine but takes a lot of performance time when getting data for more than one vendor or more than one key date. The function mainly reads BSID and BSAD tables which is enough for my report, so I tried to get it faster with creating my own select.
    When looking at the popular SAP boards you get different opinions about the best way for the performance in SELECTS. So can you please tell me what you think would be the best way for tables BSID and BSAD?
    I got the key fields company code as parameter and customer as range. I also need only normal documents (BSTAT = ' ') and only documents until one or more keydates as range (BUDAT <= keydate).
    So what would be the best way?
    (1) Moving the whole BSID/BSAD fields into local BSID/BSAD table or just the fields that I need (see example)?
    (2) Doing one SELECT for every vendor no. in the range or getting all vendor no in one select?
    Any other performance hints? :-)
       SELECT bukrs kunnr budat shkzg dmbtr pswsl pswbt FROM bsid
         INTO CORRESPONDING FIELDS OF TABLE gt_bsid
         WHERE bukrs EQ pa_bukrs
         AND   kunnr IN gr_kunnr
         AND   budat LE pa_stich-high
         AND   bstat EQ ''.
       SELECT bukrs kunnr augdt budat shkzg dmbtr pswsl pswbt FROM bsad
         INTO CORRESPONDING FIELDS OF TABLE gt_bsad
         WHERE bukrs EQ pa_bukrs
         AND   kunnr IN gr_kunnr
         AND   budat LE pa_stich-high
         AND   augdt GT pa_stich-high
         AND   bstat EQ ''.
    Thanks a lot!
    Regards
    Michael

    Almost always prefer one SELECT to a SELECT IN LOOP.
    Another solution could be reading also some total table :
    KNC1 (no special G/L, Balance Carried Forward + total DB/CR per period, one record per Fiscal Year)
    KNC3 for special G/L (one record per fiscal year and special G/L indicator, only one total per year)
    Only restrict access to BSID/BSAD for dates that are not end of period (or don't allow those...)
    NB: From my experience, you can keep the INTO CORRESPONDING, just define a structure with only required fields, the actual generated SQL statement will only ask for those fields (read also Why "INTO CORRESPONDING" is much better than its reputation)
    Regards,
    Raymond

  • Open items report with Sales Group and Office

    Dear all,
    Our client wants a report for AR open items which shows amounts and sales group/ office for a customer.
    E.g.:
    Sales GR   Sales Offi    Net due date     Customer    Pay. terms      Amnt in loc. CUR
    100            1234            15.06.2011       123456        Z007              30.000
    Does anyone know how I create such a report?
    Thanks for any help.
    Kh

    I don't think such a report is available as Std. You may choose to write a report based on VBRK, KNA1, KNB1, BSID and BSAD
    Regards
    Sanil Bhandari

  • Reset Cleared Documents and Vendor Open Items Report FBL1N

    Hi all,
    I have following scenario:
    - In last month, we had 2 documents (invoice and payment) cleared against each other. We created open items report as well as open items correspondence sent to Vendor. Obviously, the docs were not included in report.
    - In this month, we have reset and reverse clearing document of the documents. We create report again with the open key date as in last month. It should not include the 2 docs but it did with whichever key date we chose.
    Is there any setting that open item report doesn't include cleared item at the key date when we run report for previous month?
    Thanks and Regards,
    Dau

    Hi Dau,
    If i understand you correctly then you posted and paid invoice in Jan 2012 and generated the open line item report for Jan which correctly did not include this cleared invoice.
    Now in Feb 2012 you reset and reversed this payment document.
    The issue is when you execute the report FBL1N again then you get the open line item for this invoice correct. Please confirm what is the open item key date that you are using here for generating this report
    If you keep it 31.01.2012 then definetly this invoice should not appear in the report but if you keep that 29.12.2012 then this line item would for sure appear.
    The importance of key date is to limit the report to certain date. The system selects all items posted up to and including the specified key date and open for this period.
    so I think your issue is with the key date.
    Hope this helps you.
    Regards,
    Prasad

  • ABC-analysis in Open Items report

    Good day, dear experts!
    I got a task from my chief to find out how to use menu path "Go to - ABC analysis" in Open Items report FBL1N/FBL5N.
    Everything I've found is a message "ABC analysis not possible here", Message no. 0K076, and old-old note for this message 414907.
    Do someone use ABC-analysis for open items?
    I think it's useless, but maybe I don't understand something...
    Irina

    Hi,
    Nope, it is useful.
    Execute FBL1N and select line items (Edit > Select All).
    Then click on any amount column.
    Then click on Goto > ABC Analysis
    You will get the options to classify the line items in the A, B, C categories based on the % creteria etc. on that screen.
    Regards,
    Gaurav

  • Vendor open items report without page break after changing vendor account

    Hi,
    I would like to get the vendor open items report without pagination when the vendor account changes.
    The option of deleting the * mark in the Filter page is not valid for me, because this way the vendor's name dissappear. I mean, it would be ok if I could show in the output of the report the name of the vendors.
    Thanks in advance.

    HI,
    If I understood your issue correctly then in the report S_ALR_87012085 is a field "Summarization level (0-4)" in the output controls.
    You just have to set this field to the value '2'.
    When you set the field to two, the page break will first executed, when the page is "full".
    If you want to see information about the "Summarization level (0-4)" field, you just have to set the cursor in it, and press F1.
    I believe this answer solve your problem.
    Please assign points if it useful.
    Regards
    Ravinagh Boni

  • Customer Open item Report S_ALR_87012174

    Hi
    As per my client requirement in Customer Open item Report S_ALR_87012174 bring the field "PO Number" into the layout."
    Kindly suggest me if any possibility is there?
    Thanks,
    Kumar

    Hi,
    The report S_ALR_87012174 uses the logical databse DDF which does not have this field of PO number (BSTKD) given in the sales order, as it is the customer purcchase order nu,ber for the sales application.
    This it is not availble for the data source, so the report can not be enhanced for that.
    You ned to create a custom report for the same, if needed this desperatly.
    Regards,
    Gaurav

  • Reversal FB08 Creating New OPEN ITEM instead of clearing the open item.

    Dear All,
    My user has an issue whenever he does any reversal  Tcode - FB08 in one of the general ledger  "Cash in Transit"  nature "open item" & "Line item"  instead of clearing the open it it  creates a new open line item.
    I have checked in Table BKPF , the reversal number is being updated but this items are still appearing open item in FBL3N and not appearing in F-04 (all reversals) for clearing.
    Can any one share what can be the reason its creating new open item  and how can i solve the issue for clearing the account.
    Thanks & Regards
    Pravin

    hi
    Please check following cases
    - whether this is happening in all the reversal cases of Cash in transit
    - Whether is user is just using FBRA (Onsly resetting) and not going for reversal
    - Chances would be one or two partial clearing may have taken for single document for the offsetting accounts
    Thanks
    Sandeep

  • GL open items report needs OSS Note

    Hi All,
    Report S_alr_87012282 is run at period end and year end to validate that A/P 21010000 is in balance against the open items report. For the 7th period (12/13/08) I could not run the report as it timed out. If you run this in the background there are 100,000 pages and you can not see the last page. I need a resolution for this report as accounting said I have to use to balance.
    I tried in foreground and it still timed out.  I recommended FS10N,Please provide the OSS for any performance improvement notes.
    Thanks in Advance
    Prathap

    Hello everybody:
    I need open clearing items to clearing with other items. For example in my job was issued a payment to a supplier, but was applied to the wrong invoice, for this reason I need to open this compensation payment and apply it to the right invoice, the Tx FBRA, tells me that I must cancel the payment, but the payment was delivered and collected by the supplier, so I can not avoid it and just need to open the clearing.
    Can us help me please????
    Thanks
    María

  • Transferring Open Items, Instalment Plans and Dunning Level

    Hi all,
    We are implementing SAP IS-U for a water suplly company and we have a process in which an Installation is transferred from a Business Partner to another. For this we are using the Move-in / Move-Out functionality (trx EC60).
    So far, so good. The problem is that we also should transfer also the Open Items, Instalment Plans and Dunning level to the new Business Partner and new Contract Account.
    The questions is: can we transfer these automatically?
    We thought in different scenarios in case this is not possible, so I would appreciate if you can give us an opinion:
    1 - Use FP40 transaction and transfer FICA elements manually
    2  - Create a FOP process to perform step by step the process from CIC0. The only problem I have found is that there is not any object that allows me to transfer the open items. Does it exist? If not, this option is not valid
    3 - Use the "Change CUstomer" Functionality. Did you have any experience using this funcionalidty? The main issue I have with this is that the system generates a dummy invoice, the Move in Date is in the future, and the Account must be closed.
    Please any information will be very helpful. Thank you very much in advance!
    Best Regards,
    Lucas

    Hi Lucas,
    You can transfer the open items and the dunning level manually to the new BP and CA through transaction code FP40.
    You need to maintain the following configuration settings in the posting area 1055-
    Curr-Currency of the Cocd
    Clearing Reason-Clearing reason used for transfer
    Document Type-Document Type used for Transfer
    Only all items- blank
    Credit-X
    Transfer DL-X
    Moreover, you cannot transfer Instalment Plans through FP40, as instalment plan items are statistical in nature.
    Hope it clarifies.....
    Thanks,
    Amlan

  • Bsid and bsad

    hi,
    anyone can explain to me.
    1) bsid is to list all the open items whereas bsad is to list all cleared items?
    2) say i have an doc type RV 5300000001 with amount $1000. i use f-29 to post cust downpayment DA 4000000002 and f-39 to clear cust downpayment against 1000 DZ 4500000034. may i know why RV and DA still sitting in bsid as $1000 fully cleared whereas DA and DZ in bsad?
    3) what is this clearing doc for? it is in bsid or bsad?
    thanks

    Hi SAP_USER_SAP,
    Hope this can help
    1. Yes, BSID for open items, BSAD for cleared items.
    <u>2. Well, the process is like below :</u>
    You post a document with type RV (Let say Doc No=AAA) and then you post a down payment using F-29 (Doc No = BBB). <b>Both of the documents has no relationship.</b> And after you post, They will sit on the BSID.
    Afterwards, You clear the down payment(Doc No=BBB) with F-39. This will create a new document (Let say Doc No = CCC ).
    CCC will clear BBB but on the other hand CCC also have an open item (<b>you have to clear this later against the RV document</b>). So CCC will sit on BSID and BSAD.
    Because BBB has already been cleared by CCC, BBB will move from BSID to BSAD.
    Now you have AAA and CCC sit in BSID.
    BBB and CCC sit in BSAD.
    In order to move AAA and CCC from BSID to BSAD you have to do the clearing again. You can use t-code : F-22 to do it.
    3. Document ,which is already cleared, should be sit in BSAD.
    The scenario is like this :
    For Example, you have receive a down payment. Two days later you send the invoice to customer(RV document) and post it to system.
    Down payment and invoice will be an open item.
    When customer pay the invoice, you have to clear the down payment and invoice. Afterwards, the will sit on BSAD.

  • Entry in Both BSID and BSAD

    Hi. I have a problem now. An entry in Accounting both exists in tables BSID and BSAD. What do i have to do?

    Hi Andre,
    Check if the amount are also same. It may be that it is partially posted document.
    Or post this is ERP Financials forum. You will get more correct answer.
    Reward points if useful.
    Regards,
    Atish

  • Using bsid and bsad I needed get partner name related to sales order

    Hi
    Using bsid and bsad I needed get partner name related to sales order
    I have gone through the tables but its vbeln column is blank
    How can I make relation between bsid and bsad with vbak if vbeln and column is blank in the table bsid and bsad.
    Please guide me.
    Regards
    Sebastian
    Edited by: Sebastian John on Apr 21, 2009 3:35 PM

    BSID-VBELN = VBRK-VBELN.
    Billing document number is there in BSID table.
    Regs.

  • Auto update of Ztable when ever BSID or BSAD tables updated

    Auto update of Ztable when ever DB table updated     
    Hi experts
    I want my Ztable get updated automatically when ever a record is created or updated in BSID or BSAD tables.
    Here clear requirement
    Generally using Company code & Allocation number  ( 18 char ) my programs access BSID & BSAD tables it is taking very long time for execution almost more than 30 minutes ( data in millions ).
    Step 1.
    I created a new Ztable with limited fields Company Code, Customer, Document, Allocation Number and Posting date.
    Step 2.
    Before look into BSID or BSAD my program searches Ztable for Customer number & Document number using Allocation field and Company code.
    Step 3.
    Once get the Customer & Document numbers accessing BSID & BSAD table is very easy (now just taking less than 1 minute).
    Created a new program to update Ztable every day but BSID and BSAD are live table so I want my Ztable get updated immediately when any entry posted in BSID or BSAD
    Please help me
    Satya
    Singapore

    You need to check what is the procedure (T-Code) from which the data gets updated into these tables.
    For example
    when we craete a material from MM01 the data gets updated in the corresponding table i.e. EKPO.
    In same way you need to find the process and then you can use BTE (Busineess transaction events) for that process. BTE are only for FI module and these tables are also related to FI .

Maybe you are looking for

  • Edit Templates With Multiple Languages (want to see all templates)

    Hi all, I have the following problem: I want to edit this template: On my old windows pc I can see all three templates (German, English & French) one below the other! Which is important, because I need to edit each one, how ever it is only one file!

  • Discount amount

    Hi all, To our customers we sometimes wants to give a discount in the form of an amount instead of a %. We can use the field down at the right after Total before discount but that's not what we want to use, because.. We use the XL reporter to create

  • BP Relationship Save IDOC

    Dear Friends, When I change, Insert, Delete telephone data, Fax data or SMTP data in the BP Relationship screen, I'm not getting any values for TASK field which is under E101XIF_PARTNER_REL_COMPLEX/E101BURS_EI_RELATION_DATA/E101BURS_EI_ADDRESS/E101BU

  • Mac lion  crashes regularly

    Hi I have a mac mini with Mac OSX 10.7.5. These days it crashes regularlary.  I have upgraded the system from 10.7.4 to 10.7.5  and repaired disk permissions using Disk utility but still i am getting crashes atleast 2-3 times a day. Other application

  • About  second step picking  in Transfer orders

    Hi Guys!!!! Does anybody know some function or BAPI that confirm transfer orders with second step picking ? i found one that maybe could works fine "L_TO_CONFIRM_SU" . I  promise to Reward. Regard...