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

J_1GALTB SAP ABAP Report - *** Obsolete *** Ledger Trial Balance







J_1GALTB is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for General/Analytical ledger official trial balance...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 J_1GALTB 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 J_1GALTB. "Basic submit
SUBMIT J_1GALTB AND RETURN. "Return to original report after report execution complete
SUBMIT J_1GALTB 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: BUDAT_S = Posting date selection
Selection Text: MONAT_S = Fiscal period selection
Selection Text: P_OBELNR = Opening document
Selection Text: P_OFFR = Official run
Selection Text: P_SPEC = Include special periods
Selection Text: SPRE = Include previous year balance
Selection Text: S_2CURR = Amounts in 2nd local currency
Selection Text: S_ACCH = Company Ch. of Acc.
Selection Text: S_ALTK = Alternative Ch. of Acc.
Selection Text: S_ASCH = In the selected chart
Selection Text: S_BALR = Account Balance
Selection Text: S_BUDAT = Posting date
Selection Text: S_BUKRS = Company code
Selection Text: S_CHART = Company Ch. of Acc.
Selection Text: S_CMPDAT = Print company data
Selection Text: S_CONTPG = Continuous page numbering
Selection Text: S_DIFF = Tax difference Ledger
Selection Text: S_FAST =
Selection Text: S_GJAHR = Fiscal year
Selection Text: S_GROUP = Group Ch. of Acc.
Selection Text: S_GSBER = Business Area
Selection Text: S_HKONT = Account
Selection Text: S_INCLN = Include accounts not posted to
Selection Text: S_INCLZ = Accounts with zero balance
Selection Text: S_JOIN = Map difference accts to main
Selection Text: S_KTOKS = D Account group
Selection Text: S_LEDGER = Special Ledger (SPL)
Selection Text: S_LEDSEL = Type of Accounting
Selection Text: S_LEV1 = Level 1
Selection Text: S_LEV2 = Level 2
Selection Text: S_LEV3 = Level 3
Selection Text: S_LEV4 = Level 4
Selection Text: S_LEV5 = Level 5
Selection Text: S_MAIN = Main Ledger
Selection Text: S_MONAT = Fiscal period
Selection Text: S_NOUL = Condensed output layout
Selection Text: S_PAGENR = Print page numbers
Selection Text: S_PSEL = Print user selections





Selection Text: S_RTITLE = Print report title
Selection Text: S_S12 = Fiscal year spans over last
Selection Text: S_SEPAR = Account level separator
Title: *** Obsolete *** Ledger Trial Balance
Text Symbol: 901 = All amounts will be printed in currency GRD
Text Symbol: E00 = Next official run for company $
Text Symbol: E01 = Please specify one posting period
Text Symbol: E02 = and accounting type $ is for period:
Text Symbol: E03 = is for accounting type $ and period:
Text Symbol: E04 = Please specify general or analytical ledger
Text Symbol: E05 = Text not found for account
Text Symbol: E90 = Error determinining fiscal period for date &
Text Symbol: E94 = Posting dates range expands to different periods :
Text Symbol: E96 = The dates selected do not correspond to one
Text Symbol: E97 = calendar month
Text Symbol: EPG = Please fill in the opening document number
Text Symbol: F00 = ERROR LOG
Text Symbol: F01 = Alternative acct no.not maintained for following accts, no balance issued :
Text Symbol: F02 = Company codes have no 2nd currency defined :
Text Symbol: F03 = Company codes have no group chart of accounts defined :
Text Symbol: F04 = Accounts with undefined group chart of accounts :
Text Symbol: F05 = Cannot determine the Fiscal periods for companies :
Text Symbol: F06 = The range of posting dates in not within the same Fiscal year for companies :
Text Symbol: F07 = Due to user selections, need to read from extended ledger-which is not defined in the program- for the following companies :
Text Symbol: F08 = The following company codes and charts of accounts do not have analytical ledger ( table TJ1GS )
Text Symbol: F09 = Text not found for account
Text Symbol: F29 = There is no assignement for these combinations of ledger and company codes
Text Symbol: F31 = Company codes have no (or have wrong) CoA structure in J_1GGS :
Text Symbol: IS1 = No ledger selection is meaningless...
Text Symbol: LL1 = TOTALS FOR LEVEL 1
Text Symbol: LL2 = TOTALS FOR LEVEL 2
Text Symbol: LL3 = TOTALS FOR LEVEL 3
Text Symbol: LL4 = TOTALS FOR LEVEL 4
Text Symbol: LL5 = TOTALS FOR LEVEL 5
Text Symbol: LL6 = TOTALS FOR LEVEL 6
Text Symbol: P01 = Trial Balance to ASCII file
Text Symbol: S01 = Failed to determine summary table for ledger
Text Symbol: S02 = table's structure is not the appropriate.
Text Symbol: S03 = Please check!





