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

SAPF040R SAP ABAP Report - Delete Reference Documents







SAPF040R is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Program for deleting reference documents...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 SAPF040R 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 SAPF040R. "Basic submit
SUBMIT SAPF040R AND RETURN. "Return to original report after report execution complete
SUBMIT SAPF040R 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: X_TESTL = Test run
Selection Text: P_REFER = Reference document type
Selection Text: GJAHRX = Fiscal years
Selection Text: BUKRSX = Company codes
Selection Text: BELNRX = Document numbers
Title: Delete Reference Documents
Text Symbol: SB2 = Program Control
Text Symbol: SB1 = Deletion Quantity Selection
Text Symbol: 900 = No reference documents were found
Text Symbol: 202 = Do you really want to delete?
Text Symbol: 201 = Update run
Text Symbol: 200 = Warning: Deleting from database
Text Symbol: 109 = Indicator unknown:
Text Symbol: 101 = Sample posting document
Text Symbol: 100 = Recurring entry document
Text Symbol: 024 = Number of Docs
Text Symbol: 023 = Stop Date
Text Symbol: 022 = Stop Time
Text Symbol: 021 = Start Date
Text Symbol: 020 = StartTime
Text Symbol: 019 = Program started by user:
Text Symbol: 018 = Tx itm Number of tax items
Text Symbol: 017 = B/e itm Number of bill/exch.items
Text Symbol: 016 = OTAItm Number of OTA items
Text Symbol: 015 = Lne itm Number of line items
Text Symbol: 014 = Reference document type
Text Symbol: 013 = Doc.no. Document number
Text Symbol: 012 = Fi.yr Fiscal year
Text Symbol: 011 = CoCde Company code
Text Symbol: 005 = Test Run
Text Symbol: 004 = Update Run
Text Symbol: 001 = Deletion of Reference Documents


INCLUDES used within this REPORT SAPF040R

INCLUDE INCLKONS.


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:

POPUP_TO_CONFIRM_STEP CALL FUNCTION 'POPUP_TO_CONFIRM_STEP' EXPORTING defaultoption = 'N' textline1 = text-201 textline2 = text-202 titel = text-200 IMPORTING answer = lv_answer.

OPEN_FI_PERFORM_00003140_P CALL FUNCTION 'OPEN_FI_PERFORM_00003140_P' EXPORTING x_testl = x_testl TABLES t_bkpf = ibkpf t_bkdf = ibkdf t_bseg = ibseg t_bsec = ibsec t_bsed = ibsed t_bset = ibset.

REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = gv_repid is_layout = ls_layout it_fieldcat = lt_fcat * i_save = gc_value_x "N1459575 it_events = lt_events is_print = ls_print it_sort = lt_sort_catalog TABLES t_outtab = gt_ibkpf_output EXCEPTIONS program_error = 1 OTHERS = 2.

REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = iv_repid i_structure_name = iv_struct_output CHANGING ct_fieldcat = xt_fcat EXCEPTIONS inconsistent_interface = 1 program_error = 2 OTHERS = 3.

BAL_DSP_LOG_PRINT CALL FUNCTION 'BAL_DSP_LOG_PRINT' EXPORTING i_s_list_append = gc_value_x i_s_display_profile = gs_prof EXCEPTIONS profile_inconsistent = 1 internal_error = 2 no_data_available = 3 no_authority = 4 OTHERS = 5.

BAL_LOG_REFRESH CALL FUNCTION 'BAL_LOG_REFRESH' EXPORTING i_log_handle = gv_log_hdl EXCEPTIONS log_not_found = 1 OTHERS = 2.

BAL_LOG_CREATE CALL FUNCTION 'BAL_LOG_CREATE' EXPORTING i_s_log = ls_log IMPORTING e_log_handle = xv_log_hdl EXCEPTIONS log_header_inconsistent = 1 OTHERS = 2.

BAL_LOG_MSG_ADD_FREE_TEXT CALL FUNCTION 'BAL_LOG_MSG_ADD_FREE_TEXT' EXPORTING i_log_handle = iv_log_hdl i_msgty = 'I' i_probclass = '4' i_text = lv_text EXCEPTIONS log_not_found = 1 msg_inconsistent = 2 log_is_full = 3 OTHERS = 4.

BAL_DSP_PROFILE_NO_TREE_GET CALL FUNCTION 'BAL_DSP_PROFILE_NO_TREE_GET' IMPORTING e_s_display_profile = xs_prof.

BAL_DSP_LOG_DISPLAY CALL FUNCTION 'BAL_DSP_LOG_DISPLAY' EXPORTING i_s_display_profile = is_prof EXCEPTIONS profile_inconsistent = 1 internal_error = 2 no_data_available = 3 no_authority = 4 OTHERS = 5.



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