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

SAPF071 SAP ABAP Report - Adjust Balances after Comparing Documents/Transaction Figures







SAPF071 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for If a financial accounting comparative analysis (SAPF190) or a comparison of documents and transaction figures (SAPF070) shows that there are differences between documents and transaction figures, you can use this program to make an adjustment...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 SAPF071 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 SAPF071. "Basic submit
SUBMIT SAPF071 AND RETURN. "Return to original report after report execution complete
SUBMIT SAPF071 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: P_GJAHR = Fiscal year
Selection Text: P_KNC1 = Adjust accounts receivable
Selection Text: P_LFC1 = Adjust accounts payable
Selection Text: P_TEST = Test run
Selection Text: P_WAER10 = Adjust company code currency
Selection Text: P_WAER11 = Adjust local curr. (grp val.)
Selection Text: P_WAER12 = Adjust local curr. (PCA val.)
Selection Text: P_WAER30 = Adjust group currency
Selection Text: P_WAER31 = Adjust group curr. (grp val.)
Selection Text: P_WAER32 = Adjust group curr. (PCA val.)
Selection Text: P_WAER40 = Adjust hard currency
Selection Text: P_WAER50 = Adjust index-based currency
Selection Text: P_WAER60 = Adjust global company currency
Selection Text: S_BUKR = Company code
Title: Adjust Balances after Comparing Documents/Transaction Figures
Text Symbol: 410 = In Ledger
Text Symbol: 409 = Currency Type
Text Symbol: 408 = Posting for
Text Symbol: 407 = FI_CURR_INFO
Text Symbol: 406 = Update LFC1
Text Symbol: 405 = Update KNC1
Text Symbol: 404 = Insert KNC1
Text Symbol: 403 = Insert LFC1
Text Symbol: 402 = Import of T_DIFFS, T_DIFFDK, T_BELNR from RFDT successful
Text Symbol: 401 = Return from SAPF070
Text Symbol: 104 = ***Test Run***
Text Symbol: 106 = Correct periods
Text Symbol: 107 = No ledger found for currency type
Text Symbol: 108 = Ledgers for currency type
Text Symbol: 109 = Update not possible! System found documents that might be incorrect.
Text Symbol: 110 = Program was terminated
Text Symbol: 111 = Adjust. only for ledger
Text Symbol: 112 = Error in G_FI_POSTING for ledger/currency type:
Text Symbol: 113 = No data from document/transaction figure reconciliation found for company code/year:
Text Symbol: 114 = You need to run a reconciliation before you can run this program
Text Symbol: 115 = Error in data on document/transaction figure reconciliation for company code/year:
Text Symbol: 116 = Run a new reconciliation before making any other adjustment of the balance differences
Text Symbol: 117 = Internal error in:





Text Symbol: 120 = Currency types with differences:
Text Symbol: 121 = Documents that might be incorrect:
Text Symbol: 126 = No differences
Text Symbol: 127 = G/L Account Differences:
Text Symbol: 128 = Customer/Vendor Account Differences:
Text Symbol: 130 = Fiscal year
Text Symbol: 131 = Periods
Text Symbol: 150 = Local currency balance; a line item may be missing
Text Symbol: 151 = Parallel local currency: amounts and document header inconsistent
Text Symbol: 152 = No line items found for document header
Text Symbol: 153 = SAPF070 was terminated since postings were made during run
Text Symbol: 400 = Branch to SAPF070


INCLUDES used within this REPORT SAPF071

No INCLUDES are used within this REPORT code!


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_EMU_GET_CONVERSION_DATE CALL FUNCTION 'FI_EMU_GET_CONVERSION_DATE' EXPORTING i_bukrs = i_t001-bukrs IMPORTING e_date = ums_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 = ums_datum i_bukrs = i_t001-bukrs IMPORTING e_gjahr = ums_gjahr EXCEPTIONS fiscal_year = 1 period = 2 period_version = 3 posting_period = 4 special_period = 5 version = 6 posting_date = 7 OTHERS = 8.

FI_CURRENCY_INFORMATION CALL FUNCTION 'FI_CURRENCY_INFORMATION' EXPORTING i_bukrs = i_t001-bukrs i_land1 = i_t001-land1 i_rcomp = i_t001-rcomp IMPORTING e_x001 = x001 EXCEPTIONS currency_2_not_defined = 01" In T001A eingetragene currency_3_not_defined = 02" Wrg nicht definiert OTHERS = 03.