Text Symbol: TB1 = General selections
Text Symbol: TB3 = Reporting period(s)
Text Symbol: TB4 = Control
Text Symbol: TB5 = Account levels
Text Symbol: TGA = A/L
Text Symbol: TGB = G/L + A/L
Text Symbol: TGG = G/L
Text Symbol: W01 = For posting dates, default fiscal variant K4 taken
Text Symbol: 900 = Company code not present in the master records
Text Symbol: 512 = ANALYTICAL LEDGER TRIAL BALANCE
Text Symbol: 511 = GENERAL LEDGER TRIAL BALANCE
Text Symbol: 510 = COMPANY TOTALS
Text Symbol: 509 = CARRY FORWARD TO
Text Symbol: 508 = PAGE TOTALS
Text Symbol: 507 = CARRY FORWARD FROM
Text Symbol: 506 = PAGE :
Text Symbol: 505 = RUN DATE :
Text Symbol: 504 = FROM POSTING DATE $ TO POSTING DATE &
Text Symbol: 503 = FROM PERIOD $ TO PERIOD & FISCAL YEAR %
Text Symbol: 502 = POSTING DATE : $
Text Symbol: 501 = PERIOD : $ FISCAL YEAR %
Text Symbol: 500 = TRIAL ÂÁLÁÍCE
Text Symbol: 417 = CREDIT
Text Symbol: 415 = DEBIT
Text Symbol: 414 = BALANCE
Text Symbol: 412 = BALANCES
Text Symbol: 410 = TOTALS
Text Symbol: 408 = REPORTING PERIODS
Text Symbol: 407 = CREDIT
Text Symbol: 406 = PREVIOUS PERIODS
Text Symbol: 405 = DEBIT
Text Symbol: 404 = PREV. PERIOD BALANCE
Text Symbol: 403 = DESCRIPTION
Text Symbol: 402 = ACCOUNT
Text Symbol: 401 = BALANCE CF
Text Symbol: 400 = ACCOUNT
Text Symbol: 204 = Please select a lower limit for posting date
Text Symbol: 203 = You can only include periods from 1 to 16.
Text Symbol: 202 = Select at least one account level



Text Symbol: 201 = Please select posting dates
Text Symbol: 200 = Please select Fiscal year and period
Text Symbol: 098 = Test run (On=Yes, Off=No)
Text Symbol: 019 = Account ranges are specified in :
Text Symbol: 010 = Fast read (All accounts must be "line item display")
Text Symbol: 009 = Both
Text Symbol: 008 = Analytical Ledger
Text Symbol: 007 = General Ledger
Text Symbol: 006 = Both
Text Symbol: 005 = Results will be displayed in :
Text Symbol: 004 = Show posting level accounts
Text Symbol: 003 = Account digit for summation
Text Symbol: 513 = GENERAL - ANALYTICAL LEDGER TRIAL BALANCE
Text Symbol: 854 = in the selected chart
Text Symbol: 853 = company chart of accounts
Text Symbol: 852 = Account ranges are specified in
Text Symbol: 851 = Results will be displayed in
Text Symbol: 846 = Do not include previous year balance
Text Symbol: 845 = Include previous year balance
Text Symbol: 844 = Business Area selections
Text Symbol: 843 = Fiscal year spans over last
Text Symbol: 841 = in group chart of accounts
Text Symbol: 840 = Do not addd previous year balance to TOTAL
Text Symbol: 839 = Add previous year balance to TOTAL
Text Symbol: 838 = Previous year balance in one column
Text Symbol: 837 = Previous year balance in debit/credit columns
Text Symbol: 836 = Balance in one column
Text Symbol: 835 = Balance in debit/credit columns
Text Symbol: 834 = Account balances range
Text Symbol: 833 = Do not include accounts not posted to
Text Symbol: 832 = Include accounts not posted to
Text Symbol: 831 = Use local currency
Text Symbol: 830 = Use 2nd local currency
Text Symbol: 829 = in company chart of accounts
Text Symbol: 828 = in alternative chart of accounts
Text Symbol: 827 = Slow read ( BSEG )
Text Symbol: 826 = Fast read ( BSIS/BSAS ) -- accounts are line item display
Text Symbol: 825 = Do not include Accounts with zero balance
Text Symbol: 824 = Include Accounts with zero balance
Text Symbol: 823 = Do not show posting level accounts
Text Symbol: 822 = Show posting level accounts
Text Symbol: 821 = Sums on digits :
Text Symbol: 820 = Account level selections
Text Symbol: 810 = Posting dates :
Text Symbol: 809 = Fiscal periods :
Text Symbol: 808 = Fiscal year :
Text Symbol: 807 = Time periods selected
Text Symbol: 806 = Accounts can belong either in General or Analytical Ledger
Text Symbol: 805 = Accounts must belong in Analytical Ledger
Text Symbol: 804 = Accounts must belong in General Ledger
Text Symbol: 803 = Accounts
Text Symbol: 802 = ALL
Text Symbol: 801 = Company codes
Text Symbol: 800 = U S E R S E L E C T I O N S
Text Symbol: 514 = AMOUNTS IN


