Balances Table

Dear all
Can any one tell me,
In receivables, is there any table or view exists which shows customers monthly balances.
In parables, is there any table or view exist which show suppliers balances month wise.
In inventory or cost mgt , is there any table or view exist which shows Item quantitative balances month wise.
Regards
Imran

Imran,
The following gives you the outstanding from AR. It takes care of the receipt applications and adjustments as well. With this, you can get the outstanding as on any date. Note that this script uses a temp table to dump the data. its easy to figure out the structureof the table from the query.
declare
v_cash_receipt NUMBER;
v_adjustment NUMBER;
v_credit_memo NUMBER;
v_as_of_outstanding NUMBER;
v_cash_receipt_acctd NUMBER;
v_adjustment_acctd NUMBER;
v_credit_memo_acctd NUMBER;
v_credit_memo_acctd_1               NUMBER;
v_as_of_outstanding_acctd NUMBER;
p_as_of_date                          DATE;
cursor cs_get_trx (p_as_of_date1 IN Date) is
SELECT ps.customer_id CUST_ACCOUNT_ID
, trx.creation_date INV_CREATION_DATE
, ps.trx_number INVOICE_NUMBER
, trx.trx_date                              INVOICE_DATE
, ps.gl_date GL_DATE
, NVL(ps.amount_due_original,0) INVOICE_AMOUNT
, NVL(ps.tax_original,0) TAX_AMOUNT
, NVL(ps.acctd_amount_due_remaining,0) ACCTD_OUTSTANDING_AMOUNT
, ps.due_date
, CEIL(sysdate - ps.due_date) DAYS_OUTSTANDING
, ps.payment_schedule_id
, ps.number_of_due_dates INSTALLMENT_NUMBER
, trx.customer_trx_id
, CEIL(p_as_of_date1 - ps.due_date) DAYS_LATE_AS_OF
FROM ra_customer_trx TRX
, ar_payment_schedules PS
WHERE
trx.customer_trx_id = ps.customer_trx_id
AND ps.gl_date <= p_as_of_date1
AND ps.gl_date_closed > p_as_of_date1 ;
CURSOR cs_get_receipt(p_as_of_date2 IN DATE ) IS
SELECT ps.customer_id CUST_ACCOUNT_ID
, ps.payment_schedule_id
, CEIL(p_as_of_date - ps.GL_DATE) days_late_as_of_r
, ps.gl_date
, cr.receipt_number
, app.cash_receipt_id
, sum(app.acctd_amount_applied_from) ACCTD_AMOUNT_APPLIED
FROM ar_receivable_applications app
, ar_cash_receipts cr
, ar_payment_schedules ps
WHERE app.cash_receipt_id = cr.cash_receipt_id
AND app.payment_schedule_id = ps.payment_schedule_id
AND app.status in ('ACC', 'UNAPP', 'UNID', 'OTHER ACC' )
AND NVL(app.confirmed_flag,'Y') = 'Y'
AND app.gl_date <= p_as_of_date2
AND ps.gl_date <= p_as_of_date2
AND ps.gl_date_closed > p_as_of_date2
AND ( ( app.reversal_gl_date IS NOT NULL AND ps.gl_date <= p_as_of_date2 )
OR app.reversal_gl_date IS NULL
GROUP BY ps.customer_id
, cr.receipt_number
, app.cash_receipt_id
, ps.payment_schedule_id
, ps.gl_date
HAVING
sum(app.acctd_amount_applied_from) <> 0 ;
Begin
delete zxc_aging_cust1 ;
p_as_of_date := to_date('&Enter_as_of_date','DD-MON-RRRR') ;
     For invoice in cs_get_trx(p_as_of_date)
     LOOP
/* cash applied after p_as_of_date */
SELECT NVL(SUM(NVL(acctd_amount_applied_to, 0.0) +
NVL(acctd_earned_discount_taken,0.0) +
NVL(acctd_unearned_discount_taken,0.0)),0.0)
INTO v_cash_receipt_acctd
FROM ar_receivable_applications
WHERE TRUNC(gl_date) > p_as_of_date
AND status||'' = 'APP'
AND NVL(confirmed_flag,'Y') = 'Y'
AND applied_payment_schedule_id = invoice.payment_schedule_id
AND application_type LIKE 'CASH%';
/* adjustments applied after p_as_of_date */
SELECT NVL(SUM(ar_adjustments.acctd_amount), 0.0)
INTO v_adjustment_acctd
FROM ar_adjustments
WHERE TRUNC(gl_date) > p_as_of_date
AND status = 'A'
AND payment_schedule_id = invoice.payment_schedule_id;
/* invoice credited after p_as_of_date */
SELECT nvl(sum(nvl(acctd_amount_applied_to, 0.0)), 0.0)
INTO v_credit_memo_acctd
FROM ar_receivable_applications
WHERE applied_payment_schedule_id = invoice.payment_schedule_id
AND nvl(confirmed_flag,'Y') = 'Y'
AND status||'' = 'APP'
AND TRUNC(gl_date) > p_as_of_date
AND application_type LIKE 'CM%';
/*added new by anil patil 7/7/7 */
/* credit memo applied after p_as_of_date */
SELECT nvl(sum(nvl(acctd_amount_applied_to, 0.0)), 0.0)
INTO v_credit_memo_acctd_1
FROM ar_receivable_applications
WHERE payment_schedule_id = invoice.payment_schedule_id
AND nvl(confirmed_flag,'Y') = 'Y'
AND status||'' = 'APP'
AND TRUNC(gl_date) > p_as_of_date
AND application_type LIKE 'CM%';
/* calculate actual outstanding amount */
v_as_of_outstanding_acctd := invoice.acctd_outstanding_amount + v_cash_receipt_acctd - v_adjustment_acctd +
                                        v_credit_memo_acctd - v_credit_memo_acctd_1 ;
insert into zxc_aging_cust1
( customer_id ,
invoice_number     ,
          invoice_date ,
          gl_date          ,
          invoice_amount ,
          tax_amount ,
          acctd_outstanding_amount ,
          due_date     ,
          days_outstanding ,
          installment_number ,
          days_late_as_of ,
          current_os_amt ,
          cash_receipt_amt ,
          adj_amt ,
          credit_memo_amt ,
          credit_memo_amt_1
values
          (invoice.cust_account_id ,
          invoice.invoice_number     ,
          invoice.invoice_date ,
          invoice.gl_date          ,
          invoice.invoice_amount ,
          invoice.tax_amount ,
          v_as_of_outstanding_acctd ,
          invoice.due_date     ,
          invoice.days_outstanding ,
          invoice.installment_number ,
          invoice.days_late_as_of ,
          invoice.acctd_outstanding_amount ,
          v_cash_receipt_acctd ,
          v_adjustment_acctd ,
          v_credit_memo_acctd ,
          v_credit_memo_acctd_1
     END LOOP ;
COMMIT;
FOR receipt in cs_get_receipt (p_as_of_date )
LOOP
     INSERT INTO zxc_aging_cust1( customer_id
, invoice_number
, trx_type
, acctd_outstanding_amount
, gl_date
     VALUES( receipt.cust_account_id
, receipt.receipt_number
, 'RECEIPT'
, -1 * receipt.acctd_amount_applied
, receipt.gl_date );
END LOOP;
COMMIT ;
END;
Hope this helps.
Thanks,
Anil

Similar Messages

  • The World's First Perfectly-balanced Table-top Rpg. Game Module

    Try to enhance your Hobby Experience with this:
    http://www.lulu.com/spotlight/moonlounge
    My perfectly-balanced Table-top Rpg. Game Module Sells for $1,020.00 now. No ones ever made a Model like this.

    not only the nice unboxing article but a nice promoting video on official website, check this out
    https://www.youtube.com/watch?v=y28Nf-K3-ZE&feature=youtu.be
    Quote from: anitalin;103269
    this is a very detail unboxing article, The ISP panel really nice.
    - - - Updated - - -

  • Opening And Closing Balance Table

    Hi All
    Will any one tell me table name and field name which contain the Opening and closing balance quantity at any specific date ?
    Thanks and regards
    Deepak Tyagi

    Hi Deepak Tyagi,
    FYI: There is no such table/field exists.
    Thanks,
    Gordon

  • Batch Wise Closing Balances Table

    Hi,
    We can get period wise closing balance for Plant-Storage Location-materials in MARDH.
    But i didnt find any table which can provide Plant - S.Loc - Year - Period (or Month) - Batch wise closing Balances.
    Can any body please suggest a table on the above criteria.
    Thanks
    Pardha Saradhi Bandaru.

    Hi,
    Check table MCHB
    Regards,
    Ratish

  • Opening stock Balance Table

    Hi,
    I am writing FS for the following fields
    In selection screen i am selecting
    Material
    Posting date
    Plant
    Output
    Opening stock stock
    GR
    Issue
    Balance
    Closing Stock
    My problem is from which table to fetch  opening stock qty  which belongs to 3months back
    For example i am running this report from Jan09 to March 09 so my query i want opening stock for the month of Jan09 and subsequently reduction in stock after each issue.so from which table i can get this information.
    Need your expertise help
    Regards
    Vivek

    Hi Vivek,
    To Calculate Opening Stock & Closing stock there are different procedures.
    It just depends of\n the client requirements & usage of the material.
    For example, we have different types of stocks, like, Through Pipeline, Special, Unristricted, quality, safety,
    and many types of stocks.... so all these types are indicated in MSEG tabe in SOBTZ field,...
    Now Comimg to your Query, You need to calculate OPENING & CLOSING STOCK.
    We have a similiar standard report in MB5B Tcode..
    to get the same results in your report do like this...
    For valuated stock go to the MARDH, MBEWH, MCHBH tables But I Prefer MBEWH.
    here in MBEWH give the month & year and you get the result in LBKUM field...
    For Special stock, You need to go to another table like MKOLH,,(I forgot still 2 more) and
    give the month & year inputs and you will get the result in SLABS field.
    and remaining MB5B refers to its deetails lists with different Movement types,
    whcih you can get clearly from MSEG Table...
    Hope you can write the select Queries accordingly.
    If you want to find the Stock for a particluar date, It is not available in any table as I know,
    Rather you need to do calculations like this.
    1. Select the stock (Menge) till date from MSEG and add all with different movement types,
    Its a logic need to ask to your functional consultant,
    like 101 added to stock, 601 sales, 102 rejeted, 602 added back to stock,... transfers, 261,,, like this.
    But take a little time, get all these by using MKPF & MSEG tables... thats it.
    Or----
    2.Tables are MSEG , MKPF ... use Debit / Credit indicator ( Do not go woth any static Movement types ) and u have to consider all stock related table
    MBEW , EBEW etc..., to get the stcok on particular date .
    Please refer to Std. Tcode FBL5N for reference.
    Thanks & regards,
    Dileep .C

  • Vendor Balances table

    Hi,
    We are developing a report on vendor balances.
    We want to take the vendor total open items upto March 31, 2007 as a single figure, after that we want to show as invoice level.
    In which table we can get consolidated fiscal year wise open items for vendor.
    Sateesh

    Hi Anupam,
    Thanks for Quick reply.
    If we extract all the years data it will be big pain to our local database table.
    Thats why we want to take consolidate balnces upto last fiscal year, after that we want to show the invoice level.
    Sateesh

  • G/L Balance Table

    Hi experts,
    May I know what is the table with all the G/L Closing Balance. I try to look at the FAGLFLEXT but it more seems like G/L Transactional table, rather than showing the balance. Do I need to total up all the figure of previous year to get the balance? or there is some table holding the closing balance amount data?
    Thanks in advance for the enlightenment.
    Cheers,
    Isaac.

    Hi Kumar,
    Thanks for your help anyway, you are right, GLT0 does not consist of any data after the New G/L is activated.
    However, I really have no idea we can actually identify it's a Carry Forward data field. By comparing the Object Key? What you mean by the characteristics?
    What I expect initially was, there is a SAP table to store G/L Closing Balance but it seems like I am wrong. To make it easier to understand, I would like to get the balance like what it is display in FAGLB03 transaction, the Cummulative Balance.
    Hope can get some help... Thanks ya.
    Cheers,
    Isaac.

  • Customer opening debit credit balance table

    Dear Gurus,
    I  want  to  develop  zreport  customer Vendor ledger in the format Opening Debit Credit balance Is there any table contains Profit Centre , Balance ,Monthly DebitCredit ? There is table which I know but profit centre are not maintained in that table
    For Customer KNC1 and
    for vendor LFC1
    Please help
    Regard's
    Sai_abap

    Hello Shahzaib,
    Try Following,
    Select acc_id,Opening_balance, DECODE(cb.C, 0, Opening_balance, cb.C), DECODE(Cb.D, 0, Opening_balance,Cb.D)
    from COA,
    (Select cb_acc_id,sum(nvl(dabit,0)) D ,sum(nvl(credit,0)) C from cb where
    cb_acc_id=:p_1 and
    vdate < :Date_from
    Group by cb_acc_id)CB
    Where acc_id=:P_1
    Please mark if it help you or correct
    Regards,
    Danish

  • Customer balances - tables

    hi guys
    i have a requirement to make a report to age customer balances. i have noticed that there are a few tables that will contain these balances. will the line item be removed from BSID if the item is cleared? if anyone has a better understanding of the relationship of these tables please assisst. many thanks.

    There are some standard reports and also some reports may be built in the Report Painter by and FI specialist. Customer account aging is a pretty standard FI task. You might want to check with your users and FI specialist(s) first - I'm sure there are many other options besides ABAP. There is also the whole book on FI/CO reporting by SAP Press.
    Anyways, the tables are BSAD and BSID. BSAD has the cleared items and BSID - not cleared. When the items move from one table to another - that depends on your business process. Ask your FI/Accounting specialist for details or, better yet, have them create a few examples for you to play with.
    You can see the tables here:
    http://www.erpgenie.com/sap/abap/tables_fi.htm

  • Trial Balance Tables

    Hi All
    Actually my requirement is, When I run accounts receivale report profit center wise then system is showing some balances in null/dummy profit center. Now I update profit center of these documents from null to some other in table FAGLFLEXA and report is showing correct, no balances in null profit center. But effect of this is not showing in TB(Trial Balance), TB report is showing same balances. Kindly guide which other tables I have to update in order to get the effect in TB.
    Regards,
    Rajesh Vasudeva

    Hi,
    refer tables
    GLT0
    GLT1
    Also check the link:
    http://help.sap.com/saphelp_sbo2005asp1/helpdata/en/41/82a84f64254b41a05d813cdde39f82/content.htm
    to get more idea.
    Edited by: AD on Dec 2, 2008 5:28 AM

  • Open AR balance Table

    Hi All,
    Required to retrieve customer information for Open AR balance from Table. Could you tell me which table should I refer?
    Advance Thanks
    Shashikanth.M

    Hi
    All the Customer Open items are stored in BSID table. When those open items gets cleared then they are moved to BSAD table.
    Regards
    Praveen PC

  • Project Balance Table

    Hi experts!
    What are the DB tables i can retrieve the Project & WBS balance???
    I have to develop a report on project balances.
    Please help!!!
    Thank you all in advance!!!

    I suggest you for the PS to use std. reports till the time you can extend and satisfy your requirement.
    If your requirement isn ot satisfied in that case you can go for the development.
    Any way tables you can look after are
    Please refer this link
    SAP Project System - A ready Reference ( Part 2 )
    PS Tables AFAB Network - Relationships
    PS Tables IMAK Appropriation requests
    PS Tables IMAV Appropriation request variants
    PS Tables IMPR Capital Investment Program Positions
    PS Tables IMPU Texts for cap. inv. program positions
    PS Tables IMTP Capital Investment Programs
    PS Tables IMZO CO object assignment
    PS Tables PMCO Cost structure of maintenance order
    PS Tables PRHI WBS Hierarchy
    PS Tables PROJ Projects
    PS Tables PRPS Work Breakdown structures
    RPSCO : Project info database
    These are the FI /CO tables which may be helpful to you in PS context.
    FI / CO Tables BPEJ Budget revision header
    FI / CO Tables BPEP Line Item Period Values
    FI / CO Tables BPGE Overall/annual budget
    FI / CO Tables BPJA Overall/annual budget
    COSP : pri mary cost
    COSS : Sec. cost
    COEP : Actual cost
    COOI : Commitment
    COEJ : Planned cost.
    Network: AFKO, AUFK
    Activity: AFVV, AFVC
    Activity Element: AFVV, AFVC
    Milestone: MLST
    Budget: BPGE, BPJA
    Regards
    Nitin P.

  • Trial Balance table Profit Center/Cost Center

    Hi SAP Experts,
    I want to download SAP trial balance as per profit centre,cost centre, I know there are lot of standard report but I am looking for tables where I can download these values?
    Thanks,
    Suyog

    Hello Suyog ,
    Long before I had worked on such a report.
    Please try with any of the tables between FAGLFLEXA or FAGLFLEXT  ( If I have recalled correctly  )
    FAGLFLEXT is for TOTALS so I think it will be appropriate.
    Please check.

  • GL balances table and asset transactions

    I would like to know the tables where I can find the information for GL balances monthwise and which tables to look for in asset accounting for Asset transactions like acquisitions, retirements depreciation etc monthwise.
    Any clarifications will be appreciated.
    Thanks
    Krishna

    Hi,
    Try to look into these tables:
    SKA1     G/L Account Master (Chart of Accounts)
    SKAT     G/L Account Master Record (Chart of Accounts- Description)
    SKB1     G/L account master (company code)
    AGKO     Cleared Accounts
    ANAR     Asset Types
    ANAT     Asset type text
    ANEK     Document Header Asset Posting
    ANEP     Asset Line Items
    ANEV     Asset downpymt settlement
    ANKT     Asset classes- Description
    ANLA     Asset Master Record Segment
    ANLB     Depreciation terms
    ANLC     Asset Value Fields
    ANLH     Main asset number
    AT02T     Transaction Activity Category- Description
    AT02A     Transaction Code for Menu TIMN
    AT10     Transaction type
    AT10T     Name of Transaction Type
    Is it helpful?

  • Stock balance-Tables

    Dear Experts,
    Please let me know tables in SAP to display stock balances like "MARD"
    Regards
    Babu

    Hi
    It is always good to use a function module for stock rather than tables. Use function module MD_STOCK_REQUIREMENTS_LIST_API . It will improve perfomance of program and it has many features like stock bifurcation
    Regards
    Antony

Maybe you are looking for