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

SAPF056 SAP ABAP Report - FI: Archiving Program for Customer Master Data







SAPF056 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for The SAPF056 program archives customer master records and writes the archivable 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 SAPF056 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 SAPF056. "Basic submit
SUBMIT SAPF056 AND RETURN. "Return to original report after report execution complete
SUBMIT SAPF056 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_VBELP = SD document validation off
Selection Text: X_TESTL = Test run
Selection Text: X_FCONN = FI link validation off
Selection Text: X_DETAIL = Detail log
Selection Text: X_BSGSD = SD data
Selection Text: X_BSGFI = FI data
Selection Text: X_ASEGM = General master records
Selection Text: VKORGX = Sales organization
Selection Text: KUNNRX = Customer
Selection Text: BUKRSX = Company code
Selection Text: ADMI_REM = Memo on Archiving Run
Title: FI: Archiving Program for Customer Master Data
Text Symbol: 061 = Program control
Text Symbol: 060 = Archiving quantity selection
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 objects read
Text Symbol: 049 = Statistics for General Master Data
Text Symbol: 043 = W: Dependency in Several Appls
Text Symbol: 062 = Processed/Created Archiving Session:
Text Symbol: 063 = Error: Blcked from del.
Text Symbol: 064 = Warng: Blocked frm del.
Text Symbol: 065 = Deletion Block Set:
Text Symbol: 066 = Original in Other System:
Text Symbol: 067 = F: Original in other system
Text Symbol: 068 = W: Original in other system
Text Symbol: 100 = Program mode
Text Symbol: 101 = Detail Log: SD Master Data
Text Symbol: 102 = Sales organization
Text Symbol: 103 = Company code
Text Symbol: 104 = SD





Text Symbol: 105 = FI
Text Symbol: 106 = Site Still Exists:
Text Symbol: 107 = Business Partner 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 = Customer
Text Symbol: 009 = Name
Text Symbol: 010 = Error message (E) or warning (W)
Text Symbol: 011 = Customers:
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 = Customers
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 SAPF056

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_ACCRECV_START_SESSION CALL FUNCTION 'FI_ACCRECV_START_SESSION' EXPORTING i_bsgfi = x_bsgfi i_asegm = x_asegm i_detail = x_detail i_fconn = x_fconn TABLES i_kunnrx = kunnrx i_bukrsx = bukrsx o_kna1 = app_kna1.

SD_ACCRECV_START_SESSION CALL FUNCTION 'SD_ACCRECV_START_SESSION' EXPORTING i_bsgsd = x_bsgsd i_asegm = x_asegm i_detail = x_detail i_vbelp = x_vbelp TABLES i_kunnrx = kunnrx i_vkorgx = vkorgx o_kna1 = app_kna1.

MM_ACCRECV_START_SESSION " CALL FUNCTION 'MM_ACCRECV_START_SESSION' " EXPORTING I_BSGSD = X_BSGSD " I_ASEGM = X_ASEGM " I_DETAIL = X_DETAIL " TABLES I_KUNNRX = KUNNRX " I_EKORGX = EKORGX " O_KNA1 = APP_KNA1.

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_kna1(13).

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_ACCRECV_ANALYSE_ONE_OBJECT CALL FUNCTION 'FI_ACCRECV_ANALYSE_ONE_OBJECT' EXPORTING i_ykna1 = kna1 IMPORTING o_no_delete = stat-fi_delnot o_have_aseg = stat-fi_has_as o_have_bseg = stat-fi_has_bs.

SD_ACCRECV_ANALYSE_ONE_OBJECT CALL FUNCTION 'SD_ACCRECV_ANALYSE_ONE_OBJECT' EXPORTING i_ykna1 = kna1 i_delete_only = space IMPORTING o_no_delete = stat-sd_delnot o_have_aseg = stat-sd_has_as o_have_bseg = stat-sd_has_bs.

MM_ACCRECV_ANALYSE_ONE_OBJECT " CALL FUNCTION 'MM_ACCRECV_ANALYSE_ONE_OBJECT' " EXPORTING I_YKNA1 = KNA1 " IMPORTING O_NO_DELETE = STAT-MM_DELNOT " O_HAVE_DATA = STAT-MM_HASDAT.

OUTBOUND_CALL_00003010_P CALL FUNCTION 'OUTBOUND_CALL_00003010_P' EXPORTING i_kna1 = sel_kna1 CHANGING c_logsys = asg_system.

ARCHIVE_PUT_RECORD CALL FUNCTION 'ARCHIVE_PUT_RECORD' EXPORTING archive_handle = handle record_flags = ykna1-archive_flags record_structure = 'KNA1' record = kna1.

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 = 'KNA1' object_delete_flag = del_class.

CLASSIFY_ARCHIVE_OBJECT CALL FUNCTION 'CLASSIFY_ARCHIVE_OBJECT' EXPORTING archive_handle = handle object = class_cl_oid ptable = 'KNA1 ' 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_ACCRECV_WRITE_TO_ARCHIVE CALL FUNCTION 'FI_ACCRECV_WRITE_TO_ARCHIVE' EXPORTING i_kna1 = kna1 i_handle = handle i_kna1_delete = del_class.

SD_ACCRECV_WRITE_TO_ARCHIVE CALL FUNCTION 'SD_ACCRECV_WRITE_TO_ARCHIVE' EXPORTING i_kna1 = kna1 i_handle = handle i_kna1_delete = del_class.

MM_ACCRECV_WRITE_TO_ARCHIVE " CALL FUNCTION 'MM_ACCRECV_WRITE_TO_ARCHIVE' " EXPORTING I_KNA1 = KNA1 " I_HANDLE = HANDLE " I_KNA1_DELETE = DEL_CLASS.

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

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

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

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

MM_ACCRECV_WRITE_PROTOCOL " CALL FUNCTION 'MM_ACCRECV_WRITE_PROTOCOL' " EXPORTING DETAIL = FALSE.

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

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