SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

BAPI for getting opening or closing balance of G/L account



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> FI
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Wed Oct 24, 2007 10:43 pm    Post subject: BAPI for getting opening or closing balance of G/L account Reply with quote

BAPI_GL_GETGLACCBALANCE - Closing balance of G/L account for chosen year.

Functionality
This method provides the ending balance of a G/L account for the fiscal year selected. The user decides whether the balance is provided in the transaction or company code currency. Exceptions are G/L accounts kept in various transaction currencies. In such cases, only the company code currency is allowed. The balance determined by the system and the currency are provided. Should problems arise, they are reported in a return code.

Notes
The same authorization checks are carried out as those for display authorization within a R/3 transaction. The entry parameter COMPANYCODE is not converted, so that the leading zeros in this parameter are not cleared. This is also the case for parameter GLACCT. G/L account numbers have to be entered with leading zeros (for example, 0000113100). Messages are provided in parameter RETURN. In the parameter documentation, you can find information on return values and their meanings.

Code:
CALL FUNCTION 'BAPI_GL_GETGLACCBALANCE'
  EXPORTING
    COMPANYCODE           =
    GLACCT                =
    FISCALYEAR            =
    CURRENCYTYPE          =
" IMPORTING
"   ACCOUNT_BALANCE       =
"   RETURN                =
          .
 


BAPI_GL_GETGLACCCURRENTBALANCE - Closing balance of G/L account for current year.

Functionality
The method provides the ending balance of a G/L account for the current fiscal year. The user decides whether the balance should be provided in the transaction currency or the company code currency. Exceptions are G/L accounts kept in various transaction currencies. In this case, only the company code currency can be used. The system provides the balance and currency determined. Should problems arise, they are reported in a return code.

Notes
The same authorization checks are carried out as those needed for display authorization in the R/3 transaction. The entry parameter COMPANYCODE is not converted, so that leading zeros in this parameter are not cleared. No conversion is made for parameter GLACCT either. G/L account numbers have to be entered with leading zeros (for example, 0000113100). Messages are reported in parameter RETURN. You can find the return values and their meanings in the documentation for this parameter.

Code:
CALL FUNCTION 'BAPI_GL_GETGLACCCURRENTBALANCE'
  EXPORTING
    COMPANYCODE           =
    GLACCT                =
    CURRENCYTYPE          =
" IMPORTING
"   ACCOUNT_BALANCE       =
"   RETURN                =
          .


BAPI_GL_GETGLACCPERIODBALANCES - Posting period balances for each G/L account

Code:
CALL FUNCTION 'BAPI_GL_GETGLACCPERIODBALANCES'
EXPORTING
companycode = pe_bukrs
glacct = pe_hkont
fiscalyear = l_gjahr
currencytype = '10' "Moneda local
* IMPORTING
* BALANCE_CARRIED_FORWARD =
* RETURN =
TABLES
account_balances = i_balance
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> FI All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.