SAP Reports / Programs | Financial Accounting(FI) SAP FI

SAPF011 SAP ABAP Report - Carry Forward G/L Balances







SAPF011 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for This program carries forward the balances for G/L accounts...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter SAPF011 into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT SAPF011. "Basic submit
SUBMIT SAPF011 AND RETURN. "Return to original report after report execution complete
SUBMIT SAPF011 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: XTEST = Test run
Selection Text: TRTAB = Restriction of accounts
Selection Text: TRCOP = Balances in retain earng accts
Selection Text: RACCT = G/L account
Selection Text: NEWJR = Carryforward to fiscal year
Selection Text: BUKRS = Company code
Title: Carry Forward G/L Balances
Text Symbol: B02 = Additional log
Text Symbol: B01 = Processing parameters
Text Symbol: 122 = --> Specify account without OI management
Text Symbol: 121 = --> Specify account in company code currency
Text Symbol: 120 = --> Specify balance sheet account
Text Symbol: 114 = --> Define Account
Text Symbol: 113 = --> Determine rule
Text Symbol: 108 = --> Create account
Text Symbol: 107 = --> Create account
Text Symbol: 028 = Carry forward balances using program SAPFGVTR
Text Symbol: 027 = Ledger Name
Text Symbol: 026 = Company code not created
Text Symbol: 025 = Missing accounts
Text Symbol: 024 = Balance carried forward explained by
Text Symbol: 022 = Account with open item management
Text Symbol: 021 = Account currency & is not the same as company code currency %
Text Symbol: 020 = Retained earnings account is not a balance sheet account
Text Symbol: 019 = No changes made
Text Symbol: 018 = Correct errors and restart program
Text Symbol: 017 = CoCd Account Explanation
Text Symbol: 016 = Retained earnings accounts
Text Symbol: 015 = Balance sheet accounts
Text Symbol: 014 = Retained earnings account is missing (T030 - BIL)
Text Symbol: 013 = Rule is missing (T030R - BIL)
Text Symbol: 012 = CoCd Acct Ch/ac P+Ltype Diagnosis/activity
Text Symbol: 011 = for the year
Text Symbol: 010 = CoCd Account Crcy BusA To change by (TC) To change by (LC) To change by (GC)
Text Symbol: 009 = CoCd Account Crcy BusA Changed by (TC) Changed by (LC) Changed by (GC)
Text Symbol: 008 = Account not created in company code
Text Symbol: 007 = Account not created in chart of accounts
Text Symbol: 006 = Missing P+L accounts





Text Symbol: 005 = Errors occurred
Text Symbol: 004 = Error list
Text Symbol: 003 = Log
Text Symbol: 002 = Upd. run
Text Symbol: 001 = Test Run


INCLUDES used within this REPORT SAPF011

INCLUDE RKASMAWF.


TABLES used within REPORT and the associated SELECT statement:

No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

KPEP_MONI_INIT_RECORD CALL FUNCTION 'KPEP_MONI_INIT_RECORD' EXPORTING LS_DETAIL = LS_DETAIL LS_WITEM = LS_WITEM IMPORTING LS_KEY = LS_KEY_STATIC TABLES LT_SELKRIT = LT_SELKRIT LT_PARAM = LT_PARAM.

KPEP_MONI_CLOSE_RECORD CALL FUNCTION 'KPEP_MONI_CLOSE_RECORD' EXPORTING LS_KEY = LS_KEY_STATIC LS_SCMA_EVENT = LS_SCMA_EVENT CHANGING LD_APLSTAT = LD_APLSTAT EXCEPTIONS NO_ID_GIVEN = 1 OTHERS = 0.

OPEN_FI_PERFORM_00005012_P CALL FUNCTION 'OPEN_FI_PERFORM_00005012_P' EXPORTING I_CHGTYPE = 'U' I_ORIGIN = 'SAPF011 BEREINIGUNG' I_TABNAME = 'GLT0' * I_STRUCTURE = TABLES T_STRUCTURE = bw_t_GLT0 EXCEPTIONS ERROR = 1 OTHERS = 2.

