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

SAPF058 SAP ABAP Report - FI: Archiving Program for Vendor Master Data







SAPF058 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for The SAPF058 program archives vendor master records and writes the archiveable master records to an archiving file...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 SAPF058 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 SAPF058. "Basic submit
SUBMIT SAPF058 AND RETURN. "Return to original report after report execution complete
SUBMIT SAPF058 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: X_FCONN = FI link validation off
Selection Text: X_DETAIL = Detail log
Selection Text: X_BSGMM = MM data
Selection Text: X_BSGFI = FI data
Selection Text: X_ASEGM = General master records
Selection Text: LIFNRX = Vendor
Selection Text: EKORGX = Purchasing organization
Selection Text: BUKRSX = Company code
Selection Text: ADMI_REM = Memo on Archiving Run
Title: FI: Archiving Program for Vendor Master Data
Text Symbol: 062 = Archiving quantity selection
Text Symbol: 061 = Purchasing Organizations:
Text Symbol: 060 = Company Codes :
Text Symbol: 059 = Consider MM Data:
Text Symbol: 058 = Due to MM Dependencies:
Text Symbol: 057 = Due to SD Dependencies:
Text Symbol: 056 = Due to FI Dependencies:
Text Symbol: 055 = No Deletion Indicator:
Text Symbol: 054 = Reasons data not archived (more than one reason possible)
Text Symbol: 053 = non-archivable:
Text Symbol: 052 = copiable and non-deletable:
Text Symbol: 051 = No. of which archivable and deletable:
Text Symbol: 050 = Number of Table Records Read:
Text Symbol: 049 = Statistics for General Master Data
Text Symbol: 043 = W: Dependency in several application
Text Symbol: 063 = Program control
Text Symbol: 064 = Processed/Created Archiving Session:
Text Symbol: 065 = Error: Blcked from del.
Text Symbol: 066 = Warng: Blocked frm del.
Text Symbol: 067 = F: Original in other system
Text Symbol: 068 = W: Original in other system
Text Symbol: 075 = Deletion Block Set:
Text Symbol: 076 = Original in Other System:
Text Symbol: 100 = Program mode
Text Symbol: 101 = Detail Log: SD Master Data
Text Symbol: 102 = Purchasing organization
Text Symbol: 103 = Company code





Text Symbol: 104 = MM
Text Symbol: 105 = FI
Text Symbol: 106 = Site Still Exists:
Text Symbol: 042 = Error: Dependency in Several Appls
Text Symbol: 001 = Detail Log: Archivable General Master Data
Text Symbol: 002 = Detail Log: FI Master Data
Text Symbol: 003 = Detail Log: Non-Archivable General Master Data
Text Symbol: 004 = Detail Log: MM Master Data
Text Symbol: 005 = Overview log:
Text Symbol: 006 = <<< Test run >>>
Text Symbol: 007 = <<< Upd run >>>
Text Symbol: 008 = Vendor
Text Symbol: 009 = Name
Text Symbol: 010 = Error message (E) or warning (W)
Text Symbol: 011 = Vendors:
Text Symbol: 012 = Start date
Text Symbol: 013 = Start time
Text Symbol: 014 = Stop date
Text Symbol: 015 = Stop time
Text Symbol: 016 = Selection for this run
Text Symbol: 017 = Vendors
Text Symbol: 018 = Consider SD Data:
Text Symbol: 019 = Fiscal Years
Text Symbol: 020 = Start of Archiving Online
Text Symbol: 021 = Deletion program cannot be started
Text Symbol: 022 = automatically. Continue anyway?
Text Symbol: 023 = not specified
Text Symbol: 024 = No data found for this category
Text Symbol: 025 = Run Started by:
Text Symbol: 026 = Archive General Data:
Text Symbol: 027 = Consider FI Data
Text Symbol: 028 = Test Run Activated:
Text Symbol: 029 = Detail Log Activated:
Text Symbol: 030 = Record selected for archiving
Text Symbol: 031 = Error: Dependencies in SD
Text Symbol: 032 = Error: Dependencies in FI
Text Symbol: 033 = Error: Dependencies in MM
Text Symbol: 034 = Error: Deletion Indicator Not Set
Text Symbol: 035 = W: Dependency in SD





