REAARCH_ANALYSE_LINE is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Analysis of Billing Document Line Items for Archiving This report carries out the
If you would like to execute this report or see the full code listing simply enter REAARCH_ANALYSE_LINE into the relevant SAP transactions such as SE38 or SE80
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.
Selection Text: SE_VTRG = D .
Selection Text: SE_VKONT = D .
Selection Text: SE_BUKRS = D .
Selection Text: SE_BELNR = D .
Selection Text: SE_SIMT = Selection of Simulation Type
Selection Text: P_TESTL = Test run
Selection Text: P_SIMT3 = All
Selection Text: P_SIMT2 = Simulated
Selection Text: P_SIMT1 = Billed
Selection Text: P_LFZTIM = End time
Selection Text: P_LFZDAT = End date
Selection Text: P_LAUFZ = Runtime restriction active
Selection Text: P_DPC = Activate DPC Analysis
Selection Text: P_DETAIL = Detailed log
Selection Text: P_BAD = Only faulty docs in detail log
Selection Text: P_AUTARC = Start archiving automatically
Selection Text: P_ALLG = Statistics Only
Title: Analyze Billing Document for Archiving of Document Line Items
Text Symbol: S08 = All
Text Symbol: S07 = Simulated
Text Symbol: S06 = Billed
Text Symbol: S05 = Selection of Billing Documents
Text Symbol: S04 = Log type
Text Symbol: S03 = Technical options
Text Symbol: S02 = Runtime Restriction
Text Symbol: S01 = Additional restriction of archiving quantity
Text Symbol: P04 = Docs that cannot be archived:
Text Symbol: P03 = Archivable documents:
Text Symbol: P02 = Documents checked:
Text Symbol: P01 = Contracts checked:
Text Symbol: EE2 = Program stop: error reading from a database table
Text Symbol: EE1 = Program stop: error inserting the archiving indicator in ERCHARC table
Text Symbol: D12 = Overview log
Text Symbol: D11 = Overview log: backbilling/ period-end billing
Text Symbol: 010 = <<< Test run >>>
Text Symbol: 002 = &3 Billing Documents Analyzed
INCLUDE: IEAARCH_ANALYSE_LINES01,
MEAMAC00,
No SAP DATABASE tables are accessed within this REPORT code!
BP_EVENT_RAISE CALL FUNCTION 'BP_EVENT_RAISE' EXPORTING eventid = 'SAP_ISU_ARC_BIDOC_ANA_LINE_END' eventparm = sy-slset EXCEPTIONS bad_eventid = 1 eventid_does_not_exist = 2 eventid_missing = 3 raise_failed = 4 OTHERS = 5.
ISU_DB_ERCH_CURSOR_ARCHIVE CALL FUNCTION 'ISU_DB_ERCH_CURSOR_ARCHIVE' EXPORTING x_endabrpe = x_cust_date x_no_dpc = p_dpc IMPORTING y_erch_cursor = lv_erch_cursor TABLES x_se_belnr = xt_belnr x_se_vkont = xt_vkont x_se_vtrg = xt_vertrag x_se_bukrs = xt_bukrs x_se_simt = xt_simt.
PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_text = text-002 i_total = li_num_entries_processed i_output_immediately = space.
PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_text = text-002 i_total = li_num_entries_processed i_output_immediately = co_true.
ISU_DB_ERCH_CURSOR_ARCHIVE_DPC CALL FUNCTION 'ISU_DB_ERCH_CURSOR_ARCHIVE_DPC' EXPORTING x_endabrpe = x_cust_date IMPORTING y_erch_erchp_cursor = lv_erch_erchp_cursor TABLES x_se_belnr = xt_belnr x_se_vkont = xt_vkont x_se_vtrg = xt_vertrag x_se_bukrs = xt_bukrs x_se_simt = xt_simt.
PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_text = text-002 i_total = li_num_entries_processed i_output_immediately = space.
PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_text = text-002 i_total = li_num_entries_processed i_output_immediately = co_true.
TIME_UNITS CALL FUNCTION 'TIME_UNITS' IMPORTING year = lv_unit_year EXCEPTIONS si_unit_missing = 1 OTHERS = 2.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '741' i_msgv1 = -belnr.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '1' i_msgid = 'EARC' i_msgno = '246' i_msgv1 = -gpartner i_msgv2 = -vkont i_msgv3 = -vertrag i_msgv4 = -endabrpe.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '248'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '1' i_msgid = 'EARC' i_msgno = '246' i_msgv1 = -gpartner i_msgv2 = -vkont i_msgv3 = -vertrag i_msgv4 = -endabrpe.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '247'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '249'.
ISU_QUERY_PRINT_DOC_ARCHIVED CALL FUNCTION 'ISU_QUERY_PRINT_DOC_ARCHIVED' EXPORTING x_reverse_docs = x_reverse_docs TABLES xt_erchc = xt_erchc CHANGING xyt_query_erdk = it_query_erdk EXCEPTIONS not_found = 1 OTHERS = 2.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '250' i_msgv1 = -opbel.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '251'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '250' i_msgv1 = -opbel.
CALL FUNCTION 'ISU_DB_ERCH_SINGLE' EXPORTING x_belnr =-sc_belnr_n EXCEPTIONS OTHERS = 1.
ARCHIVE_PROTOCOL_COLLECT * CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' * EXPORTING * i_object =
-belnr * i_msgtype = '2' * i_msgid = 'EARC' * i_msgno = '252' * i_msgv1 = -sc_belnr_n.
ISU_DB_EVER_SINGLE CALL FUNCTION 'ISU_DB_EVER_SINGLE' EXPORTING x_vertrag =
-vertrag IMPORTING y_ever = wever EXCEPTIONS not_found = 1 system_error = 2 OTHERS = 3.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '460'.
ISU_DB_ETRG_SELECT_ANLAGE CALL FUNCTION 'ISU_DB_ETRG_SELECT_ANLAGE' EXPORTING x_anlage = wever-anlage TABLES t_etrg = it_etrg EXCEPTIONS not_found = 1 OTHERS = 2.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '460'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '252' i_msgv1 = -sc_belnr_n.
ISU_DB_ERCHP_MULTIPLE_SELECT CALL FUNCTION 'ISU_DB_ERCHP_MULTIPLE_SELECT' EXPORTING xt_ierch_key = it_select_erch_keys TABLES yt_erchp = it_erchp EXCEPTIONS not_found = 1 OTHERS = 2.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '254'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '248'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object =
-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '253'.
ISU_DB_ERCH_SELECT_RANGE CALL FUNCTION 'ISU_DB_ERCH_SELECT_RANGE' EXPORTING x_bis = lv_bis TABLES xt_vertrag = it_vertrag_range xt_wheretab = it_wheretab yt_erch = yt_erch EXCEPTIONS not_found = 1 OTHERS = 2.
ISU_DB_ERCH_SELECT_RANGE CALL FUNCTION 'ISU_DB_ERCH_SELECT_RANGE' EXPORTING x_von = lv_ab x_bis = lv_bis x_maxrows = '1' TABLES xt_vertrag = it_vertrag_range xt_wheretab = it_wheretab yt_erch = lt_erch EXCEPTIONS not_found = 1 OTHERS = 2.
ISU_DB_ERCH_SELECT_RANGE CALL FUNCTION 'ISU_DB_ERCH_SELECT_RANGE' EXPORTING x_bis = lv_bis TABLES xt_vertrag = it_vertrag_range xt_wheretab = it_wheretab yt_erch = lt_erch EXCEPTIONS not_found = 1 OTHERS = 2.
ISU_DB_ERCH_MULTIPLE_SELECT CALL FUNCTION 'ISU_DB_ERCH_MULTIPLE_SELECT' EXPORTING xt_ierch_key = it_select_erch_keys TABLES yt_erch = it_temp_erch EXCEPTIONS not_found = 1 OTHERS = 2.
ISU_DB_ERCHC_MULTIPLE_SELECT CALL FUNCTION 'ISU_DB_ERCHC_MULTIPLE_SELECT' TABLES xt_erch = xt_erch yt_erchc = yt_erchc EXCEPTIONS not_found = 1 OTHERS = 2.
ISU_DB_ERCH_SELECT CALL FUNCTION 'ISU_DB_ERCH_SELECT' EXPORTING x_vertrag = wa_erch-vertrag x_simulation = space x_sort = space x_storno = co_no_storno TABLES t_erch = it_contract_erch EXCEPTIONS not_found = 1 OTHERS = 2.
ISU_DB_ERCHARC_MULTIPLE_SELECT CALL FUNCTION 'ISU_DB_ERCHARC_MULTIPLE_SELECT' EXPORTING xt_erch_key = it_erch_key TABLES yt_ercharc = it_ercharc EXCEPTIONS not_found = 1 OTHERS = 2.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '257'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '257'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_archive_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '255' i_msgv1 = wa_erch-belnr.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '257'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '464'. "n1566483
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '257'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_archive_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '256' i_msgv1 = wa_erch-belnr.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = x_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '257'.
ISU_QUERY_PRINT_DOC_ARCHIVED CALL FUNCTION 'ISU_QUERY_PRINT_DOC_ARCHIVED' CHANGING xyt_query_erdk = it_query_erdk EXCEPTIONS OTHERS = 1.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = x_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '251'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = x_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '250' i_msgv1 = wa_query_erdk-opbel.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = x_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '257' i_msgv1 = x_erch-begabrpe i_msgv2 = x_erch-endabrpe.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '257'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '256' i_msgv1 = lv_unarchivable_doc.
ISU_DB_ERCHARC_MULTIPLE_UPDATE CALL FUNCTION 'ISU_DB_ERCHARC_MULTIPLE_UPDATE' EXPORTING x_upd_mode = co_upd_insert TABLES xt_ercharc = it_ercharc EXCEPTIONS OTHERS = 1.
DB_COMMIT CALL FUNCTION 'DB_COMMIT'.
ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = wa_adj_erch-belnr i_msgtype = '2' i_msgid = 'EARC' i_msgno = '252' i_msgv1 = wa_adj_erch-sc_belnr_n.
ARCHIVE_PROTOCOL_WRITE CALL FUNCTION 'ARCHIVE_PROTOCOL_WRITE'.
ARCHIVE_PROTOCOL_INIT CALL FUNCTION 'ARCHIVE_PROTOCOL_INIT' EXPORTING i_detailprotocol = ch_detail.
ISU_DETERMINE_ARCHIVE_DATES CALL FUNCTION 'ISU_DETERMINE_ARCHIVE_DATES' EXPORTING x_archive_obj = co_isu_bill_lines_obj IMPORTING y_archive_dates = gv_archive_dates * Y_DATE_CHECK = EXCEPTIONS not_found = 1 OTHERS = 2.
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 REAARCH_ANALYSE_LINE or its description.
REAARCH_ANALYSE_LINE - Analyze Billing Document for Archiving of Document Line Items REAARCH_ANALYSE_LINE - Analyze Billing Document for Archiving of Document Line Items REAARCH_ANALYSE_HEAD_ILM - Analyze Billing Documents for Archiving REAARCH_ANALYSE_HEAD_ILM - Analyze Billing Documents for Archiving REAARCH_ANALYSE_HEAD - Analyze Billing Documents for Archiving REAARCH_ANALYSE_HEAD - Analyze Billing Documents for Archiving