FI_PERIOD_DETERMINE CALL FUNCTION 'FI_PERIOD_DETERMINE' EXPORTING I_BUDAT = SY-DATUM I_BUKRS = T001-BUKRS I_MONAT = MONAT IMPORTING E_GJAHR = GJAHR E_MONAT = MONAT.

READ_KONTENPLAN CALL FUNCTION 'READ_KONTENPLAN' EXPORTING KONTENPLAN = GUVTAB-KTOPL SACHKONTO = GUVTAB-VTKON IMPORTING KONTENPLAN_WA = SKA1 EXCEPTIONS KONTENPLAN_NOT_FOUND = 1.

READ_HAUPTBUCH CALL FUNCTION 'READ_HAUPTBUCH' EXPORTING BUCHUNGSKREIS = BUKTAB-BUKRS SACHKONTO = GUVTAB-VTKON IMPORTING KONTENPLAN_WA = SKA1 SACHKONTO_WA = SKB1 EXCEPTIONS KONTENPLAN_NOT_FOUND = 1 SACHKONTO_NOT_FOUND = 2.

READ_HAUPTBUCH CALL FUNCTION 'READ_HAUPTBUCH' EXPORTING BUCHUNGSKREIS = BUKTAB-BUKRS SACHKONTO = RACCT IMPORTING KONTENPLAN_WA = SKA1 EXCEPTIONS KONTENPLAN_NOT_FOUND = 1 SACHKONTO_NOT_FOUND = 2.

FI_TF_CHECK_SELECTION CALL FUNCTION 'FI_TF_CHECK_SELECTION' EXPORTING I_BUKRS = BUKRS[] I_GJAHR = CHECK_YEAR I_SAKON = CHECK_GL EXCEPTIONS ARCHIVE_EXISTS = 1.

FI_EMU_GET_CONVERSION_DATE CALL FUNCTION 'FI_EMU_GET_CONVERSION_DATE' EXPORTING I_BUKRS = T001-BUKRS IMPORTING E_DATE = EURO_DATUM EXCEPTIONS WRONG_INPUT = 1 COMPANYCODE_NOT_FOUND = 2 SYSTEM_ERROR = 3 OTHERS = 4.

FI_PERIOD_DETERMINE CALL FUNCTION 'FI_PERIOD_DETERMINE' EXPORTING I_BUDAT = EURO_DATUM I_BUKRS = T001-BUKRS IMPORTING E_GJAHR = EURO_GJAHR.

FI_CURRENCY_INFORMATION CALL FUNCTION 'FI_CURRENCY_INFORMATION' EXPORTING I_BUKRS = T001-BUKRS I_LAND1 = T001-LAND1 I_RCOMP = T001-RCOMP IMPORTING E_X001 = X001.

G_GIVE_LEDGERS_FOR_GLT0 CALL FUNCTION 'G_GIVE_LEDGERS_FOR_GLT0' EXPORTING BUKRS = T001-BUKRS CURTP = X001-CURT2 TABLES LEDTAB = LEDTAB.

G_GIVE_LEDGERS_FOR_GLT0 CALL FUNCTION 'G_GIVE_LEDGERS_FOR_GLT0' EXPORTING BUKRS = T001-BUKRS CURTP = X001-CURT3 TABLES LEDTAB = LEDTAB.

OPEN_FI_PERFORM_00005012_P CALL FUNCTION 'OPEN_FI_PERFORM_00005012_P' EXPORTING I_CHGTYPE = 'I' I_ORIGIN = 'SAPF011 INSERT_GLT0' I_TABNAME = 'GLT0' I_STRUCTURE = glt0 * TABLES * T_STRUCTURE = EXCEPTIONS ERROR = 1 OTHERS = 2.

READ_HAUPTBUCH CALL FUNCTION 'READ_HAUPTBUCH' EXPORTING BUCHUNGSKREIS = EXTR-BUKRS SACHKONTO = EXTR-RACCT IMPORTING KONTENPLAN_WA = SKA1 SACHKONTO_WA = SKB1 EXCEPTIONS KONTENPLAN_NOT_FOUND = 1 SACHKONTO_NOT_FOUND = 2.

