SAP Reports / Programs

SAPV019 SAP ABAP Report - Deleting Master Data







SAPV019 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for The program deletes Financial Accounting master data and is defined as preparation for the productive start...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 SAPV019 into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

OV52 - Del.Customers Pre-Production Startup


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 SAPV019. "Basic submit
SUBMIT SAPV019 AND RETURN. "Return to original report after report execution complete
SUBMIT SAPV019 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: Y_ASEGM = Only general master data
Selection Text: X_TESTL = Test run
Selection Text: X_LOEVM = Note deletion flag
Selection Text: X_ASEGM = With general master data
Selection Text: P_VKORG = In sales organisation
Selection Text: P_BUKRS = In company code
Selection Text: KUNNRX = Customers
Selection Text: D_KUNNR = Detailed log
Title: Deleting Master Data
Text Symbol: 705 = Customer is used in another company code
Text Symbol: 703 = Customer is used in sales segment (SD)
Text Symbol: 602 = Program control
Text Symbol: 601 = Deletion depth
Text Symbol: 600 = Deletion quantity selection
Text Symbol: 506 = No data recorded
Text Symbol: 502 = Detail log
Text Symbol: 500 = Automatic work lists for customers reset "
Text Symbol: 406 = Take deletion flag into consideration: NO
Text Symbol: 405 = Take deletion ind.into consideration: YES
Text Symbol: 404 = Stop time "
Text Symbol: 403 = Stop date "
Text Symbol: 402 = Start time "
Text Symbol: 401 = Start date " "
Text Symbol: 400 = Program started by: " "
Text Symbol: 102 = Addresses from central address management "
Text Symbol: 100 = Change documents "
Text Symbol: 050 = Please reset the number ranges, if need be
Text Symbol: 040 = No master data to be deleted was found in the selection area
Text Symbol: 026 = Customer master data SD/FI ;;
Text Symbol: 025 = Short descriptn
Text Symbol: 020 = Problem "
Text Symbol: 018 = Problem cases " No. of problem cases
Text Symbol: 017 = Recds deleted " No. of records deleted
Text Symbol: 016 = Records read " No. of records read
Text Symbol: 015 = Table " Table name
Text Symbol: 012 = Test run " Program run is test run
Text Symbol: 011 = Prod.run " Program run is production run
Text Symbol: 009 = >>>>> $VARI <<<<<





Text Symbol: 007 = General master data "
Text Symbol: 006 = In company code "


INCLUDES used within this REPORT SAPV019

INCLUDE V019TOP.


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:

RSLG_WRITE_SYSLOG_ENTRY CALL FUNCTION 'RSLG_WRITE_SYSLOG_ENTRY' EXPORTING data_area = add_ons sl_message_area = 'C0' sl_message_subid = '0'.

ADDR_MEMORY_CLEAR CALL FUNCTION 'ADDR_MEMORY_CLEAR' EXPORTING force = 'X' EXCEPTIONS OTHERS = 1.

OPEN_FI_PERFORM_00005013_P CALL FUNCTION 'OPEN_FI_PERFORM_00005013_P' EXPORTING i_chgtype = 'D' i_origin = 'SAPV019 DELETE_KNKA' i_tabname = 'KNKA' * I_STRUCTURE = TABLES t_structure = tknka EXCEPTIONS error = 1 OTHERS = 2.

OPEN_FI_PERFORM_00005013_P CALL FUNCTION 'OPEN_FI_PERFORM_00005013_P' EXPORTING i_chgtype = 'D' i_origin = 'SAPV019 DELETE_KNKK' i_tabname = 'KNKK' * I_STRUCTURE = TABLES t_structure = tknkk EXCEPTIONS error = 1 OTHERS = 2.

ADDR_DELETE CALL FUNCTION 'ADDR_DELETE' EXPORTING * ADDRESS_HANDLE = ' ' address_number = tkna1-adrnr address_reference = h_addr_ref * DATE_FROM = '00010101' IMPORTING returncode = h_rc * TABLES * ERROR_TABLE = EXCEPTIONS address_not_exist = 1 parameter_error = 2 internal_error = 3 reference_not_exist = 4 OTHERS = 5.

ADDR_MEMORY_SAVE CALL FUNCTION 'ADDR_MEMORY_SAVE' EXPORTING execute_in_update_task = ' ' EXCEPTIONS address_number_missing = 1 person_number_missing = 2 internal_error = 3 database_error = 4 reference_missing = 5 OTHERS = 6.

ACCREC_DOCUMENT_CHANGES_DELETE CALL FUNCTION 'ACCREC_DOCUMENT_CHANGES_DELETE' EXPORTING i_delete = x_echtl IMPORTING e_dbcnt = sy-dbcnt TABLES t_kunnr = tkunnr.

