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

J_1GTBGL0 SAP ABAP Report - Ledger Trial Balance







J_1GTBGL0 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Legal requirement for Greece...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_1GTBGL0 into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

J1GTBG - Ledger Trial Balance


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_1GTBGL0. "Basic submit
SUBMIT J_1GTBGL0 AND RETURN. "Return to original report after report execution complete
SUBMIT J_1GTBGL0 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: S_2CURR = Use 2nd local currency
Selection Text: S_ACCBAL = Account balance
Selection Text: S_ADDTXT = Additional heading
Selection Text: S_ALTKT = Alternative account number
Selection Text: S_ALV = ALV
Selection Text: S_BLANKS = Blank lines at top
Selection Text: S_CMPCOD = Print comp. code
Selection Text: S_CMPDAT = Print comp. address & tax data
Selection Text: S_CONTPG = Continuous page numbering
Selection Text: S_DIFF = 2nd acc.system
Selection Text: S_GJAHR = Fiscal Year
Selection Text: S_GRTOT = Totals per group (0,1-8,9)
Selection Text: S_GSBER = Business area
Selection Text: S_INCLN = Include accounts not posted to
Selection Text: S_JOIN = Join affiliated accounts
Selection Text: S_LAYOUT = Column layout
Selection Text: S_LEDSEL = Type of Accounting
Selection Text: S_LEV1 = 1st Level
Selection Text: S_LEV2 = 2nd Level
Selection Text: S_TOTLEV = Page totals from...
Selection Text: S_SPL = Special Purpose Ledger
Selection Text: S_SORT1 = Display lower levels first
Selection Text: S_S12 = Fiscal year spans over last
Selection Text: S_RTITLE = Print report title
Selection Text: S_RLDNR = Ledger
Selection Text: S_PRONDT = List creation date
Selection Text: S_PREVY = Include previous year balance
Selection Text: S_PRADD = Add pr.year bal. to totals
Selection Text: S_PAGENR = Print page numbers
Selection Text: S_OFFSIM = Simulate official run
Selection Text: S_OFFR = Official run
Selection Text: S_NOZERO = Do not show zero amounts
Selection Text: S_MONAT = Posting period
Selection Text: S_MAIN = 1st acc.system (main)
Selection Text: S_LEV5 = 5th Level
Selection Text: S_LEV4 = 4th Level
Selection Text: S_LEV3 = 3rd Level
Title: Ledger Trial Balance





Text Symbol: T22 = PAGE TOTALS
Text Symbol: T21 = CARRY FORWARD
Text Symbol: T20 = BROUGHT FORWARD
Text Symbol: T19 = CREDIT
Text Symbol: T18 = DEBIT
Text Symbol: T17 = BALANCES
Text Symbol: T16 = TOTALS
Text Symbol: T15 = REPORTING PERIODS
Text Symbol: T14 = PREV. PERIOD BALANCE
Text Symbol: T13 = PREVIOUS PERIODS
Text Symbol: T12 = PREVIOUS YEAR C/F
Text Symbol: T11 = DESCRIPTION
Text Symbol: T10 = ACCOUNT
Text Symbol: T30 = Level
Text Symbol: T31 = Group
Text Symbol: T32 = PrevYear C/F Db
Text Symbol: T33 = PrevYear C/F Cr
Text Symbol: T34 = PrevPeriods Db
Text Symbol: T35 = PrevPeriods Cr
Text Symbol: T36 = PrevPer Bal. Db
Text Symbol: T37 = PrevPer Bal. Cr
Text Symbol: T38 = CurrPeriods Db
Text Symbol: T39 = CurrPeriods Cr
Text Symbol: T40 = Total Db
Text Symbol: T41 = Total Cr
Text Symbol: T42 = Total Bal. Db
Text Symbol: T43 = Total Bal. Cr
Text Symbol: M25 = Company $ will be excluded:
Text Symbol: M24 = does not store amounts in 2nd curr.
Text Symbol: M23 = does not store amounts in local curr.
Text Symbol: M22 = is not assigned to any of the selected companies
Text Symbol: M21 = Ledger
Text Symbol: M19 = Some of the hidden options are in use...
Text Symbol: M17 = (previous run was for $ $ $)
Text Symbol: M16 = Cancel
Text Symbol: M15 = Continue
Text Symbol: M14 = Operation canceled
Text Symbol: M13 = Official run of $ for company $ and period(s) $ - $ of $ ?
Text Symbol: M12 = Unable to determine currency type