G_GIVE_LEDGERS_FOR_GLT0 CALL FUNCTION 'G_GIVE_LEDGERS_FOR_GLT0' EXPORTING bukrs = i_t001-bukrs curtp = curt TABLES ledtab = i_ledtab.

G_FI_POSTING CALL FUNCTION 'G_FI_POSTING' TABLES int_gls0 = int_gls0 int_gls0_add = int_gls0_add EXCEPTIONS OTHERS = 1.

OPEN_FI_PERFORM_00005012_P CALL FUNCTION 'OPEN_FI_PERFORM_00005012_P' EXPORTING i_chgtype = 'U' i_origin = 'SAPF071 CORRECT_KNC1' i_tabname = 'KNC1' i_structure = bw_knc1 * 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 = 'SAPF071 CORRECT_LFC1' i_tabname = 'LFC1' i_structure = bw_lfc1 * TABLES * T_STRUCTURE = EXCEPTIONS error = 1 OTHERS = 2.

REUSE_ALV_COMMENTARY_WRITE * CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' * EXPORTING * it_list_commentary = gt_list_top_of_page.

FAGL_BATCH_HEADING_PERFORM CALL FUNCTION 'FAGL_BATCH_HEADING_PERFORM' EXPORTING is_bhdgd = bhdgd IMPORTING eo_form_grid = lo_grid.

REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = gv_repid it_fieldcat = gt_fieldcat is_layout = gs_layout it_events = gt_events is_print = gs_prnt TABLES t_outtab = gt_doc_inc EXCEPTIONS program_error = 1 OTHERS = 2.

REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = gv_repid i_structure_name = gc_str CHANGING ct_fieldcat = xt_fieldcat EXCEPTIONS inconsistent_interface = 1 program_error = 2 OTHERS = 3.

REUSE_ALV_EVENTS_GET CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 IMPORTING et_events = xt_events.






REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = gv_repid it_fieldcat = gt_fieldcat is_layout = gs_layout it_events = gt_events is_print = gs_prnt TABLES t_outtab = gt_acc_diff EXCEPTIONS program_error = 1 OTHERS = 2.

REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = gv_repid i_structure_name = gc_str CHANGING ct_fieldcat = xt_fieldcat EXCEPTIONS inconsistent_interface = 1 program_error = 2 OTHERS = 3.

REUSE_ALV_EVENTS_GET CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 IMPORTING et_events = xt_events.

REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = gv_repid it_fieldcat = gt_fieldcat is_layout = gs_layout it_events = gt_events is_print = gs_prnt TABLES t_outtab = gt_cust_diff EXCEPTIONS program_error = 1 OTHERS = 2.

REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = gv_repid i_structure_name = gc_str CHANGING ct_fieldcat = xt_fieldcat EXCEPTIONS inconsistent_interface = 1 program_error = 2 OTHERS = 3.

REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = gv_repid it_fieldcat = gt_fieldcat is_layout = gs_layout it_events = gt_events is_print = gs_prnt TABLES t_outtab = gt_outab_stat EXCEPTIONS program_error = 1 OTHERS = 2.

REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = gv_repid i_structure_name = gc_str CHANGING ct_fieldcat = xt_fieldcat EXCEPTIONS inconsistent_interface = 1 program_error = 2 OTHERS = 3.

REUSE_ALV_EVENTS_GET CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 IMPORTING et_events = xt_events.

REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = gv_repid it_fieldcat = gt_fieldcat is_layout = gs_layout it_events = gt_events is_print = gs_prnt TABLES t_outtab = gt_ldg_upd EXCEPTIONS program_error = 1 OTHERS = 2.

REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = gv_repid i_structure_name = gc_str CHANGING ct_fieldcat = xt_fieldcat EXCEPTIONS inconsistent_interface = 1 program_error = 2 OTHERS = 3.

REUSE_ALV_EVENTS_GET CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 IMPORTING et_events = xt_events.

REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = gv_repid it_fieldcat = gt_fieldcat is_layout = gs_layout it_events = gt_events is_print = gs_prnt TABLES t_outtab = gt_outab_sta1 EXCEPTIONS program_error = 1 OTHERS = 2.

REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = gv_repid i_structure_name = gc_str CHANGING ct_fieldcat = xt_fieldcat EXCEPTIONS inconsistent_interface = 1 program_error = 2 OTHERS = 3.

REUSE_ALV_EVENTS_GET CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 IMPORTING et_events = xt_events.



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