ABAP Code for SAP Finance Report General Ledger Balance Sheet

This ABAP report for SAP given output of finance module general ledger balance report with P and L. This is a inbuilt SAP report which can be used by ABAPer with required modifications.

This ABAP report code creates the balance sheet and profit and loss statement for a user defined reporting period and fiscal year. This balance sheet also uses Financial Statement Versions (FSV), which are defined during configuration. These FSVs reflect different views of the balance sheet, for example, the U.S. GAAP format, the British GAAP format, etc. The balance sheet and profit and loss statements can be viewed in comparison to prior periods or planned values.

To run this report, use one of the following access options:

1. Information systems → Accounting → Financial accounting General ledger → Balance sheet

2.Choose System → Services → Reporting and enter RFBILA00 in the Program field.

Then, click Execute to run the report.

3.In the Command field, enter F.01 and choose Enter.

Sample ABAP Code :

Generate a balance sheet for company 3000 using the financial statement version BAUS (the U.S. commercial balance sheet). The comparison years are 1996 and 1997.

To access the first screen for this report, choose Information Systems → Accounting → Financial accounting General ledger → Balance sheet.

The SAP screen looks like this and each part explain the following terms.
1. Enter CAUS in Chart of accounts.

2. Enter 3000 in Company code.

3. Select BAUS from a pull down list for Financial statement version.

4. For the Reporting year, enter 1997. Enter 1 to 16 as the comparison periods for both 1996 and 1997. Output control and parameters for special evaluations have been left with the default settings .

5. Enter 1996 in Fiscal year.

6. Choose Execute.

The output ABAP screen is as shown below.

Each part of this SAP report gives the following explanation.

A The display shows the commercial balance sheet for the USA with the current asset section shown in detail.

B The column headings list the financial statement version , the company code, and the reporting periods under evaluation.

C Each section has a subtotal and foots down to a summation for each balance sheet category.

D Both absolute and relative differences between periods are calculated. In this example finished goods changed by USD 1,249,635.54 or 1.0%.

The previous report deals with SAP Finance General Ledger balance report for ABAP with out code as it is also a default report.

SAP Finance General Ledger Account Balance Report

SAP ABAP programming code is used in extracting data from different modules of SAP using ABAP coding. Evern some custom reports are available who are all ready prepared by the giant ERP i.e SAP to make the job of large companies simple to extract data. Following is one of that kind of ABAP code and report.

General Ledger Account Balance in SAP Finance :

The purpous of the ABAP report is to lists the general ledger account balances.

Primary output includes:
  1. Balance carried forward at the beginning of the fiscal year
  2. Debit total of the reporting period
  3. Credit total of the reporting period
  4. Debit or credit balances at the close of the period
The output is normally shown for a given fiscal year, but you may use period selection fields to narrow the search to a particular period.

You must select Fiscal year, Reporting periods, and Summarization levels before running this report.

However, limiting the selection criteria will speed up searches and provide more focused results.
The output control section of the first selection screen allows for sorting based either on a standard or a corporate group version.

The sort sequence of the standard version is by:

1. Company code
2. Account number
3. Business area

To run this report, use one of the following access options:

1.Information systems → Accounting → Financial accounting General ledger → Account balances

2.Choose System → Services → Reporting and enter RFSSLD00 in the Program field.

Then, choose Execute to run the report.

3.In the Command field, enter transaction F.08 and choose Enter.

Data presented in this report is from Finance G/L account balances. This SAP ABAP report does not allow manipulation of data.

Example :

Generate a simple list of G/L account balances for fiscal year 1996, including all sixteen posting periods in that year for 2 asset accounts. Use CAUS for the chart of accounts and 3000 for the company code.

To access the first screen for this report, choose Information systems → Accounting → Financial accounting General ledger → Account balances.

Each part of the screen represents the following.

1. Enter CAUS in Chart of Accounts.

2. Enter 1000 in G/L account.

3. The Multiple Selection for G/L account appears. The desired G/L accounts can be entered individually or as a range. In this example, enter 1000 and 11000.

The green arrow to the right of G/L account field (circled on the facing graphic) is highlighted indicating that additional accounts have been selected.

4. Enter 3000 in Company code and 1996 in Fiscal year.

5. Leave the Output control settings at standard values. In this example, use 0 for the Summarization level.

6. Choose Execute.

The result screen of SAP ABAP report can be summerised as explained below.

A The report display shows the company codes, the reporting periods, the currency, and the order of the information.

B According to the standard version the balances are separated by business area. The carry-forward balance is listed for each business area.

C The reporting debit balance, reporting credit balance, and the total debit balance are listed.