Text Symbol: M11 = All companies must use same currency type
Text Symbol: M05 = Specify either a GL Ledger or a Special Ledger
Text Symbol: M04 = not posted in period under review
Text Symbol: M02 = Select at least one level
Text Symbol: M01 = Opening document
Text Symbol: LOL = Lowest selected level
Text Symbol: LOH = Highest selected level
Text Symbol: LO2 = Separate pr.year c/f column
Text Symbol: LO1 = Official
Text Symbol: IS1 = Choose at least one accounting system
Text Symbol: BS3 = Restore defaults
Text Symbol: BS2 = Less options
Text Symbol: BS1 = More options
Text Symbol: B23 = Header options (for Official runs only)
Text Symbol: B22 = Output options
Text Symbol: B21 = Operation control
Text Symbol: B14 = Level selection (1-2-3-4-5)
Text Symbol: B13 = Other selections
Text Symbol: B12 = Αccounting systems
Text Symbol: B11 = Reporting period
Text Symbol: M26 = Error in Ch. of Acc. structure (table J_1GGS), for
Text Symbol: T04 = GROUP
Text Symbol: T03 = LEVEL
Text Symbol: T02 = GRAND TOTALS
Text Symbol: T00 = COMPANY TOTALS
Text Symbol: P14 = LEDGER TRIAL BALANCE
Text Symbol: P13 = GENERAL & ANALYTICAL LEDGER TRIAL BALANCE
Text Symbol: P12 = ANALYTICAL LEDGER TRIAL BALANCE
Text Symbol: P11 = GENERAL LEDGER TRIAL BALANCE
Text Symbol: M68 = or
Text Symbol: M67 = G/L+A/L
Text Symbol: M66 = A/L
Text Symbol: M65 = G/L
Text Symbol: M62 = Please specify exactly one period for official run (range of periods is only possible for special periods)
Text Symbol: M61 = Error in official run control data (table J_1GCONTROL, tr.code J1GTBC)
Text Symbol: M60 = In official run is not allowed to ignore type of Accounting...
Text Symbol: M50 = Selected list layout (official) requires adding prev.year c/f to totals...
Text Symbol: M47 = company
Text Symbol: M45 = Processing error...