ADDR_GET CALL FUNCTION 'ADDR_GET' EXPORTING address_selection = gv_fb_addr_get_selection address_group = gcs_address_group-man_address IMPORTING sadr = sadr EXCEPTIONS OTHERS = 01.

SAPSCRIP_TEXT_DELETE CALL FUNCTION 'SAPSCRIP_TEXT_DELETE' EXPORTING i_delete = x_echtl i_tdobject = i_tdobject TABLES t_icomm = icomm t_tdname = t_konto.

CLFM_DELETE_CLASSIFICATION CALL FUNCTION 'CLFM_DELETE_CLASSIFICATION' EXPORTING echt_lauf = x_echtl type = char_x "sonst kommt COMMIT WORK! object = i_object table = i_table IMPORTING anz_ausp = anz_ausp anz_kssk = anz_kssk EXCEPTIONS foreign_lock = 99 not_deleted = 99 system_failure = 99 table_not_found = 99.

/SAPDMC/DATAELEMENT_GET_TEXTS CALL FUNCTION '/SAPDMC/DATAELEMENT_GET_TEXTS' EXPORTING name = 'P_SIMUL' IMPORTING text_short = lv_text EXCEPTIONS not_found = 1 OTHERS = 2 .

REUSE_ALV_COMMENTARY_WRITE CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = it_list_top_of_page.

ADDR_PERS_COMP_DELETE CALL FUNCTION 'ADDR_PERS_COMP_DELETE' EXPORTING * ADDRESS_HANDLE = ' ' address_number = x_kna1-adrnr * DATE_FROM = '00010101' * PERSON_HANDLE = ' ' person_number = i_knvk-prsnr person_reference = h_pers_ref IMPORTING returncode = h_rc * TABLES * ERROR_TABLE = EXCEPTIONS address_not_exist = 1 parameter_error = 2 person_not_exist = 3 relation_not_exist = 4 internal_error = 5 reference_not_exist = 6 OTHERS = 7.

ADDR_PERSONAL_DELETE CALL FUNCTION 'ADDR_PERSONAL_DELETE' EXPORTING * ADDRESS_HANDLE = ' ' address_number = i_knvk-adrnp_2 address_reference = h_addr_ref * DATE_FROM = '00010101' * PERSON_HANDLE = ' ' person_number = i_knvk-prsnr person_reference = h_pers_ref IMPORTING returncode = h_rc * TABLES * ERROR_TABLE = EXCEPTIONS parameter_error = 1 personal_address_not_exist = 2 internal_error = 3 reference_not_exist = 4 OTHERS = 5.

ADDR_DELETE CALL FUNCTION 'ADDR_DELETE' EXPORTING * ADDRESS_HANDLE = ' ' address_number = i_knvk-adrnp address_reference = h_addr_ref * DATE_FROM = '00010101' IMPORTING returncode = h_rc * TABLES * ERROR_TABLE = EXCEPTIONS address_not_exist = 1 parameter_error = 2 internal_error = 3 reference_not_exist = 4 OTHERS = 5.

ADDR_DELETE CALL FUNCTION 'ADDR_DELETE' EXPORTING * ADDRESS_HANDLE = ' ' address_number = i_knvk-adrnd address_reference = h_addr_ref * DATE_FROM = '00010101' IMPORTING returncode = h_rc * TABLES * ERROR_TABLE = EXCEPTIONS address_not_exist = 1 parameter_error = 2 internal_error = 3 reference_not_exist = 4 OTHERS = 5.

REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = g_repid i_callback_pf_status_set = gc_pf_status i_callback_user_command = gc_user_command is_layout = ls_layout it_fieldcat = lt_fieldcat i_save = gc_save it_events = lt_eventtab TABLES t_outtab = it_list EXCEPTIONS program_error = 1 OTHERS = 2 .






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

REUSE_ALV_COMMENTARY_WRITE CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = it_list_end_of_list.

REUSE_ALV_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = g_repid is_layout = ls_layout it_fieldcat = lt_fieldcat i_save = gc_save it_events = lt_eventtab TABLES t_outtab = it_detail EXCEPTIONS program_error = 1 OTHERS = 2 .

REUSE_ALV_COMMENTARY_WRITE CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = it_list_end_of_list.

BAL_DSP_LOG_DISPLAY CALL FUNCTION 'BAL_DSP_LOG_DISPLAY' EXPORTING i_t_log_handle = gt_appl_log_handle EXCEPTIONS profile_inconsistent = 1 internal_error = 2 no_data_available = 0 no_authority = 4 OTHERS = 5.

BAL_LOG_CREATE CALL FUNCTION 'BAL_LOG_CREATE' EXPORTING i_s_log = gs_appl_log IMPORTING e_log_handle = g_appl_log_handle 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 = g_appl_log_handle i_msgty = iv_msgty i_text = iv_text EXCEPTIONS log_not_found = 1 msg_inconsistent = 2 log_is_full = 3 OTHERS = 4.



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