SAP Reports / Programs | Financial Accounting | General Ledger Accounting(FI-GL) SAP FI

FAGL_SWITCH_CLASS_IMP1 SAP ABAP INCLUDE - FAGLSWITCHCLASSIMP1







FAGL_SWITCH_CLASS_IMP1 is a standard ABAP INCLUDE 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 FAGL_SWITCH_CLASS_IMP1 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 FAGL_SWITCH_CLASS_IMP1. "Basic submit
SUBMIT FAGL_SWITCH_CLASS_IMP1 AND RETURN. "Return to original report after report execution complete
SUBMIT FAGL_SWITCH_CLASS_IMP1 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


INCLUDES used within this REPORT FAGL_SWITCH_CLASS_IMP1

INCLUDE FAGL_SWITCH_CLASS_IMP3.
INCLUDE FAGL_SWITCH_CLASS_IMP4.
INCLUDE FAGL_SWITCH_CLASS_IMP5.


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:

ENQUEUE_EFSKB1 CALL FUNCTION 'ENQUEUE_EFSKB1' EXPORTING bukrs = -bukrs saknr = gv_account EXCEPTIONS foreign_lock = 1 system_failure = 2.

DEQUEUE_ALL CALL FUNCTION 'DEQUEUE_ALL'.

POPUP_TO_CONFIRM CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING titlebar = text-014 text_question = text-015 default_button = '2' display_cancel_button = ' ' userdefined_f1_help = 'FAGL_ACTIVATE_LDGRP_OP' IMPORTING answer = lv_answer.

DB_COMMIT CALL FUNCTION 'DB_COMMIT'.

DB_COMMIT * a CALL FUNCTION 'DB_COMMIT' is done! * Furthermore a collect is much better here to * avoid too many unnecessary updates CLEAR: ls_bwfi_aedat.

BWFIP_INSERT_BWFI_AEDAT CALL FUNCTION 'BWFIP_INSERT_BWFI_AEDAT' EXPORTING i_save_directly = 'X' TABLES i_t_bkpf = lt_bwfi_aedat.

DB_COMMIT CALL FUNCTION 'DB_COMMIT'.

DB_COMMIT * a CALL FUNCTION 'DB_COMMIT' is done! * Furthermore a collect is much better here to * avoid too many unnecessary updates CLEAR: ls_bwfi_aedat.

BWFIP_INSERT_BWFI_AEDAT CALL FUNCTION 'BWFIP_INSERT_BWFI_AEDAT' EXPORTING i_save_directly = 'X' TABLES i_t_bkpf = lt_bwfi_aedat.

DB_COMMIT CALL FUNCTION 'DB_COMMIT'.

FAGL_GET_LEADING_LEDGER CALL FUNCTION 'FAGL_GET_LEADING_LEDGER' IMPORTING e_rldnr = lv_leading.

FAGL_CHECK_GLFLEX_ACTIVE CALL FUNCTION 'FAGL_CHECK_GLFLEX_ACTIVE' EXPORTING id_bukrs = -bukrs IMPORTING e_glflex_active = lv_active.

G_GIVE_FIXED_LEDGERS_FOR_BUKRS CALL FUNCTION 'G_GIVE_FIXED_LEDGERS_FOR_BUKRS' EXPORTING bukrs = -bukrs TABLES ledtab = lt_t881.

FAGL_GET_ALL_LEDGERS_IN_BUKRS CALL FUNCTION 'FAGL_GET_ALL_LEDGERS_IN_BUKRS' EXPORTING i_bukrs = -bukrs IMPORTING et_ledgers = lt_ledgers.

G_ACCOUNT_BALANCE_ACC_GET CALL FUNCTION 'G_ACCOUNT_BALANCE_ACC_GET' EXPORTING i_ledger = lv_ledger i_companycode = -bukrs i_account = gv_account i_fiscalyear = lv_fisc_year i_poper = -poper TABLES t_acc_balance = lt_balance.

FI_CURRENCY_INFORMATION CALL FUNCTION 'FI_CURRENCY_INFORMATION' EXPORTING i_bukrs = -bukrs IMPORTING e_x001 = ls_x001 EXCEPTIONS OTHERS = 0.

READ_SACHKONTO CALL FUNCTION 'READ_SACHKONTO' EXPORTING buchungskreis = -bukrs sachkonto = gv_account IMPORTING sachkonto_wa = ls_skb1 EXCEPTIONS sachkonto_not_found = 1 OTHERS = 2.

FI_COMPANY_CODE_DATA CALL FUNCTION 'FI_COMPANY_CODE_DATA' EXPORTING i_bukrs = -bukrs IMPORTING e_t001 = ls_t001.

READ_KONTENPLAN





CALL FUNCTION 'READ_KONTENPLAN' EXPORTING kontenplan = ls_t001-ktopl sachkonto = gv_account IMPORTING kontenplan_wa = ls_ska1.

FAGL_GL_STAMM_CHECK CALL FUNCTION 'FAGL_GL_STAMM_CHECK' " no account for automatic account determination EXPORTING i_ktopl = ls_t001-ktopl i_saknr = gv_account TABLES return = lt_return CHANGING returncode = lv_err_t030x.

FAGL_GET_ALL_LEDGERS_IN_BUKRS CALL FUNCTION 'FAGL_GET_ALL_LEDGERS_IN_BUKRS' EXPORTING i_bukrs = -bukrs IMPORTING et_ledgers = lt_ledgers.

FAGL_GET_TABLENAMES CALL FUNCTION 'FAGL_GET_TABLENAMES' EXPORTING i_ledger = lv_ledger IMPORTING es_tabnames = ls_tablenames.