Text Symbol: M43 = The primary CoA will be used:
Text Symbol: M42 = company does not have a local CoA assigned.
Text Symbol: M41 = PERIOD:
Text Symbol: M37 = Errors occured and no list will be produced. Official run must be repeated. To check out the errors run program in test mode...
Text Symbol: M36 = Error updating table J_1GCONTROL. No list will be produced, and official run must be repeated...
Text Symbol: M35 = for any of the selected companies
Text Symbol: M34 = (KSL field group)
Text Symbol: M33 = (HSL field group)
Text Symbol: M32 = (either at company or ledger level)
Text Symbol: M31 = (see program's documentation)
Text Symbol: M30 = does not have an appropriate structure
Text Symbol: M29 = Ledger's table
Text Symbol: M28 = Company is not assigned to Ledger
Text Symbol: M27 = 2nd local currency has not been defined


INCLUDES used within this REPORT J_1GTBGL0

INCLUDE J_2GCONSTANTS.


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:

BUILD_DEFAULT_YEAR call function 'BUILD_DEFAULT_YEAR' tables xgjahr = s_gjahr.

BUILD_DEFAULT_PERIOD call function 'BUILD_DEFAULT_PERIOD' tables xmonat = s_monat.

BUILD_DEFAULT_YEAR call function 'BUILD_DEFAULT_YEAR' tables xgjahr = s_gjahr.

BUILD_DEFAULT_PERIOD call function 'BUILD_DEFAULT_PERIOD' tables xmonat = s_monat.

DEQUEUE_ALL call function 'DEQUEUE_ALL'.

DEQUEUE_ALL call function 'DEQUEUE_ALL'.

DEQUEUE_ALL call function 'DEQUEUE_ALL'.

FI_COMPANY_CODE_DATA call function 'FI_COMPANY_CODE_DATA' exporting i_bukrs = l_bukrs importing e_t001 = ls_t001 exceptions system_error = 1 others = 2.

DATE_TO_PERIOD_CONVERT call function 'DATE_TO_PERIOD_CONVERT' exporting i_date = sy-datum i_periv = ls_t001-periv importing e_buper = l_buper e_gjahr = l_gjahr exceptions input_false = 1 t009_notfound = 2 t009b_notfound = 3 others = 4.

J_1GSAC_AUTH_CHECK call function 'J_1GSAC_AUTH_CHECK' exporting i_bukrs = ls_t001-bukrs i_area = 'FI' i_action = 'OFFR'.

J_1GGET_STRUCTURE call function 'J_1GGET_STRUCTURE' exporting i_ktopl = l_coa exceptions gs_no_data = 1 gs_wrong_data = 2 others = 3.

G_GET_ORGANIZATIONAL_DATA call function 'G_GET_ORGANIZATIONAL_DATA' exporting i_rldnr = g_relevant_ledger i_orgunit = ls_t001-bukrs importing organizational_info = ls_info exceptions no_info_found = 1 error_in_setup = 2 error_in_depld = 3 others = 4.

T009_SINGLE_READ call function 'T009_SINGLE_READ' exporting t009_periv = l_periv importing wt009 = ls_t009 exceptions not_found = 1 others = 2.

ENQUEUE_EJ_1GCONTROL call function 'ENQUEUE_EJ_1GCONTROL' exporting * MODE_J_1GCONTROL = 'E' * MANDT = SY-MANDT repid = c_tbglkey bukrs = ls_t001-bukrs gjahr = s_gjahr-low * X_REPID = ' ' * X_BUKRS = ' ' * X_GJAHR = ' ' * _SCOPE = '2' * _WAIT = ' ' * _COLLECT = ' ' exceptions foreign_lock = 1 system_failure = 2 others = 3.

VIEW_ENQUEUE call function 'VIEW_ENQUEUE' exporting * ACTION = 'E' enqueue_mode = 'E' view_name = 'J_1GCONTROL' * ENQUEUE_RANGE = ' ' * TABLES * SELLIST = exceptions client_reference = 1 foreign_lock = 2 invalid_action = 3 invalid_enqueue_mode = 4 system_failure = 5 table_not_found = 6 others = 7.

POPUP_TO_CONFIRM call function 'POPUP_TO_CONFIRM' exporting * TITLEBAR = ' ' * DIAGNOSE_OBJECT = ' ' text_question = l_string text_button_1 = 'Continue'(m15) icon_button_1 = 'ICON_OKAY' text_button_2 = 'Cancel'(m16) icon_button_2 = 'ICON_CANCEL' default_button = '2' display_cancel_button = ' ' * USERDEFINED_F1_HELP = ' ' * START_COLUMN = 25 * START_ROW = 6 popup_type = 'ICON_MESSAGE_WARNING' importing answer = l_answer.

G_GET_LEDGER_INFO call function 'G_GET_LEDGER_INFO' exporting i_rldnr = s_spl importing e_ledger_info = ls_t881 * E_LEDGER_TEXT = exceptions no_ledger_info_found = 1 no_keyfig_info_found = 2 no_ledger_text_found = 3 others = 4.

DD_GET_NAMETAB call function 'DD_GET_NAMETAB' exporting * STATUS = c_al tabname = 'GLREFT' * GET_ALL = ' ' tables x031l_tab = lt_ref exceptions not_found = 1 no_fields = 2 others = 3.

DD_GET_NAMETAB call function 'DD_GET_NAMETAB' exporting * STATUS = c_al tabname = ls_t881-tab * GET_ALL = ' ' tables x031l_tab = lt_spl exceptions not_found = 1 no_fields = 2 others = 3.

J_1GGET_STRUCTURE call function 'J_1GGET_STRUCTURE' exporting i_ktopl = gt_ci-coa importing eg_max_lev = gt_ci-glsi-maxlev ea_max_lev = gt_ci-alsi-maxlev exceptions gs_no_data = 1 gs_wrong_data = 2 others = 3.

G_GET_ORGANIZATIONAL_DATA call function 'G_GET_ORGANIZATIONAL_DATA' exporting i_rldnr = g_relevant_ledger i_orgunit = lt_t001-bukrs * JOIN_OF_VALUTYP_AND_CURT = 'X' * SEND_ERROR_WHEN_DEPLD = ' ' importing organizational_info = gt_ci-glxi exceptions no_info_found = 1 error_in_setup = 2 error_in_depld = 3 others = 4.

FI_CURRENCY_INFORMATION call function 'FI_CURRENCY_INFORMATION' exporting i_bukrs = lt_t001-bukrs importing e_x001 = gt_ci-x001 exceptions currency_2_not_defined = 1 currency_3_not_defined = 2 others = 3.

J_1GGET_LEVELS call function 'J_1GGET_LEVELS' exporting i_ktopl = gt_ci-coa i_account = gt_pad-acc-iacct i_only_type = s_ledsel importing e_type = l_atype e_group = l_group e_off = l_off e_lev1 = ls_levels-1-i e_lev2 = ls_levels-2-i e_lev3 = ls_levels-3-i e_lev4 = ls_levels-4-i e_lev5 = ls_levels-5-i e_lev1s = ls_levels-1-e e_lev2s = ls_levels-2-e e_lev3s = ls_levels-3-e e_lev4s = ls_levels-4-e e_lev5s = ls_levels-5-e.

READ_HAUPTBUCH_TEXT call function 'READ_HAUPTBUCH_TEXT' exporting kontenplan = gt_ci-coa sachkonto = gt_ai-iacct sprache = sy-langu importing text_wa = ls_skat exceptions text_not_found = 1 others = 2.

J_1GLEVEL_ACC_TEXT call function 'J_1GLEVEL_ACC_TEXT' exporting i_ktopl = gt_ci-coa i_levacc = gt_ai-iacct * I_LANGU = SY-LANGU importing e_gl = ls_gl exceptions not_found = 1 others = 2.

VRM_SET_VALUES call function 'VRM_SET_VALUES' exporting id = l_name values = lt_values.

VRM_SET_VALUES call function 'VRM_SET_VALUES' exporting id = l_name values = lt_values.

FAGL_CHECK_IF_LEDGER_IS_GLFLEX call function 'FAGL_CHECK_IF_LEDGER_IS_GLFLEX' exporting i_rldnr = s_rldnr exceptions not_found = 1 no_glflex_ledger = 2 glflex_rollup_ledger = 3 others = 4.

G_GET_ORGANIZATIONAL_DATA call function 'G_GET_ORGANIZATIONAL_DATA' exporting i_rldnr = g_relevant_ledger i_orgunit = lt_t001-bukrs * JOIN_OF_VALUTYP_AND_CURT = 'X' * SEND_ERROR_WHEN_DEPLD = ' ' importing organizational_info = ls_info exceptions no_info_found = 1 error_in_setup = 2 error_in_depld = 3 others = 4.

G_GET_LEDGER_INFO call function 'G_GET_LEDGER_INFO' exporting i_rldnr = s_spl importing e_ledger_info = ls_t881.

FI_CURRENCY_INFORMATION call function 'FI_CURRENCY_INFORMATION' exporting i_bukrs = lt_t882-bukrs importing e_x001 = ls_x001 exceptions currency_2_not_defined = 1 currency_3_not_defined = 2 others = 3.

G_GET_LEDGER_INFO call function 'G_GET_LEDGER_INFO' exporting i_rldnr = s_spl importing e_ledger_info = ls_t881 exceptions no_ledger_info_found = 1 no_keyfig_info_found = 2 no_ledger_text_found = 3 others = 4.

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

FAGL_GET_GROUPS_WITH_LEDGER call function 'FAGL_GET_GROUPS_WITH_LEDGER' exporting i_rldnr = l_relevant_ledger tables et_ldgrp = lt_ldgrp.

FAGL_GET_BSEG call function 'FAGL_GET_BSEG' exporting i_bukrs = ls_bkpf-bukrs i_belnr = ls_bkpf-belnr i_gjahr = ls_bkpf-gjahr importing et_bseg = lt_bseg exceptions not_found = 1 others = 2.

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

READ_HAUPTBUCH call function 'READ_HAUPTBUCH' exporting buchungskreis = ls_bseg-bukrs sachkonto = ls_bseg-hkont importing kontenplan_wa = ls_ska1 sachkonto_wa = ls_skb1 exceptions kontenplan_not_found = 1 sachkonto_not_found = 2 not_authorized = 3 others = 4.

J_1GCHECK_DAGRP call function 'J_1GCHECK_DAGRP' exporting i_ktopl = p_ktopl i_ktoks = p_ktoks importing e_dagrp = ps_acc-dflag.

J_1GGET_MACCT call function 'J_1GGET_MACCT' exporting i_ktopl = p_ktopl "(primary chart) i_bukrs = p_bukrs i_dacct = p_saknr importing e_macct = ps_acc-macct exceptions not_mapped = 1 others = 2.

J_1GGET_TYPE call function 'J_1GGET_TYPE' exporting i_ktopl = gt_ci-coa i_account = ps_acc-iacct i_only_type = s_ledsel importing e_type = l_atype.

J_2GPOPUP_SELLIST call function 'J_2GPOPUP_SELLIST' exporting t_dynsl = ls_dsel-trange[].



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_1GTBGL0 or its description.