INCLUDES used within this REPORT J_1GALTB

INCLUDE J_1GSPLEDGER.


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:

J_1GFI_ADD_AUTH_CHECKS call function 'J_1GFI_ADD_AUTH_CHECKS'. "au1+

J_1GBUKRS_AUTH_CHECK call function 'J_1GBUKRS_AUTH_CHECK' exporting i_xdb = 'SB' tables it_buksel = s_bukrs.

FI_MESSAGE_INIT call function 'FI_MESSAGE_INIT'.

POPUP_TO_DISPLAY_TEXT * call function 'POPUP_TO_DISPLAY_TEXT' * exporting * titel = sy-title * textline1 = string * textline2 = text-s03.

GET_CURRENT_YEAR call function 'GET_CURRENT_YEAR' exporting bukrs = s_bukrs-low date = sy-datum importing currm = s_monat-low curry = s_gjahr prevm = dummy_monat prevy = dummy_gjahr exceptions others = 1.

J_1GGET_LEVELS call function 'J_1GGET_LEVELS' exporting i_ktopl = charts_tab-chart i_account = f_group-hkont i_sep = s_separ i_only_type = s_ledsel "ias1+ importing e_type = f_group-hkont_type * E_LEV1 = * E_LEV2 = * E_LEV3 = * E_LEV4 = * E_LEV5 = e_lev1s = f_group-lvl1 e_lev2s = f_group-lvl2 e_lev3s = f_group-lvl3 e_lev4s = f_group-lvl4 e_lev5s = f_group-lvl5.

FAGL_GET_GLT0 call function 'FAGL_GET_GLT0' exporting i_glt0_rldnr = '00' i_rrcty = '0' i_rvers = '001' i_bukrs = pbukrs i_ryear = g_gjahr i_range_rbusa = lt_range_gsber i_range_racct = lt_range_racct importing et_glt0 = lt_glt0.

J_1GGSBER_AUTH_CHECK call function 'J_1GGSBER_AUTH_CHECK' exporting i_gsber = glt0-rbusa i_aktvt = '03' exceptions no_authorization = 1 others = 2.

FAGL_GET_GLT0 call function 'FAGL_GET_GLT0' exporting i_glt0_rldnr = '00' i_rrcty = '0' i_rvers = '001' i_bukrs = pbukrs i_ryear = p_gjahr i_range_rbusa = lt_range_gsber i_range_racct = lt_range_racct importing et_glt0 = lt_glt0.

J_1GGSBER_AUTH_CHECK call function 'J_1GGSBER_AUTH_CHECK' exporting i_gsber = glt0-rbusa i_aktvt = '03' exceptions no_authorization = 1 others = 2.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

G_PERIODS_OF_YEAR_GET call function 'G_PERIODS_OF_YEAR_GET' exporting variant = t001_wa-periv year = g_gjahr importing last_normal_period = period_l tables i_periods = the_periods exceptions variant_not_defined = 1 year_not_defined = 2 others = 3.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

G_POSTING_DATE_OF_YEAR_GET call function 'G_POSTING_DATE_OF_YEAR_GET' exporting variant = t001_wa-periv year = try_year importing from_date = 1st_day last_normal_period = period_l to_date = last_day first_normal_period = period_f exceptions variant_not_defined = 1 year_not_defined = 2 others = 3.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

