Customer Balance Report throught Abap

Hi,
I want to develop a report Customer Balance Report in which along with details i have to display the closing and opening balance of it. As per search through SDN i come to know that BSAD,BSID tables to be used so that data can reterived and for cross checking the out put Standard Report named S_ALR_87012172 and the Tcode FBL5N ..
I want to know is this data is sufficient to start this report and the data for displaying the closing and the opening balance of the customer?

Hi  ,
To derive an opening balance, you need to decide on key date. The date one which you want to see an opening balance.
Suppose that date is wf_keydt . Then your logic for calculating opening balance should be as folloes :
  SELECT kunnr bukrs belnr gjahr buzei blart shkzg dmbtr
           INTO TABLE it_data
  FROM bsid
  WHERE bukrs = p_bukrs
  AND   kunnr IN s_kunnr
  AND   budat <= wf_keydt
  AND   hkont = p_hkont
  AND   gsber = p_gsber
  AND   bstat = space
  AND   umskz = space.
  SELECT kunnr bukrs belnr gjahr buzei blart shkzg dmbtr
           APPENDING TABLE it_data
  FROM bsad
  WHERE bukrs = p_bukrs
  AND   kunnr IN s_kunnr
  AND   budat <= wf_keydt
  AND   augdt > wf_keydt
  AND   hkont = p_hkont
  AND   gsber = p_gsber
  AND   bstat = space
  AND   umskz = space.
  LOOP AT it_data INTO wa_data.
    CLEAR wa_tab.
    wa_tab-kunnr = wa_data-kunnr.
   wa_tab-dmbtr = wa_data-dmbtr. "+nvj15102007 security deposit added in output
    IF wa_data-shkzg = 'S'.
      wa_tab-opbal =  wa_data-dmbtr.
    ELSE.
      wa_tab-opbal =  wa_data-dmbtr * -1.
    ENDIF.
    COLLECT wa_tab INTO it_tab.
  ENDLOOP.
  REFRESH it_data.
Hope this helps to you.
Btw I am leaving for the day now. Any thing else do reply to me. I will revert to you tomorrow.
Regards,
Nikhil

