G/L Acc  Opening Balances.............

Hi  ........
  I am working on ECC 6.0 . I am developing a report which will fetch the opening balance for the starting date in given select options and closing balance for last date in given select options and need to show all the Dr , Cr  transactions between these dates for given G/L Account...
Plz help in solving this...
I am using FAGLFLEXT Table

How can i use BAPI...
PLZ Check is it right way....
Plz tell if any Mistakes
REPORT  ZFIIN_REP_OPENINGBAL.
TABLES : FAGLFLEXT,BSIS.
data : ret like bapireturn ,
       L_FISCAL_YEAR LIKE  BAPI0002_4-FISCAL_YEAR ,
       L_FISCAL_PERIOD LIKE  BAPI0002_4-FISCAL_PERIOD ,
       FIRST_DAY   LIKE  BAPI0002_4-POSTING_DATE ,
       BALANCE_CARRIED_FORWARD LIKE  BAPI3006_4-BALANCE.
data : AC_BAL type standard table of   BAPI3006_4 with header line.
parameters : CCODE LIKE  BAPI0002_2-COMP_CODE ,
             GLACCT LIKE  BAPI3006_0-GL_ACCOUNT,
             CURRTYPE LIKE  BAPI3006_5-CURR_TYPE.
select-options : PDATE for  sy-datum .
CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
EXPORTING
COMPANYCODEID = CCODE
POSTING_DATE = PDATE-low
IMPORTING
FISCAL_YEAR = L_FISCAL_YEAR
FISCAL_PERIOD = L_FISCAL_PERIOD.
  WRITE  : /10 L_FISCAL_PERIOD , 30 L_FISCAL_year .
CALL FUNCTION 'BAPI_CCODE_GET_FIRSTDAY_PERIOD'
   EXPORTING
     COMPANYCODEID             = CCODE
     FISCAL_PERIOD             = L_FISCAL_PERIOD
     FISCAL_YEAR               = L_FISCAL_year
  IMPORTING
    FIRST_DAY_OF_PERIOD       = FIRST_DAY
   RETURN                    = ret
   WRITE  : /10 FIRST_DAY  .
   CALL FUNCTION 'BAPI_GL_ACC_GETPERIODBALANCES'
     EXPORTING
       COMPANYCODE                   = CCODE
       GLACCT                        = GLACCT
       FISCALYEAR                    = L_FISCAL_year
       CURRENCYTYPE                  = CURRTYPE
    IMPORTING
      BALANCE_CARRIED_FORWARD       = BALANCE_CARRIED_FORWARD
     RETURN                        = ret
     TABLES
       ACCOUNT_BALANCES              = AC_BAL
loop at ac_bal.
write : /10 ac_bal-COMP_CODE  ,
      30  ac_bal-GL_ACCOUNT  ,
     50 ac_bal-FISC_YEAR ,
     70 ac_bal-FIS_PERIOD  ,
    90  ac_bal-DEBITS_PER ,
    110  ac_bal-CREDIT_PER ,
    134  ac_bal-PER_SALES      ,
    150  ac_bal-BALANCE     ,
    170  ac_bal-CURRENCY ,
    190  ac_bal-CURRENCY_ISO .
endloop.
  if ret-type = 's'.
    message i001(zfi01).
else.
message i002(zfi01).
   endif.

