SAP Reports / Programs

RSARCHD SAP ABAP Report - Schedule Delete Jobs in Data Archiving







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


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 RSARCHD. "Basic submit
SUBMIT RSARCHD AND RETURN. "Return to original report after report execution complete
SUBMIT RSARCHD VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


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


INCLUDES used within this REPORT RSARCHD

INCLUDE LBTCHDEF.
INCLUDE ADK_CONST. " >= 4.6C


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:

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.



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