G_PERIODS_OF_YEAR_GET call function 'G_PERIODS_OF_YEAR_GET' exporting variant = t001_wa-periv year = g_gjahr importing last_normal_period = period_l tables i_periods = the_periods exceptions variant_not_defined = 1 year_not_defined = 2 others = 3.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

J_1GGSBER_AUTH_CHECK call function 'J_1GGSBER_AUTH_CHECK' exporting i_gsber = bsis-gsber i_aktvt = '03' exceptions no_authorization = 1 others = 2.

J_1GGSBER_AUTH_CHECK call function 'J_1GGSBER_AUTH_CHECK' exporting i_gsber = bsas-gsber i_aktvt = '03' exceptions no_authorization = 1 others = 2.

READ_SACHKONTO_ALTKT call function 'READ_SACHKONTO_ALTKT' exporting bukrs = v_bukrs saknr = v_hkont xmass = 'X' xskan = 'X' importing altkt = p_alt_account altkt_not_found = altkt_not_found altkt_sakan = p_sakan ktext = ktext ltext = ltext text_not_found = text_not_found exceptions bukrs_not_found = 1 saknr_not_found = 2 others = 3.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

FI_MESSAGE_CHECK call function 'FI_MESSAGE_CHECK' exceptions no_message = 01.

FI_MESSAGE_SORT call function 'FI_MESSAGE_SORT'.

FI_MESSAGE_GET_MSORT call function 'FI_MESSAGE_GET_MSORT' importing e_xinit = xfeld tables s_fimsg = msgtab exceptions no_message = 1.

FI_MESSAGE_PRINT call function 'FI_MESSAGE_PRINT' exporting i_msort = msgtab-msort i_xausn = ' ' i_xeaus = 'X' i_xskip = ' '.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

J_1GGSBER_AUTH_CHECK call function 'J_1GGSBER_AUTH_CHECK' exporting i_gsber = bseg-gsber i_aktvt = '03' exceptions no_authorization = 1 others = 2.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

J_1GGET_STRUCTURE call function 'J_1GGET_STRUCTURE' exporting i_ktopl = charts_tab-chart importing * EG_SLEN = * EG_RLEN = eg_max_lev = charts_tab-g_max_level * EA_SLEN = * EA_RLEN = ea_max_lev = charts_tab-a_max_level * TABLES * T_GS = exceptions gs_no_data = 1 gs_wrong_data = 2 others = 3.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

J_1GGSBER_AUTH_CHECK call function 'J_1GGSBER_AUTH_CHECK' exporting i_gsber = lh_type-rbusa i_aktvt = '03' exceptions no_authorization = 1 others = 2.

J_1GACCOUNT_AUTH_CHECK call function 'J_1GACCOUNT_AUTH_CHECK' exporting i_xdb = 'S' i_begru = l_begru i_aktvt = '03' exceptions no_authorization = 1 others = 2.

J_1GCHECK_DACCT call function 'J_1GCHECK_DACCT' exporting i_ktopl = lwt001-ktopl i_saknr = v_hkont * I_NO_BUFFER = ' ' importing e_ska1 = lw_ska1 "ias2+ e_dacct_flag = lf_dacct_flag exceptions account_not_found = 1 others = 2.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

J_1GGET_MACCT call function 'J_1GGET_MACCT' exporting i_ktopl = lwt001-ktopl i_dacct = v_hkont * I_NO_BUFFER = ' ' importing e_macct = l_macct exceptions not_mapped = 1 others = 2.

DYNP_VALUES_READ call function 'DYNP_VALUES_READ' exporting dyname = vw_repid dynumb = vw_dynnr tables dynpfields = lt_scrfields exceptions invalid_abapworkarea = 1 invalid_dynprofield = 2 invalid_dynproname = 3 invalid_dynpronummer = 4 invalid_request = 5 no_fielddescription = 6 invalid_parameter = 7 undefind_error = 8 others = 9.

VALUES_GET call function 'VALUES_GET' exporting valueexist = lh_info-valexist valuefieldname = lh_info-fieldname valuelanguage = lh_info-spras valuetabname = lh_info-tabname importing retcode = lw_rc tables dynpvaluetab = lt_dynval values = lt_values valuestructure = lt_vstruc exceptions others = 1.