Similar Messages

  • Entering opening balance for a new company

    Hi all
    I am using AP, GL and CM. After successful testing on test environment the customer now is forwarding in live environment.
    He has prepared open balance for all accounts and i should migrate these balances in the system.
    This balance sheet prepared from the customer is balanced so debits equals to credits.
    The currency of this company is ALL, and in this document there are few accounts that are in EUR and USD, but in total the converted amounts of these accounts(accounts that has balance in foreign currency) together with other accounts in ALL are balanced.
    Now i have to enter in the GL module three different journals, one in ALL, one in EUR and the last one in USD, with the exchange rates given by the customer.
    The question is here. These three journals are not balanced, and i wanted a suggestion which is the best way to enter the open balance for this customer.
    Thank you and best regards

    Hi Octavio
    So the document sent from the customer is like this:
    Acc. No------------Debit ALL-----Credit ALL----------Debit EUR-------Credit EUR----------------Debit USD----------Credit USD
    Acc. 1--------------100
    Acc. 2--------------150-------------------------------------100
    Acc. 3--------------150-------------------------------------100
    Acc. 4--------------200-----------------------------------------------------------------------------------------200
    Acc. 5--------------200-----------------------------------------------------------------------------------------200
    Acc. 6---------------------------------800
    Now accounts in foreign currency should have their balances in foreign currency and the converted amount is giving the balance in local currency.
    so i have to register three journals or am i wrong?? As you can see the journals in each currency are not balanced.
    Thanks again
    Edited by: user567002 on Nov 26, 2010 3:13 AM
    Edited by: user567002 on Nov 26, 2010 3:15 AM

  • Cost of Inventory Opening Balance

    Dear all,
    I understand from the accounting terms that COS = opening stock+purchases-closing stock.
    I need to input the cost of inventory (COS)as opening balance. What account should I debit/credit. I have inventory account, Inventory opening balance suspense account, and the GL opening Balance suspense account.
    Kind Regards,
    Asif

    Hi!
    When doing a Opening Balance for Stock via Initial Stock Window, System will automatically post a Debit Entry to Inventory Acc which based on the Set G/L Accounts By Inventory Acc you mention in ItemMaster and Credit the Inventory opening balance suspense account (you need to map this on Opening Balance Acc Field on the Screen)

  • Opening balance for Bp

    Hi all,
    i have setted the system currency and local currency to INR.default account currency is all currencies.
    i have created three BP i.e. customers having currency US $,canadian dollar,GBP.
    when i am entering opening balance and putting the value in FC currency,it is giving an error:"Invalid currency message[131-74]".
    client giveen me the opening balance in the customer specic currency.
    how to solve this,
    Regards,
    neetu

    Hai!
    1. Set Opening Balance Offset Acc currency to multi currency
    > Set it in COA window of that Acc.
    2. Set BP currency to US Dollors.
    > set it in BP Master.
    Remember, if BP currency set to US Dollors after a transaction it can't be changed.
    Now, OB FC will be enable, type Amount as USD 1000 (if u type only amount it pop error)
    Test it in Test DB
    Regards,
    Thanga Raj.K

  • How can I offset my BP Opening Balances?

    Dear Experts,
    I have keyed in my BP Opening Balances via the Administration > System Initialization > Opening Balances > BP Opening Balance.
    Now, I have opening balances in my business partners, in what ways can I clear off this balances when I issue or receive payments for this BPs in the future.
    Much Thanks for your advice in advance.
    Warmest Regards,
    Chinho

    Hi!
    First, you don't need to clear the Opening Balance Offset Acc for BP.
    The Sum of Opening Balance offset Acc - BP,Opening Balance offset Acc - Inventory,Opening Balance offset Acc - GL will be equal to zero.
    when u receive payment fr the OB against the Customer.
    1. Open Incoming Payment Screen
    2. Select your Customer
    3. In matrix u will find the OB
    4. Edit the Total Payment Amount to Amount u received
    5. Do payment via Payment Means
    6. Reconcill the Partial Amount of OB and Payment u received via BP Internal Recon.

  • FBCJ - Opening Balance not reflecting

    Hi friends,
    I configured Cash Journal for 1 additional GL.
    Prior to activation this GL had a balance of 10,000.
    However this does not show as opening balance in the cash journal. Opening balance shows as "O'
    What is the reason for this & what changes (if at all) do i need to make for the same.
    Regards,
    Vikrant Sood

    Hi,
    Earlier account balance in the cash journal GL will not be treated as Opening balance for the Cash journal's cash balance.
    Please create a new GL and assign the same in the config via FBCJC0
    You might have created a business transaction for Cash Receipts by FBCJC2 tcode.
    select check box for Acc Modifiable for the above business transaction
    and try to post one cash receipt document through the above said business transaction in FBCJ and give GL of your OLD cash journal GL account number.
    Enter the amount.
    Then system will credits the old CJ GL account and debits the cash journal new GL.
    Then this posting value will be treated as Opening balance for the ongoing transactions.
    hope this might fix the problem
    Thanks,
    Srinu

  • How to find Opening Balance for Cash Book

    Hello Friends,
    I am Creating one Report for Cash Book.(Means : For Perticuler GL Account)
    I have no idea how to find Opening Balance for some Perticuler Date.
    Ex.
         Current date: 07/06/2007
        and i want to find Opening Balance on 26/05/2007
    i have Function for Calculating Opening Balance,                                                                               
    Group No: 3006             Business Object General Ledger Account  
    BAPI_GL_ACC_EXISTENCECHECK     Check existence of G/L account                  
    BAPI_GL_ACC_GETBALANCE     Closing balance of G/L account for chosen year  
    BAPI_GL_ACC_GETCURRENTBALANCE  Closing balance of G/L acc for curr year
    BAPI_GL_ACC_GETPERIODBALANCES  Posting period balances for each G/L account    
    but they show current opening balance, and i want for perticulaer Date..
             How to find Opening Balance for Cash Book
    please Help me out
    Thanks
    Gaurav Tripathi

    Hi Maruthi,
       Opening balance for a cutomer for a given period, u need to first find closing balance of that customer in the previous period. For eg. Suppose u want to find opening balance for customer 'A' for month of Nov'06, then U have to find wot was his closing balance in at end of Oct'06. Hope this solves u r problem

  • Opening Balances and Closing Balance of customer

    Hi,
    Does SAP provide any standard customer account statement for Opening Balances and Closing Balance for specific date range have given in selection screen?
    The statement also contains reference number, order, and Delivery number.
    Note: FBL5N Transaction code will not sufficient for the requirement, so looking for any other transaction code / report provided by SAP already for it.
    Thanks in advance,
    Shwetha

    Hi,
    There are several standard reports which could be easily accessed through the menu (Accounts Receivable - Information systems). If none of these reports does not suit your requirement, you have to develop your own.
    Regards,
    Eli

  • Table for Customer and vendor open balance on a key date

    Dear All,
    Can anyone please let me know Table for Customer and vendor open balance on a key date. We are developing one customized report.
    I have checked with the below table :
    Customer-KNC1, KNC3,BSID, BSAD
    Vendor-LFC1, LFC3, BSIK, BSAK.
    But these are not working properly for all customers and vedors. Also, in open items, there are items with clearing documents.
    Plesae let me know, how to go for it.
    Please suggest.

    Hi
    Use BSID and BSIK for open items
    And pass company code, year and from date and to date range in Posting date selection option
    Reg
    Vishnu

  • Fixed Asset Opening Balance

    Hi,
    Any idea to do (by import and manual create) the opening balance for fixed asset Mmaster data? Tried to search SAP notes or guide, only can find related topic on Import FA Master Data and not manual create of FA Master Data, and how to import the FA Master Data with belong to same Asset Type (same life-span) but due to purchase at different timing, now having different remaining life span).
    Thank you.

    Hello,
    I am sorry for unclear answer. I did not mean that you have to develop addon.
    after checking our client database, I see that one asset class will have same useful life and depreciation type which it means that different asset class can only the way to have different useful life (UL), and of course it will be different in depreciation type (DT).
    For example : machine A : UL : 96, DT : SL12.5
                         land        B ; UL 250  DT : SL25.
    Hope you also could discuss with SAP support about this.
    Rgds,

  • Fixed Asset - Manually enter opening balance

    Hi,
    It's possible to manually enter fixed asset opening balance? anyone wanna share ways of manually enter? l only tried on import way.
    Thanks in advance!
    Phoebe

    Hi,
    There is no feature that can be used to upload FA opening balance amount in the fixed asset addon.
    If you refer to fixed asset master data import, you can use template fixed asset master data to import the master data.
    JimM

  • Customer line items with balance carry forward no opening balance

    Hello FI Experts,
    We have ticket where the user is using a Z* Report for Customer line items with balance carry forward. In 31.01.2007 user has posted some legacy data, latter he was executing this Z* report then user can see the values posted on the same day (31.01.2007) as line items. But he was executing the report on 01.02.2007 then he was not able to see the line item as well as the values posted on 31.01.2007 as opening balance as on 01.02.2007. But if we run the report as on 01.01.2008 then we are able to see the values which are carry forwarded as opening balances. Did anyone have worked on this type of scenario?
    Requirement Here Is:  The values that have been posted on 31.03.2007 which are still open line items should get displayed as opening balance as on 01.02.2007.
    Thanks for helping on this issue.

    Hi,
      Any report will get data from Tables. Please check whether the table you have used to develop this report has opening balance.
    Balance will be carry forwarded only when you run the balance carry forward program. Check whether this was run for the date you have specified. This can be done in the year end.
    If you are checking in the middle of the year, then the balance will not be carry forwarded.
    Regards,
    B. Radhika.

  • Debit,credit ,opening balance,closing balance..doubt.

    Dear friends,
                   I am working in FI report (vendor balance for date ranges) .Its a ALV report. I want to fetch the datas for debit ,
    credit,opening balance,closing balance,for the paticular vendor or all vendors for date ranges.the table for this iam using is BSIK AND LFC1.
    all the datas stored in the table is for month wise,but my programe (my user needs even for day wise) how to calculate this,
    or is there any function modules avaliable  or can u konw any other table storing day wise balances...this report is urgent ..
    any one pls suggest me .advance thanks..
    regards
    veera

    if user wants day wise then make use of BSAK+BSIK, here u will get all line items daywise , i mean to say Posting daywise.
    BUDAT        31.03.2003---->posting date
    BLDAT        31.03.2003
    CPUDT        31.03.2003
    WAERS        INR
    XBLNR        T&E-29-30.3-PNPT
    BLART        PA
    MONAT        3
    BSCHL        31
    ZUMSK
    SHKZG        H------------>D/C
    GSBER--------------------->Business Area
    MWSKZ-------------------->tax Code.
    DMBTR        1,507.00
    WRBTR        1,507.00
    regards
    Prabhu

  • Posting Open Balance to a All Currencies G/L Account

    Hi All,
    I have a situation for which some assistance is required.
    I am trying to post opening balance to the G/L bank account which is defined as ALL Currency.
    On the G/L the system show that Account as Currency = All Currencies and adjacent to the Balance it shows that currency ID  as GBP.
    This account is a $ Account and I want to post the Open Balance in $. However, when I try to create the Open Balance the FC columns are disabled.
    What am I missing?
    Best regards
    Earl

    Hi Earl,
    There is nothing wrong.  If it is a MC account, all JE would be based on LC.  Hence only LC would be allowed for Opening Balance. If it is not LC, convert it to LC for posting.
    Thanks,
    Gordon

  • How to create a first row in crystal report as opening balance which contains two columns with debit and credit

    I have created a crystal report with credit and debit column. Balance column created on the report. Report running with cummulative balance. THis report contain an option for date range. If i filtered this report its not showing the actual balance. I need
    a first row to indicate previous balance as opening balance in this report.  And following is the formula for balance column.
    Whileprintingrecords;
    Shared Numbervar balance;
    Shared Numbervar display;
    balance:={@debit}-{@credit};
    display:=display+balance;
    display

    As this question is out of the T-SQL queue, thus I would suggest you consult Crystal Report questions to the correct forums.
    C#
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral
    VB
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral
    people there have more knowledge on Crystal Report.

Maybe you are looking for

  • Object in import-file header does not correspond to the migration object

    Hi Forum, I have loaded Business partner successfully with the file created in Workbench with test data. Now I want to load the data from Application server. But i am getting the error "Object in import-file header does not correspond to the migratio

  • Help with color management ...

    Hi, I have a brand new canon 5D MKII, brand new Canon ipf6100 and brand new Lightroom 3 running on brand new Win7/64. Can anyone currently using this combo please tell me what camera and printer color space you're using with happy results and whether

  • Valuation control in material master and special stock differs

    Hello expert. SAP is showing  the attach error when a key user is trying to making a usage decision What can be the problem?  And how can i resolve? Check the attach file. thank

  • "Tell a friend"- how to?

    Hi, I'm looking for a HTML code that enables friends etc. to "Tell a friend" via e-mail from my website. I'd prefer advice of one that also allows for senders to forward a message. Also if anyone knows a code that forces text boxes to loose the edge,

  • Printer does not work with Time capsule

    I have a cannon mp960 which up until recently has been hooking up wirelessly to my mac via Time capsule. Yesterday I couldn't print. I was able to print when I directly hooked up the printer to the computer. When I attempt to switch it back it will s