OPEN_FI_PERFORM_00005012_P





CALL FUNCTION 'OPEN_FI_PERFORM_00005012_P' EXPORTING I_CHGTYPE = 'U' I_ORIGIN = 'SAPF011 UPDATE_GLT0' I_TABNAME = 'GLT0' I_STRUCTURE = bw_glt0 * TABLES * T_STRUCTURE = EXCEPTIONS ERROR = 1 OTHERS = 2.

READ_HAUPTBUCH CALL FUNCTION 'READ_HAUPTBUCH' EXPORTING BUCHUNGSKREIS = SVGTAB-BUKRS SACHKONTO = SVGTAB-VTKON IMPORTING KONTENPLAN_WA = SKA1 SACHKONTO_WA = SKB1 EXCEPTIONS KONTENPLAN_NOT_FOUND = 1 SACHKONTO_NOT_FOUND = 2.

OPEN_FI_PERFORM_00005012_P CALL FUNCTION 'OPEN_FI_PERFORM_00005012_P' EXPORTING I_CHGTYPE = 'I' I_ORIGIN = 'SAPF011 VORTRAG_AUF_VORTRAGSKONTEN' I_TABNAME = 'GLT0' I_STRUCTURE = glt0 * TABLES * T_STRUCTURE = EXCEPTIONS ERROR = 1 OTHERS = 2.

OPEN_FI_PERFORM_00005012_P CALL FUNCTION 'OPEN_FI_PERFORM_00005012_P' EXPORTING I_CHGTYPE = 'U' I_ORIGIN = 'SAPF011 VORTRAG_AUF_VORTRAGSKONTEN' I_TABNAME = 'GLT0' I_STRUCTURE = bw_glt0 * TABLES * T_STRUCTURE = EXCEPTIONS ERROR = 1 OTHERS = 2.

FAGL_GET_GLT0_SETTING CALL FUNCTION 'FAGL_GET_GLT0_SETTING' IMPORTING ED_WRITE_GLT0 = lf_fagl_write_glt0.

FAGL_CHECK_GLFLEX_ACTIVE CALL FUNCTION 'FAGL_CHECK_GLFLEX_ACTIVE' EXPORTING ID_BUKRS = lt_t001-bukrs IMPORTING E_GLFLEX_ACTIVE = lf_fagl_glflex_active * E_GLFLEX_MIG_ACTIVE = EXCEPTIONS ERROR_IN_SETUP = 1 OTHERS = 2.

FAGL_MIG_GET_MGPLN_FOR_BUKRS CALL FUNCTION 'FAGL_MIG_GET_MGPLN_FOR_BUKRS' EXPORTING IT_BUKRS = lt_bukrs IMPORTING ET_FAGL_MIG_002 = lt_fagl_mig_002 ET_MGPLN = lt_fagl_mgpln EXCEPTIONS NO_DATA_FOUND = 1 OTHERS = 2.

FAGL_GET_DATA_FOR_MGPLN CALL FUNCTION 'FAGL_GET_DATA_FOR_MGPLN' EXPORTING I_MGPLN = ls_fagl_mgpln IMPORTING ET_FAGL_MIG_001 = lt_fagl_mig_001_mgpln * E_MIGDT = EXCEPTIONS MGPLN_NOT_FOUND = 1 OTHERS = 2.

FAGL_GET_INFO_FROM_LEDGER CALL FUNCTION 'FAGL_GET_INFO_FROM_LEDGER' EXPORTING I_BUDAT = ls_fagl_mig_001_started-migdt I_RLDNR = '00' I_BUKRS = lt_t001-bukrs IMPORTING E_GJAHR = lf_mig_gjahr EXCEPTIONS NO_INFO_FOUND = 1 ERROR_IN_SETUP = 2 OTHERS = 3.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.

The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name SAPF011 or its description.