Similar Messages

  • Problem in making logic for customer balance report

    Hi,
    I am working on a customer balance report in which i am picking the data from BSAD and BSID tables. I am facing a problem that i am able to calculate the opening balance in it but not able to calculate  closing balance. I am comparing the data with tcode FBL5N for opening and closing  balances for a given date range.  Kindly help me out where i am getting wrong:-
    Here the link to the code :-
    http://docs.google.com/View?id=dfxswwff_11fdktr7ct
    Edited by: nav009 on Feb 6, 2010 9:30 AM

    Hi Nikhil,
    Thanks for you response but i had developed the report and  i am able to pick the correct data but i am facing the problem in displaying the NETAMT which is displaying the data using this formula :-
    1.) NETAMT = NETAMT +  W_TAB1-DR + W_TAB1-CR.
    so that the last value matches with the closing balance.
    When i am using this formula i am not able to display the correct data of deducting or addition of the opening balance in it but the value matches with closing balance .
    2.) NETAMT = NETAMT + W_OPBAL-OPBAL +  W_TAB1-DR + W_TAB1-CR.
    When i am using this formula it is showing the first value correctly but not the last one which will be displayed in the closing balance.
    I want to have desired output to display the first value to be displayed as it is showing in the (2) and last value to be displayed as  it is showing in (1) last value.
    How can i achieve this  functionality? i really want to know...
    Edited by: nav009 on Feb 10, 2010 6:29 AM

  • Hi masters, want bapi for customer balance report

    HI Masters,
                   please can any one give reply about bapi whch one is using for developing customer balance report in webdynpro java
    I want to see the customer balance report in portal through developing webdynpro java application only. for developing , i need bapi regarding customer balance report. Customer when he login the portal he has to view his ledger balance in portal.please  give reply about the bapi to see customer ledger balance . we can do by transactional iview. but i need only through webndynpro java application
    reply will appreciated.

    Hi surya,
    The tcode for customer balance report is FBL5N
    BAPI_AR_ACC_GETKEYDATEBALANCE -
    >Customer account balance at a key date .
    Regards,
    srikanth

  • How to get Daily Customer Balance Report?

    Hi
    I have received a requirement from the user where he has to send the Daily Customer balance report currently he is using the T.Code S_ALR_87012172 Customer Balances in Local Currency for fetching the monthly data.
    I want to know what are the ways to make the report and what is the best way out of them to do it. Can it be done through user Exit, BADI, query or we have to get the Z report made by the apaber.
    Also, if it is possible please tell me the way step by step for user exit, badi or query if that is to be used.
    Please help
    Thanks in advance
    Pankaj

    Thanks for your reply Aleksey...
    We are using the report S_ALR_87012172 - Customer Balances in Local Currency and user want the same report on daily basis like Total Debit/Credit, Balance carryforward and the Accumulated balance. I have checked but unable to find out any such output.
    Please suggest what to do whether to make chnges in report painter or have to write a query. If I write a query then plz suggest me the tables as I am trying to do that but unable to link the Balance carryforward and accumulated balance.
    Regards
    Pankaj

  • How can i have customer balance report at Ship to Party Level

    HI All
    My client want to have a report for  customer balances  at ship to party level
    For example for a customer ABC has 4 ship to party and they want to track Sales at each ship to party level for Customer ABC
    Regards
    Sandip

    Thanks Buddi,
    Partner function SB works the way we wanted it to.
    Regards

  • Customer balance report - S_ALR_87012172

    Hi sap gurus, I searched forum but I couldn't get enough knowledge. how does S_ALR_87012172 calculate customer's balance value? based on posting date, clearing date, document date or other date? I'm checking with fbl5n but balances are different.as I understand, other sap users have same problem but there isn't clear information.
    difference between the balance of FBL5N and the balance of S_ALR_87012172
    Difference between FBL5N & S_ALR_87012172
    S_ALR_87012172 when compared with FBL5N does not reconcile
    diff in customer balance in the report S_ALR_87012172 & fbl5n

    Hello,
    You don't need to check clearing date.
    Please select data from BSID and BSAD less equal to key date. Is it equal to total balance report?
    You can balance report per each customer, I think you can check it for wrong balance's customer.
    Please share result to me.
    Regards,
    Burak

  • Customer Balances Report problem?

    Hi,
    I am facing some problem it may have been discussed before but it is urgent so I am posting it.
    1) User wants to see the S_ALR_87012172 - Customer Balances in Local Currency on daily basis or any report which is similar to that.
    As far as I know he can't have this report on date wise for that we may have to go for the customization.
    Please suggest any other T. code or way out if we have in SAP.
    2) I have checked the records and I am confused as when I am running the FBL5N then I can see the balances for a customer
    1660000056 DR 31.03.2010 50,000.00
    5432402564 GL 31.03.2008 56,545.00-
    1900005638 AB 30.06.2007 56,545.00
    50,000.00
    which is fine as all are open items and due but when I run S_ALR_87012168 - Due Date Analysis for Open Items
    Due -                        Total OI                                      Total OI - Total OI
    NAZIMA STORES     10,681.45                                    23,809.50
    Please suggest me why is it so.
    Thanks and Regards
    Nitin

    Hi,
    Thanks for your reply PPIO_ENTRY....
    The customer does not want the report that is in FD10N and FD11 he wants the report based on the T. code S_ALR_87012172 - Customer Balances in Local Currency or something related to that.
    Please suggest...
    Thanks and Regards
    Nitin

  • Custom BI Reports Vs. ABAP for Payroll

    Hi,
    Can anyone tell the pros and cons of developing Custom Payroll Reports using BI or Custom ABAP.  There are 51K employees.
    Thanks,
    Mohan

    Hi,
    The present thinking is not to preclude one set of reports and choose the other.  Operational reporting should come from R/3 or ECC and strategic or analytic reports should come from BI. 
    That is where Portal can play an important role.  The portal can be a single point of access for both operational and analytic reports, without the user knowing where the output is coming from.
    BR/
    Mathew.

  • Vendor *** customer balance report

    hi friends
    i would like to know the balance outstanding ,at any point of time, of a vendor who is customer and
    also that of customer who is vendor . Do we have any system defined deports for this.
    thanq

    Hi Leo,
    For this scenario:
    you need to change your customer master data as well as vendor master data.
    In customer master data you give your vendor name and tick clearing with vendor in company code data of customer master.
    same with vendor master data, you need ot give your customer number in genral data and tick clearing with customer master data.
    Then you can use reports like FBL1N & FBL5N for net balance display.
    you need to tick vedor items/Customer item while executing reports.
    Best Regards
    Ashish Jain

  • Profit center wise customer balance Report with reference field

    Dear Experts
    I am using the report S_AC0_52000887 - Receivables: Profit Center but it does not show with reference.
    how can i see this report with reference. (e.g. reference field at the time of posting document) In the background of this report called by report painter and we can see the characteristics are there. I am not able to add the reference field in the characteristics. Can someone please give some insights.
    Regards,
    Vishal

    Hi Vishal,
    Please use FAGLL03 give the customer recon a/c you can see all the customers with profit center wise report.
    Regards,
    Raman

  • Customer Balance report

    While displaying customer ledger  we select city and region from the change layout but they are coming blank fields.

    Hai Kiran,
        Chek whether u selected the right field or not bcz, they may have other fields with the same name and landmark (i.e., more than 1 city and region).  Also make sure whether u given city and region field while creating Customer Master record.
    Best regards,
    Krishna

  • Customer Balances are different in 2 reports S_ALR_87012172  & S_ALR_870122

    Dear experts,
    Customer balances at reconcilation account level are showing differently in both the reports. Please advice me, how to resolve this.
    Thanks
    Ganesh

    Customer balances report shows the balances based on existing recinciliation account in the customer master.
    Financial statements report will show the balances reconciliation account wise.
    E.g. Customer XXXXX created with Recon 1
    few transactions passed
    after few days you have changed the recon account in the customer master to Recon2
    Now, Customer balances reports shows total AR due on Recon2
              Financial statement report shows AR due based on the recon account
               i.e. up to recon change it shows under Recon1
                     after recon change it shows under Recon2
    Rgds
    Murali. N

  • Customer ageing report for fbl5n

    hi all,
    I want to develop an customer Ageing Report in abap  to calculate the net due date  which is similar to the Tcode fbl5n but the problem is functional consultant told me about this tcode  and there is no such information regarding the specified tables which are to be used. I had searched in SDN also but i did not got the desired information.
    regards,
    karthik
    Edited by: k.vinu.karthik on Jul 23, 2010 7:21 AM

    Use the development tools available to you - the transaction and a sample account is all you need.  Debug, ST05, SE30, etc....

  • CUSTOMER BALANCE LINE ITEM DISPLAY WITH PROFIT CENTER WISE

    Dear Folks,
                     Please suggest whether is there any standard report related to
    customer balance report against Profit center wise or suggest the best way to create the Z  REPORT LOGIC
    Thanx In advance
    REGARDS
    ASHOK K

    Hi, Ashok 
    Welcome to SCN
    Please Don't USE ALL CAPS, it is against the Forum Rules, Check Bellow
    Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!!
    Faisal

  • In Debtors Trial Balance Report single customer only displaying

    When i run the India - Debtors Trial Balance Report the Parameter Customer LOV its showing only single customer..

    Hi Senthil,
    i just now checked this in my environment, i was able to see almost all of my customers in the LOV field...
    Also i checked the report is displaying all customers i.e. customers for which additional information is not configured in India Localisation module is also getting displayed ...
    Also i checked Oracle support environment, there are no reported issues on these lines till date ... Are you in the latest report version ...?
    Regards,
    Ivruksha

Maybe you are looking for

  • Using reflection...

    Hi, I have one class. to run that, I am calling like the following... java -classpath ;.;\comdotebo; com.pack1.MyClass now I want to take the reference of this class(dynamically) using reflection pakcage like the following... Class cla = Class.forNam

  • In a rich textarea like this i submit now but in CFML 9 , textarea text come to me formatted with ta

    in a rich textarea like this i submit now but in CFML 9 , textarea text come to me formatted with tags ?

  • Re: does anyone understand this stuff?

    I have a download speed is normaly 74 mbts donload and 20mbts upload My problem I can not make bt understand is that over the last 3 weeks the wierless speed has gone from 40 mbt anyware in the house to 0mbt most of the day even if I put my lap top u

  • Can anyone understand this?

    I have a data entry screen making use of a certain number of comboboxes. On the 4 more powerful computers in my possession, when one of the combobox drop downs 'falls out' of the dialog they are still capable of scrolling via arrows and clicking and

  • Start Date/Birth Date in IT0002

    Hi, when we create info type 0002(Personal data) in pa40. and then when we go back and look at that info type the START DATE IS AUTOMATICALLY GETTING CHANGED TO BIRTH DATE,(even if we give different start date and birth date,while creating) Please te