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

J_1GTBAC0 SAP ABAP Report - Ledger Trial Balance in ASCII file







J_1GTBAC0 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter J_1GTBAC0 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

J1GTBGF - Trial Balance to ASCII file


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_1GTBAC0. "Basic submit
SUBMIT J_1GTBAC0 AND RETURN. "Return to original report after report execution complete
SUBMIT J_1GTBAC0 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_ALTK = Alternative Ch. of Acc.
Selection Text: S_ALTKT = Alternative account number
Selection Text: S_BANKS =
Selection Text: S_BUKRS = Company Code
Selection Text: S_CHART = Company Ch. of Acc.
Selection Text: S_DIFF = 2nd acc.system
Selection Text: S_DTCLP = Closing postings to exclude
Selection Text: S_GJAHR = Fiscal Year
Selection Text: S_GROUP = Group Ch. of Acc.
Selection Text: S_JOIN = Join affiliated accounts
Selection Text: S_KTOKS = Account group
Selection Text: S_MAIN = 1st acc.system (main)
Selection Text: S_MONAT = Posting period
Selection Text: S_RLDNR = Ledger
Selection Text: S_S12 = Fiscal year spans over last
Title: Ledger Trial Balance in ASCII file
Text Symbol: T10 = vatmidon, symfona me tis diataxeis ths par. 1 tou artrou 19a tou n. 2459/1997
Text Symbol: T11 = (FEK 17A').
Text Symbol: T12 = To isozigio ypobaletai se 1 disketa.
Text Symbol: T13 = Synola protovatmion
Text Symbol: T14 = Xreosis :
Text Symbol: T15 = Pistosis :
Text Symbol: T16 = Xreostikou ypoloipou :
Text Symbol: T17 = Pistotikou ypoloipou :
Text Symbol: T18 = .................... O Ypoballon
Text Symbol: T19 = Paralabh
Text Symbol: T21 = Level
Text Symbol: T22 = Total Db
Text Symbol: T23 = Total Cr
Text Symbol: T24 = Balance
Text Symbol: 005 = Results will be displayed in :
Text Symbol: B10 = General selections
Text Symbol: B11 = Reporting period
Text Symbol: B12 = Áccounting systems
Text Symbol: B20 = Control options
Text Symbol: E00 = - ledger
Text Symbol: E01 = No 2nd local currency defined for





Text Symbol: E02 = Only "Group currency" is currently
Text Symbol: E03 = supported as 2nd local currency
Text Symbol: E04 = Unable to determine currency to use
Text Symbol: E10 = No group account is allocated to account
Text Symbol: E11 = in company code
Text Symbol: E20 = You have not logged-in in greek...
Text Symbol: E21 = Some account descriptions are missing...
Text Symbol: E22 = Operation cancelled by user. No file created...
Text Symbol: E23 = Created file
Text Symbol: E24 = may not be valid for submission to the Tax Authorities (due to the previously reported errors)
Text Symbol: E25 = File
Text Symbol: E26 = created successfully
Text Symbol: IS1 = Choose at least one accounting system
Text Symbol: S01 = Amounts in 2nd local currency
Text Symbol: S02 = Up to 3rd level for accounts of groups 2, 7 (Only for Banks)
Text Symbol: T01 = Pros tin D.O.Y.
Text Symbol: T02 = STOIXEIA EPITHDEYMATIA
Text Symbol: T03 = A.F.M. :
Text Symbol: T04 = Aritmos Fakelou :
Text Symbol: T05 = Eponymia :
Text Symbol: T06 = Epaggelma :
Text Symbol: T07 = Dieytynsh :
Text Symbol: T08 = Diaxeiristiko etos apo $ eos $
Text Symbol: T09 = Ypovaloume to teleytaio prosorino h oristiko isozigio ton logariasmon olon ton


INCLUDES used within this REPORT J_1GTBAC0

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:

FI_COMPANY_CODE_DATA call function 'FI_COMPANY_CODE_DATA' exporting i_bukrs = s_bukrs importing e_t001 = t001.

J_1GBUKRS_AUTH_CHECK call function 'J_1GBUKRS_AUTH_CHECK' exporting i_xdb = 'SB' i_bukrs = s_bukrs exceptions no_selection = 1 no_authorization = 2 others = 3.

FAGL_AUTHORITY_LEDGER call function 'FAGL_AUTHORITY_LEDGER' exporting i_bukrs = s_bukrs i_rldnr = g_relevant_ledger i_actvt = '03'.

FAGL_AUTHORITY_LEDGER call function 'FAGL_AUTHORITY_LEDGER' exporting i_bukrs = s_bukrs i_rldnr = g_leading_ledger i_actvt = '03'.

BUILD_DEFAULT_PERIOD call function 'BUILD_DEFAULT_PERIOD' tables xmonat = s_monat.

FI_GL_READ_CHART_OF_ACCOUNT call function 'FI_GL_READ_CHART_OF_ACCOUNT' exporting i_ktopl = w_coa importing e_t004 = t004.






J_1GGET_STRUCTURE call function 'J_1GGET_STRUCTURE' exporting i_ktopl = w_coa importing eg_rlen = w_rlen eg_max_lev = w_max_level.

G_GET_ORGANIZATIONAL_DATA call function 'G_GET_ORGANIZATIONAL_DATA' exporting i_rldnr = g_relevant_ledger i_orgunit = s_bukrs importing organizational_info = gs_glxi.

FI_CURRENCY_INFORMATION call function 'FI_CURRENCY_INFORMATION' exporting i_bukrs = s_bukrs importing e_x001 = x001 exceptions currency_2_not_defined = 1 currency_3_not_defined = 2 others = 3.

G_POSTING_DATE_OF_YEAR_GET call function 'G_POSTING_DATE_OF_YEAR_GET' exporting variant = t001-periv year = s_gjahr importing from_date = w_1st_day to_date = w_last_day exceptions variant_not_defined = 1 year_not_defined = 2 others = 3.

J_2GMDM_C call function 'J_2GMDM_C' exporting i_t001 = t001 importing e_md = h_company.

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.

GET_CURRENT_YEAR call function 'GET_CURRENT_YEAR' exporting bukrs = l_bukrs date = sy-datum importing prevy = l_gjahr.

BUILD_DEFAULT_PERIOD call function 'BUILD_DEFAULT_PERIOD' tables xmonat = s_monat.

FAGL_GET_GLT0 call function 'FAGL_GET_GLT0' exporting i_glt0_rldnr = '00' i_rldnr = g_relevant_ledger i_rrcty = '0' i_rvers = '001' i_bukrs = s_bukrs i_range_ryear = lr_year 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_GROUPS_WITH_LEDGER call function 'FAGL_GET_GROUPS_WITH_LEDGER' exporting i_rldnr = g_relevant_ledger tables et_ldgrp = lt_ldgrp.

FAGL_GET_BSEG call function 'FAGL_GET_BSEG' exporting i_bukrs = lt_bkpf-bukrs i_belnr = lt_bkpf-belnr i_gjahr = lt_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 = ibseg-gsber i_aktvt = '03' exceptions no_authorization = 1 others = 2.

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

J_1GGET_MACCT call function 'J_1GGET_MACCT' exporting i_ktopl = t001-ktopl i_bukrs = s_bukrs i_dacct = p_hkont * I_NO_BUFFER = ' ' importing e_macct = l_macct exceptions not_mapped = 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_1GGET_TYPE call function 'J_1GGET_TYPE' exporting i_ktopl = w_coa i_account = p_racct importing e_type = l_type.

J_1GGET_LEVELS call function 'J_1GGET_LEVELS' exporting i_ktopl = w_coa i_account = t_post-racct i_sep = '.' "<- Legal requirement!

READ_HAUPTBUCH_TEXT call function 'READ_HAUPTBUCH_TEXT' exporting kontenplan = w_coa sachkonto = t_post-racct 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 = w_coa i_levacc = * I_LANGU = SY-LANGU importing e_gl = ls_gl exceptions not_found = 1 others = 2.

J_1GSAC_AUTH_CHECK call function 'J_1GSAC_AUTH_CHECK' exporting i_bukrs = s_bukrs i_area = 'FI' i_action = 'FILE'.

J_2GTAX_CODE_CHECK call function 'J_2GTAX_CODE_CHECK' exporting taxcode = h_company-taxcode exceptions wrong_input_type = 1 not_valid_length = 2 not_numeric = 3 not_valid = 4 others = 5.

J_2G_DOWNLOAD call function 'J_2G_DOWNLOAD' exporting * BIN_FILESIZE = ' ' filename = lw_file * FILETYPE = 'ASC' * MODE = ' ' trunc_trailing_blanks = 'X' * WINDOW_TITLE = ' ' default_extension = 'TRB' file_filter = 'All Files (*.*)|*.*|Trial Balance Files (*.TRB)|*.TRB|'"#EC NOTEXT

G_POSTING_DATE_OF_YEAR_GET call function 'G_POSTING_DATE_OF_YEAR_GET' exporting variant = t001-periv year = l_prev_gjahr importing from_date = l_1st_day_prev to_date = l_last_day_prev exceptions variant_not_defined = 1 year_not_defined = 2 others = 3.

FAGL_CHECK_IF_LEDGER_IS_GLFLEX call function 'FAGL_CHECK_IF_LEDGER_IS_GLFLEX' exporting i_rldnr = s_rldnr.



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