Text Symbol: 036 = W: Dependency in FI
Text Symbol: 037 = W: Dependency in MM
Text Symbol: 038 = W: Deletion Indicator Not Set
Text Symbol: 039 = E: Other Reasons
Text Symbol: 040 = W: No appl. data for general part
Text Symbol: 041 = Warning: Only app.data to be arch.


INCLUDES used within this REPORT SAPF058

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_ACCPAYB_START_SESSION CALL FUNCTION 'FI_ACCPAYB_START_SESSION' EXPORTING i_bsgfi = x_bsgfi i_asegm = x_asegm i_detail = x_detail i_fconn = x_fconn TABLES i_lifnrx = lifnrx i_bukrsx = bukrsx o_lfa1 = app_lfa1.

SD_ACCPAYB_START_SESSION " CALL FUNCTION 'SD_ACCPAYB_START_SESSION' " EXPORTING I_BSGSD = X_BSGSD " I_ASEGM = X_ASEGM " I_DETAIL = X_DETAIL " TABLES I_LIFNRX = LIFNRX " I_VKORGX = VKORGX " I_VTWEGX = VTWEGX " I_SPARTX = SPARTX " O_LFA1 = APP_LFA1.

MM_ACCPAYB_START_SESSION CALL FUNCTION 'MM_ACCPAYB_START_SESSION' EXPORTING i_bsgmm = x_bsgmm i_asegm = x_asegm i_detail = x_detail TABLES i_lifnrx = lifnrx i_ekorgx = ekorgx o_lfa1 = app_lfa1.

ARCHIVE_OPEN_FOR_WRITE CALL FUNCTION 'ARCHIVE_OPEN_FOR_WRITE' EXPORTING object = sys_objct create_archive_file = create_file call_delete_job_in_test_mode = space comments = admi_rem output_sel_screen_when_batch = true IMPORTING archive_handle = archive_handle.

ARCHIVE_GET_INFORMATION CALL FUNCTION 'ARCHIVE_GET_INFORMATION' EXPORTING archive_handle = archive_handle IMPORTING archive_name = archive_name.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' "Neues Objekt anmelden EXPORTING archive_handle = archive_handle object_id = sel_lfa1(21).

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' "Objekt speichern EXPORTING archive_handle = archive_handle.

ARCHIVE_WRITE_STATISTICS CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING archive_handle = archive_handle EXCEPTIONS internal_error = 1 OTHERS = 2.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = archive_handle.

FI_ACCPAYB_ANALYSE_ONE_OBJECT CALL FUNCTION 'FI_ACCPAYB_ANALYSE_ONE_OBJECT' EXPORTING i_ylfa1 = lfa1 IMPORTING o_no_delete = stat-fi_delnot o_have_aseg = stat-fi_has_as o_have_bseg = stat-fi_has_bs.

SD_ACCPAYB_ANALYSE_ONE_OBJECT " CALL FUNCTION 'SD_ACCPAYB_ANALYSE_ONE_OBJECT' " EXPORTING I_YLFA1 = LFA1 " IMPORTING O_NO_DELETE = STAT-SD_DELNOT " O_HAVE_ASEG = STAT-SD_HAS_AS " O_HAVE_BSEG = STAT-SD_HAS_BS.

MM_ACCPAYB_ANALYSE_ONE_OBJECT CALL FUNCTION 'MM_ACCPAYB_ANALYSE_ONE_OBJECT' EXPORTING i_ylfa1 = lfa1 i_delete_only = space IMPORTING o_no_delete = stat-mm_delnot o_have_aseg = stat-mm_has_as o_have_bseg = stat-mm_has_bs.