FAGL_GET_ALL_LEDGERS_IN_BUKRS CALL FUNCTION 'FAGL_GET_ALL_LEDGERS_IN_BUKRS' EXPORTING i_bukrs = -bukrs IMPORTING et_ledgers = lt_ledgers.

G_GIVE_FIXED_LEDGERS_FOR_BUKRS CALL FUNCTION 'G_GIVE_FIXED_LEDGERS_FOR_BUKRS' EXPORTING bukrs = -bukrs TABLES ledtab = lt_t881.

FI_PERIOD_INFO_GET CALL FUNCTION 'FI_PERIOD_INFO_GET' EXPORTING i_bukrs = -bukrs i_rldnr = lv_ledger IMPORTING e_anzbp = lv_anzbp e_anzsp = lv_anzsp.

FAGL_GET_INFO_FROM_LEDGER CALL FUNCTION 'FAGL_GET_INFO_FROM_LEDGER' EXPORTING i_budat = gv_date i_rldnr = lv_ledger i_bukrs = -bukrs IMPORTING e_periv = -periv e_poper = -poper e_gjahr = lv_fisc_year.

FAGL_GET_INFO_FROM_LEDGER CALL FUNCTION 'FAGL_GET_INFO_FROM_LEDGER' EXPORTING i_budat = gv_date i_rldnr = lv_ledger i_bukrs = -bukrs IMPORTING e_periv = lv_periv e_poper = ls_post_period-poper e_gjahr = lv_fisc_year.

G_PERIODS_OF_YEAR_GET CALL FUNCTION 'G_PERIODS_OF_YEAR_GET' EXPORTING variant = -periv year = lv_fisc_year IMPORTING last_normal_period = lv_last_per TABLES i_periods = lt_periods.

CONVERT_DATE_TO_EXTERNAL CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' EXPORTING date_internal = ls_period-datbi IMPORTING date_external = lv_date_end.

CONVERT_DATE_TO_EXTERNAL CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' EXPORTING date_internal = -date_end IMPORTING date_external = lv_date_end.

FAGL_CHECK_GLFLEX_ACTIVE CALL FUNCTION 'FAGL_CHECK_GLFLEX_ACTIVE' EXPORTING id_bukrs = -bukrs IMPORTING e_glflex_active = lv_active.

G_GIVE_FIXED_LEDGERS_FOR_BUKRS CALL FUNCTION 'G_GIVE_FIXED_LEDGERS_FOR_BUKRS' EXPORTING bukrs = -bukrs TABLES ledtab = lt_t881.

FAGL_GET_ALL_LEDGERS_IN_BUKRS CALL FUNCTION 'FAGL_GET_ALL_LEDGERS_IN_BUKRS' EXPORTING i_bukrs = -bukrs IMPORTING et_ledgers = lt_ledgers.

G_ACCOUNT_BALANCE_ACC_GET CALL FUNCTION 'G_ACCOUNT_BALANCE_ACC_GET' EXPORTING i_ledger = lv_ledger i_companycode = -bukrs i_account = gv_account i_fiscalyear = ls_post_period-nl_year "1404013 i_poper = ls_post_period-poper IMPORTING ev_divisor = lv_divisor et_glu1 = lt_glu1 TABLES t_acc_balance = lt_balance.

G_GLU1_TO_AC_DOC_TRANSFORM CALL FUNCTION 'G_GLU1_TO_AC_DOC_TRANSFORM' TABLES t_glu1 = lt_glu1 t_accit = lt_accit_diff t_acccr = lt_acccr_diff.

FAGL_GET_LEDGER_FROM_GROUP CALL FUNCTION 'FAGL_GET_LEDGER_FROM_GROUP' IMPORTING et_ledger = lt_ledgers.

CONVERT_DATE_TO_EXTERNAL CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' EXPORTING date_internal = -date_end IMPORTING date_external = lv_date.

FAGL_GET_LEADING_LEDGER CALL FUNCTION 'FAGL_GET_LEADING_LEDGER' IMPORTING e_rldnr = lv_ledger.




FAGL_GET_LEADING_LEDGER CALL FUNCTION 'FAGL_GET_LEADING_LEDGER' IMPORTING e_rldnr = lv_leading.

FAGL_GET_ALL_LEDGERS_IN_BUKRS CALL FUNCTION 'FAGL_GET_ALL_LEDGERS_IN_BUKRS' EXPORTING i_bukrs = iv_bukrs IMPORTING et_ledgers = lt_ldr_bukrs.

FM00_CHECK_ISPS CALL FUNCTION 'FM00_CHECK_ISPS' IMPORTING e_flg_isps_not_active = lv_psm_not_active.

FMFK_GET_FIKRS_FROM_BUKRS CALL FUNCTION 'FMFK_GET_FIKRS_FROM_BUKRS' EXPORTING i_bukrs = iv_bukrs IMPORTING E_FIKRS = lv_fikrs EXCEPTIONS NO_FIKRS_FOR_BUKRS = 1 OTHERS = 2.

FMFPO_READ_QUICK CALL FUNCTION 'FMFPO_READ_QUICK' EXPORTING ip_fikrs = lv_fikrs ip_fipos = i_date = gv_date IMPORTING f_fmfpo = ls_fmfpo EXCEPTIONS INPUT_ERROR = 1 FIPOS_ONLY = 2 HIERARCHY_NOT_FOUND = 3 MASTER_DATA_NOT_FOUND = 4 CMMT_ITEM_NOT_VALID = 5 OTHERS = 6.



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