Related post :

SAP ABAP Finance general ledger Line items

SAP Finance Reports General Ledger Line items

SAP provides good integration between different modules and Finance is a very vital module for any large scale company. ABAP Programming is used to extract data from finance department and some times even default reports are useful for data extraction from resource.

General Ledger Line item report for SAP Finance: lists open or cleared items. It is used for open-item managed accounts. You can use parked documents as selection criteria to capture both posted and preliminary posting documents in the same programming report.

Similar to many other standard ABAP Programming reports, you can specify the key date which separates items posted before the key date and a range of dates for clearing.

To run this report, use one of the following access options:

1.Information systems → Accounting → Financial accounting
General ledger → Select report
Information systems → Account information → Line items → G/L line items

2. Choose System → Services → Reporting and enter RFSOPO00 in the Program field.
Then, choose Execute to run the report.

you can research the line items of a particular G/L account for a specified time period, such as an accrual account and the subsequent reversals of those accruals. This report can also be used in an audit to review documents and line items posted to a company code for a specified period. This report is a good starting point before going to the Display G/L Line Items (FBL3) or Displaying Documents (FB03).

Example report of ABAP:

Using a U.S. chart of accounts and a company code, create a simple listing of G/L line items with a given Open item at key date (default is system date at time of entry) and restricted selection criteria.

To access the G/L Line Items screen, choose

Information systems → Accounting → Financial accounting

General ledger → Select report.

From the reporting tree, choose the following report:

Information systems → Account information → Line items → G/L line items.

Follow the screen as shown in the figure with following points.

1. Enter CAUS in Chart of accounts.

2. Enter 3000 in Company code.

3. Open items at key date defaults to the system date but you can change it to any desired date.
The system selects all items that posted before the specified key date and are open for this period.

The Clearing date is usually the date of the paying document or the posting date of the invoice, whichever is the most recent.

4. Choose Execute.

The output of the report is as shown.

The parts of A and B are described below.

A The screen header shows the order in which information appears in the report.

The report list is sorted by:

Company code
Account number
Business area
Posting date

B For G/L account 099000:

Accruals were setup for the interest due on notes payable.

Documents with type SA 100000299 and 100000300 cleared with documents type AB 100000625 and 100000626.

The clearing document is cross referenced on the original document.

Related post is SAP finance general ledger report .

You can find a good number ALV Reports of SAP ABAP with sample codes here.

Electonic Data Interchange Performance in SAP ABAP

Electronic Data Interchange is widely used in SAP for transfer of data among systems and ABAP programming is used during the process. The EDI process is inherently asynchronous, meaning that the user does not have to wait for the process to complete.

For example, if you create a purchase order document, you do not have to wait for a response from your business partner. After you create a document, the system carries out the EDI process behind the scene.

EDI processes consume a lot of system cycles, which can hamper system performance for other users. Each time an outbound IDoc is created, the system extracts application data, creates an IDoc, extracts the IDoc data, and creates an outbound file.

In EDI Inbound process, an application document is created from an IDoc. If the inbound transaction uses call transaction, the process is very much like a user entering data online. A huge EDI transaction volume can slow down system performance considerably.

SAP EDI Outbound in Real Time Mode

The EDI process in SAP is implemented as a series of application programs. An asynchronous process can be operated in a near real time mode by executing the various programs in a coordinated fashion, so that as soon as one program completes, the next program starts instantaneously.

In near real time mode, as soon as the application document is created, the IDoc is generated and passed to the subsystem, and the subsystem is started. This sequence gives a real−time feel, which is useful for critical EDI transactions.

This option should not be used for high volume and non critical transactions because it will cause performance problems.

The configuration option enables you to control the output at a very granular level. You can have a partner enabled for all messages to go in real−time mode or for only specific messages to go in real−time mode. The outbound interface can be thought of as a link of the following programs.

Application Transaction: Creates the application document, for example, VA01Create Sales Order, ME21Create Purchase Order ·

RSNAST00 : Starts the process of generating IDocs from the application document ·

RSEOUT00. Transfers IDocs from the SAP database to the OS, and starts the subsystem ·

The following settings are necessary to achieve near−real−time behavior .

In Message control, the dispatch time of the output type should be set to 4 (immediate). On the output control screen, you can reach this setting by clicking the Further Data button.

In the partner profile for the outbound message, the output mode should be Transfer IDoc Immediately and Start Subsystem .

SAP Electronic Data Interchanges Update :

EDI or Idoc of SAP Outbound in Batch Mode

Batch mode is appropriate for non−critical and high−volume transactions. This mode is useful from a performance perspective because output is not generated immediately upon the creation of the application document of edi.