OUTBOUND_CALL_00003110_P CALL FUNCTION 'OUTBOUND_CALL_00003110_P' EXPORTING i_lfa1 = sel_lfa1 CHANGING c_logsys = asg_system.

ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = handle record_flags = ylfa1-archive_flags record_structure = 'LFA1' record = lfa1.

CHANGEDOCU_ARCHIVE_OBJECT CALL FUNCTION 'CHANGEDOCU_ARCHIVE_OBJECT' EXPORTING archive_handle = handle objectclass = class_cd_obj objectid = class_cd_oid object_delete_flag = del_class.




TEXT_ARCHIVE_OBJECT CALL FUNCTION 'TEXT_ARCHIVE_OBJECT' EXPORTING archive_handle = handle client = sy-mandt id = class_tx_id language = '*' name = class_tx_oid object = 'LFA1' object_delete_flag = del_class.

CLASSIFY_ARCHIVE_OBJECT CALL FUNCTION 'CLASSIFY_ARCHIVE_OBJECT' EXPORTING archive_handle = handle object = class_cl_oid ptable = 'LFA1 ' object_delete_flag = del_class.

ADDRESS_ARCHIVE_OBJECT CALL FUNCTION 'ADDRESS_ARCHIVE_OBJECT' EXPORTING archive_handle = handle address_object_type = address_object_type address_number = addrnumber address_reference = class_ad_ref object_delete_flag = del_class.

FI_ACCPAYB_WRITE_TO_ARCHIVE CALL FUNCTION 'FI_ACCPAYB_WRITE_TO_ARCHIVE' EXPORTING i_lfa1 = lfa1 i_handle = handle i_lfa1_delete = del_class.

SD_ACCPAYB_WRITE_TO_ARCHIVE " CALL FUNCTION 'SD_ACCPAYB_WRITE_TO_ARCHIVE' " EXPORTING I_LFA1 = LFA1 " I_HANDLE = HANDLE " I_LFA1_DELETE = DEL_CLASS.

MM_ACCPAYB_WRITE_TO_ARCHIVE CALL FUNCTION 'MM_ACCPAYB_WRITE_TO_ARCHIVE' EXPORTING i_lfa1 = lfa1 i_handle = handle i_lfa1_delete = del_class.

FI_ACCPAYB_WRITE_PROTOCOL CALL FUNCTION 'FI_ACCPAYB_WRITE_PROTOCOL' EXPORTING i_detail = true i_summary = false.

MM_ACCPAYB_WRITE_PROTOCOL CALL FUNCTION 'MM_ACCPAYB_WRITE_PROTOCOL' EXPORTING i_detail = true i_summary = false.

SD_ACCPAYB_WRITE_PROTOCOL " CALL FUNCTION 'SD_ACCPAYB_WRITE_PROTOCOL' " EXPORTING I_DETAIL = TRUE " I_SUMMARY = FALSE.

FI_ACCPAYB_WRITE_PROTOCOL CALL FUNCTION 'FI_ACCPAYB_WRITE_PROTOCOL' EXPORTING i_detail = false i_summary = true.

MM_ACCPAYB_WRITE_PROTOCOL CALL FUNCTION 'MM_ACCPAYB_WRITE_PROTOCOL' EXPORTING i_detail = false i_summary = true.

SD_ACCPAYB_WRITE_PROTOCOL " CALL FUNCTION 'SD_ACCPAYB_WRITE_PROTOCOL' " EXPORTING I_DETAIL = FALSE.

POPUP_TO_CONFIRM_STEP CALL FUNCTION 'POPUP_TO_CONFIRM_STEP' EXPORTING textline1 = text-021 textline2 = text-022 titel = text-020 defaultoption = char_j IMPORTING answer = answer.

OWN_LOGICAL_SYSTEM_GET CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET' IMPORTING own_logical_system = own_system EXCEPTIONS own_logical_system_not_defined = 1 OTHERS = 2.



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