RSARCHD is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for RSARCHD: Delete Phase in Data Archiving outside of Archive Administration The program runs outstanding delete jobs for archive files from incomplete, valid archiving sessions for an archiving object...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 RSARCHD 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.
Log for Created Delete Jobs
Selection Text: JOBS4OBJ = D .
Selection Text: ADK_USER = D .
Selection Text: ALL = D .
Selection Text: FILES = D .
Selection Text: JOB_USER = D .
Selection Text: MAX_JOBS = D .
Selection Text: OBJECT = D .
Selection Text: SESSIONS = D .
Selection Text: TEST = D .
Selection Text: WAIT_END = D .
Title: Schedule Delete Jobs in Data Archiving
Text Symbol: 001 = Archiving Object
Text Symbol: 002 = Name of Delete Program
Text Symbol: 003 = Variant Name
Text Symbol: 004 = User for Jobs
Text Symbol: 005 = At least one job canceled:
Text Symbol: 006 = All scheduled jobs completed
Text Symbol: 007 = Log for Created Delete Jobs
Text Symbol: 008 = All Jobs Have Been Scheduled
INCLUDE LBTCHDEF.
INCLUDE ADK_CONST. " >= 4.6C
No SAP DATABASE tables are accessed within this REPORT code!
RS_VARIANT_EXISTS CALL FUNCTION 'RS_VARIANT_EXISTS' EXPORTING report = gs_arch_obj-delete_prg variant = gv_variant IMPORTING r_c = r_c.
ENQUEUE_E_TABLE CALL FUNCTION 'ENQUEUE_E_TABLE' EXPORTING tabname = 'ADMI_JOBS' varkey = varkey _wait = 'X' EXCEPTIONS foreign_lock = 1 OTHERS = 2.
GET_PRINT_PARAMETERS CALL FUNCTION 'GET_PRINT_PARAMETERS' EXPORTING mode = 'BATCH' report = gs_arch_obj-delete_prg line_count = 65 line_size = 132 list_text = list_text IMPORTING out_archive_parameters = arch_parameters out_parameters = print_parameters valid = spool_valid.
SHOW_JOBSTATE CALL FUNCTION 'SHOW_JOBSTATE' EXPORTING jobcount = gs_sched_job_tab-jobcount jobname = gs_sched_job_tab-jobname IMPORTING aborted = gv_aborted finished = gv_finished.
DB_COMMIT CALL FUNCTION 'DB_COMMIT'. " releases lock on TBTCO
RZL_SLEEP CALL FUNCTION 'RZL_SLEEP' EXPORTING seconds = 5.
BP_JOB_READ CALL FUNCTION 'BP_JOB_READ' EXPORTING job_read_jobcount = gs_job_tab-jobcount job_read_jobname = gs_job_tab-jobname job_read_opcode = btc_read_jobhead_only IMPORTING job_read_jobhead = jobhead EXCEPTIONS job_doesnt_exist = 1 job_doesnt_have_steps = 2.
ARCHIVE_SCHEDULE_JOB CALL FUNCTION 'ARCHIVE_SCHEDULE_JOB' EXPORTING object = object jobtype = gc_job_del variant = gv_variant start_immediate = 'X' inherit_spool_parms = gv_inherit_spool print_parameters = print_parameters arch_parameters = arch_parameters user = job_user ext_user = gc_user_sap session = gs_file_tab-document file_key = gs_file_tab-archiv_key delete_failed_job = 'X' IMPORTING jobname = gv_jobname jobcount = gv_jobcount EXCEPTIONS object_not_found = 1 job_not_created = 2 no_such_variant = 3 input_inconsistent = 4 jobtype_not_supported = 5 OTHERS = 6.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_structure_name = 'ADMI_JOBS' CHANGING ct_fieldcat = t_fieldcat.
REUSE_ALV_GRID_DISPLAY CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = lv_report i_callback_top_of_page = 'TOP_OF_PAGE' is_layout = ls_layout it_fieldcat = t_fieldcat is_variant = ls_variant i_save = 'A' TABLES t_outtab = gt_outtab.
REUSE_ALV_COMMENTARY_WRITE CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = lt_comments.
BP_JOB_READ CALL FUNCTION 'BP_JOB_READ' EXPORTING job_read_jobcount = gs_job_tab-jobcount job_read_jobname = gs_job_tab-jobname job_read_opcode = btc_read_jobhead_only IMPORTING job_read_jobhead = ls_jobhead EXCEPTIONS job_doesnt_exist = 1 job_doesnt_have_steps = 2.
ENQUEUE_E_TABLE CALL FUNCTION 'ENQUEUE_E_TABLE' EXPORTING tabname = 'ADMI_FILES' varkey = l_enqueue_key EXCEPTIONS foreign_lock = 1 system_failure = 2 OTHERS = 3.
DEQUEUE_E_TABLE CALL FUNCTION 'DEQUEUE_E_TABLE' EXPORTING tabname = 'ADMI_FILES' varkey = l_enqueue_key EXCEPTIONS OTHERS = 0.
Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.