You can control the process at two stages, depending on your company's needs. The first point of control is at the Message control level. When an application document is created, you can set up the process to start creating the IDocs as a batch process by setting the dispatch time in the Message control output screen to 1.

In this case, a record is created in the NAST table with the application document number. Buffering IDocs at this stage provides the highest performance benefits because there is no load on the system from an EDI perspective. You can schedule the process to run when the system is not loaded, such as at night. The only drawback with this approach is that any outbound process errors will not be discovered until the process is executed.

At this stage, you use the RSNAST00 program to start the process of generating IDocs. Several instances of this program can be scheduled with different variants to achieve the desired results.

The previous post is regarding SAP ABAP Finance sample report.

Learn about complete Electronic Data Inter Change of SAP ABAP here.

Relevant topics are EDI outbound process overview , via message control of EDI , via Function module .

ABAP Sample Report on Finance General Ledger Accounts list

ABAP reporting is a vital part of SAP which helps in extracting data from different modules of SAP using ABAP. Here we are going to discuss some sample and important reports of ABAP which helps us to understand SAP and ABAP in a better way.

Finance General Ledger Accounts list

This report provides a listing of the General Ledger (G/L) accounts. The content can range from a simple description to more detailed information consisting of a G/L master record, such as document entry control and account management.

Depending on your specific needs, you can list the G/L accounts either as a simple range of accounts or as a combination of charts of accounts. You can base your selection on company codes, text, etc.

You can use this ABAP report to obtain a wide range of information:

1. Within the same chart of accounts, you can locate which G/L account is assigned to what company code.

2. If the reference field (Alternate account number) has been entered in the G/L master, you can create a list that has both the current account number and the reference number for the legacy chart of accounts.

3.Search with the output criteria of document entry control to determine which accounts are configured for automatic postings.

The selection screen of this sap abap report includes:
  1. Variants
  2. Dynamic selection options
  3. User variables
  4. Execution (and print) in background
  5. The report list includes a listing of G/L accounts, grouped by account group.
To run this ABAP report, use one of the following access options:

1.Information systems → Accounting → Financial accounting
General ledger → Periodic Processing → Info System → Report Selection
Lists → Account → Company code acct directory → G/L accounts list


2.Choose System → Services → Reporting and enter RFSKVZ00 in the Program field.
Then, choose Execute to run the report.

This report contains data obtained from G/L account of SAP master records. As such, this data cannot be manipulated.

To access the first screen for this ABAP programming report, choose

Information systems → Accounting → Financial accounting
General ledger → Select report.

From the reporting tree, choose the following report:

Lists → Account → Company code acct directory → G/L accounts list.

1. Under General selections, enter CAUS in Chart of accounts.
2. Enter 3000 in Company code.
3. Choose Execute.

A The report output shows that the G/L accounts are selected for the U.S. chart of accounts.
B The display is sorted first by the G/L account and then by the company code.
C The listing of each G/L account shows the name of the account and any specific information for
the account.

In this programming ABAP example:

Account 1000 is for Land
Company code is 3000
Account belongs to the account
group ANL and is maintained in U.S. dollars (USD)

Remaining part of ABAP PROGRAMMING sample reports will be discussed in the further posts.

SAP ABAP Example report on Finance General Ledger with out programming :

Create a report for a range of accounts and company codes to determine which accounts are assigned to a certain company code.

In the selection screen of ABAP Program

1.Enter a range (for example, 200000 to 299999) in G/L account.
2. Enter CAUS in Chart of accounts to limit your range of G/L accounts.
3. Enter a range of company codes (for example, 3000 to 4000) in Company code.
4. Under Output control, select Creation data for company code.
5. Choose Execute as shown below .

The output screen of SAP ABAP Is as shown with symbols.
A Company codes (listed for each G/L account)
B Creation date and name of person who created the account assignment

Example Three for SAP FINANCE in abap programming :

Create a report to determine which accounts belong to which account group within a chart of accounts.

1.Enter CAUS in Chart of accounts.

2. Enter 3000 in Company code.

3. Scroll down the screen to the Output control.

4. Enter 2 in Account sorting. This option sorts the accounts first by account group, then by G/L

5. Choose Execute.

The previous post deals with EDI tools for sap abap.
SAP Controlling and daily processing
 SAP Financial and Controlling Overview
SAP Controlling Information System
 SAP Financial Company OrganizationCustomizing 
SAP Controlling Creating General ledger accounts in sap controlling

Electronic Data Interchange Tools for SAP ABAP

Electronic Data Interchange Tools are used in SAP ABAP are used to transfer data with in the SAP system and even outside the system.