VALUES_DISPLAY call function 'VALUES_DISPLAY' importing select_index = lw_tabix select_value = lh_info-fldvalue tables values = lt_values valuestructure = lt_vstruc exceptions check_table_locked = 1 no_values_for_field = 2 tablefield_does_not_exist = 3 others = 4.

DYNP_VALUES_UPDATE call function 'DYNP_VALUES_UPDATE' exporting dyname = vw_repid dynumb = vw_dynnr tables dynpfields = lt_scrfields exceptions invalid_abapworkarea = 1 invalid_dynprofield = 2 invalid_dynproname = 3 invalid_dynpronummer = 4 invalid_request = 5 no_fielddescription = 6 undefind_error = 7 others = 8.

DD_GET_NAMETAB call function 'DD_GET_NAMETAB' exporting * STATUS = 'A' tabname = table * GET_ALL = ' ' * IMPORTING * F_STATUS = * R_MODEFLAG = * R_STATUS = * X030L_WA = tables x031l_tab = lt_tabstr exceptions not_found = 1 no_fields = 2 others = 3.

FI_PERIOD_DETERMINE call function 'FI_PERIOD_DETERMINE' exporting i_budat = s_budat-low i_periv = 'K4' * I_GJAHR = s_gjahr importing e_gjahr = gjahr_low e_monat = monat_low e_poper = poper exceptions fiscal_year = 1 period = 2 period_version = 3 posting_period = 4 special_period = 5 version = 6 posting_date = 7 others = 8.

FIRST_DAY_IN_PERIOD_GET call function 'FIRST_DAY_IN_PERIOD_GET' exporting i_gjahr = gjahr_low * I_MONMIT = 00 i_periv = 'K4' i_poper = poper importing e_date = first_day exceptions input_false = 1 t009_notfound = 2 t009b_notfound = 3 others = 4 .

FI_PERIOD_DETERMINE call function 'FI_PERIOD_DETERMINE' exporting i_budat = s_budat-high * I_BUKRS = ' ' i_periv = 'K4' * I_GJAHR = s_gjahr * I_MONAT = 00 * X_XMO16 = ' ' importing e_gjahr = gjahr_high e_monat = monat_high e_poper = poper exceptions fiscal_year = 1 period = 2 period_version = 3 posting_period = 4 special_period = 5 version = 6 posting_date = 7 others = 8.

LAST_DAY_IN_PERIOD_GET call function 'LAST_DAY_IN_PERIOD_GET' exporting i_gjahr = gjahr_high * I_MONMIT = 00 i_periv = 'K4' i_poper = poper importing e_date = last_day exceptions input_false = 1 t009_notfound = 2 t009b_notfound = 3 others = 4 .

FI_PERIOD_INFO_GET call function 'FI_PERIOD_INFO_GET' exporting i_bukrs = t001-bukrs importing e_anzbp = l_anzbp e_anzsp = l_anzsp.

LAST_DAY_IN_PERIOD_GET call function 'LAST_DAY_IN_PERIOD_GET' exporting i_gjahr = s_gjahr * I_MONMIT = 00 i_periv = t001-periv i_poper = l_poper importing e_date = l_budat exceptions input_false = 1 t009_notfound = 2 t009b_notfound = 3 others = 4.

FI_MESSAGE_COLLECT call function 'FI_MESSAGE_COLLECT' exporting i_fimsg = msgtab.

J_1GGSBER_AUTH_CHECK call function 'J_1GGSBER_AUTH_CHECK' exporting i_gsber = bseg-gsber i_aktvt = '03' exceptions no_authorization = 1 others = 2.

DD_GET_NAMETAB call function 'DD_GET_NAMETAB' exporting * STATUS = 'A' tabname = table * GET_ALL = ' ' * IMPORTING * F_STATUS = * R_MODEFLAG = * R_STATUS = * X030L_WA = tables x031l_tab = lt_spl exceptions not_found = 1 no_fields = 2 others = 3.

DD_GET_NAMETAB call function 'DD_GET_NAMETAB' exporting * STATUS = 'A' tabname = 'GLREFT' * GET_ALL = ' ' * IMPORTING * F_STATUS = * R_MODEFLAG = * R_STATUS = * X030L_WA = tables x031l_tab = lt_ref exceptions not_found = 1 no_fields = 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 J_1GALTB or its description.