Skip to Content
avatar image
Former Member

BSID Vs BSAD

Hello Friends,

I'm preparing a Z report, in that i have to capture the customer balances for a particular date. But the problem is all the open line items in BSID are moving to BSAD after done the payment against to these line items. In this situation balance amount is changing in the report. what is the way to capture the O/S as on a particular date?

ex: Customer X O/s as on 01.01.09 is 1000

Later on i've made the paymnet 500 as on 03.01.09

if i run the report as on 01.01.09 now the balance is appearing as 500 which is nor correct.

can anyone provide me the table logic for this issue?

Thanks

Swapna

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 10, 2009 at 06:25 AM

    Dear Swapna

    I think you are using FBL5N T.Code to view open items of a Customer. All open items will be laid in BSID, whenever these will be cleared and it will be moved to BSAD for cleared items. So, make sure in FBL5N put the date against open items from and to date, between which date you wants to see them. If you have given cleared date then it will shows in BSAD table.

    Regards

    Chinnu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 10, 2009 at 06:20 AM

    Hi,

    From BSAD you should pick documents that have got cleared after date given as input. AS per your example any document in BSAD which has clearing date (AUGDT) after 01.01.09 but posted before 01.01.09, should be included in the report.

    Thanks and Regards,

    Anit

    Edited by: Anit Mangat on Jul 10, 2009 8:21 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 10, 2009 at 08:32 AM

    Hi,

    For open line items to appear in the z-report, give the logic to pick up those line items from BSAD table, which falls between the clearing date and the date mentioned in z-report (By the customer).

    This will make sure that status of open items is correctly shown in the report.

    Let me know if this worked.

    Regards

    K Khatri

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 11, 2009 at 06:21 AM

    Use function module BAPI_AR_ACC_GETKEYDATEBALANCE.

    Regards

    Mukesh

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 11, 2009 at 08:54 AM

    Hello,

    If you want to get open line items at key date.

    You can use selects below.

    DATA : gt_bsid LIKE bsid OCCURS 0 WITH HEADER LINE.
    
    SELECT * 
      INTO TABLE gt_bsid
      FROM bsid
      WHERE bukrs EQ p_bukrs  " parametre for company code at selection-screen.
        AND kunnr IN s_kunnr  " select-options for customer code
        AND budat LE p_kdate. " parametre for key date
    
    SELECT * 
      APPENDING CORRESPONDING FIELDS OF TABLE gt_bsid
      FROM bsad
      WHERE bukrs EQ p_bukrs  " parametre for company code at selection-screen.
        AND kunnr IN s_kunnr  " select-options for customer code
        AND augdt GT p_kdate  " if clearing date(AUGDT) is greater than key date, at key date this line is open.
        AND budat LE p_kdate. " parametre for key date  
    

    You can add more "where conditions" using key field on table for performance improiving .

    Regards,

    Burak

    Add comment
    10|10000 characters needed characters exceeded