Here we have previously discussed regarding EDI restating tools and here is the continuation for that discussion.

Manual Restart is useful when an error has occurred outside the SAP system or a strange error occurs in the SAP system. If the error occurs in the EDI subsystem, the SAP system can resend the IDoc only for status codes

04 (Error within Control Information of EDI Subsystem) ·

05 (Error during Translation) ·

In other cases, you have to fix the problem within the subsystem. For unexplained errors within the SAP system, it is best to restart from the application document.

For example, if you created an application document for which an output type is proposed with a timing of 1, the system would wait for the RSNAST00 program to execute and process the output type. However, in the meantime, someone could delete the application document, and the RSNAST00 program would be thoroughly confused then we have to restart the Electronic Data Interchange process from the beginning once again.

The steps to purge an IDoc from a work item are straightforward includes identifying the work item that was sent to you for the error situation you want to purge. Execute the work item and look for the Delete button. After you click the Delete button, the IDoc is marked for deletion and gets a status code of 31 (ErrorNo Further Processing). This step prevents the EDI or ALE tools from accidentally reprocessing the IDoc.

EDI Inbound Process Failures

The inbound process is a sequence of asynchronous processes, and failure can occur within any process. The points of failure on an inbound process are
  1. An error in triggering the SAP system from the EDI subsystem .
  2. An error in creating the IDoc ·
  3. An error in the ALE/EDI interface layer ·
  4. An error in the posting function module ·
  5. Unknown or mysterious errors.
Reporting EDI inbound Problems

When problems occur in the inbound process, the system uses the technique most suitable at that point to report the problem. The main technique used is the workflow component, but workflow is not started until an IDoc file is passed to the SAP system. After control is passed to the SAP system for processing, the SAP system logs the problems and reports them via workflow.

The EDI subsystem handles problems encountered in processing an inbound EDI document on the EDI subsystem. You will have to check with the subsystem vendor for a troubleshooting guide. However, you can design your EDI subsystem to send a TXTRAW message to the SAP system to report problems. This message can be directed to the EDI administrator.

The mechanism used here is

1.Purging the Outbound Process

2.Errors that occur in triggering the SAP system from the EDI subsystem are logged in the system log and are reported to the subsystem as RFC errors. No workflow is started until this point. Thus, errors up to this point have to be monitored at the EDI subsystem level.

3· From the point when an IDoc has been passed to the SAP system to the point when it is created in the database, errors are logged in the EDFI2 table (file log). A workflow message is also generated to inform the EDI administrator.

4· After an IDoc is created, errors are logged in the IDoc's status record, and problems are reported via workflow.

5· The system performs some basic integrity checks on the IDoc. After the basic checks, the control information is matched against a partner profile. If a partner profile is not found, the IDoc gets a status code of 56 (IDoc with Errors Added), and a workflow message is sent to the EDI administrator.

6· After an IDoc is created, a syntax check is done, the IDoc goes through version change, and conversion occurs. If an error is found, the IDoc gets a status code of 60 (Error during Syntax Check of IDoc Inbound). A workflow message is sent to the responsible person (as identified in the partner profile).

7· The IDoc is then passed to the posting module. If the posting module returns an error, the IDoc gets a status code of 51 (Application Document Not Posted). A workflow message is sent to the responsible person (as identified in the partner profile). There are several reasons for failure of an application document, but in most cases, the problem is with the data.


When an incoming IDoc is successfully posted, it gets a status code of 53 (Application Document Posted).

Troubleshooting for Inbound Errors of Electronic Data Interchange for Idoc is

The best approach for troubleshooting an inbound process is to check the SAP Inbox first. If there is no error message, check the IDoc list for any problems.

Resolving Application Errors of EDI:

Execute failed processes in foreground mode. If the posting program in SAP uses call transaction,
you can restart the process in foreground mode and step through each screen until you find the problem. To see whether your posting program uses call transaction, execute transaction BD51.

1.Entries with a value of 1 or 2 use call transaction.

2.Edit failed IDocs. Editing a failed IDoc is a quick fix for data−related problems. For example, if your vendor sends in a wrong material number, you can change the value in the IDoc. You can then restart the process, and the document should post.

SAP makes a backup copy of the original IDoc and assigns it a status of 70 (Original of an IDoc that was Edited). You should not use this technique as a permanent fix, however, because doing so addresses only the symptoms, not the cause of the problem.

Further posts will contiune discussing the Electronic Data Exchange for SAP ABAP .

SAP Financial Cost Management
 SAP Financial Dunning 
SAP Financial Lock Box 
SAP Financial Interest Calculation
SAP Financial Payment Cards