SAP ARCHIVE_ADMIN_SELECT_SESSIONS Function Module for Selection of Archiving Sessions and Files
ARCHIVE_ADMIN_SELECT_SESSIONS is a standard archive admin select sessions SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Selection of Archiving Sessions and Files processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for archive admin select sessions FM, simply by entering the name ARCHIVE_ADMIN_SELECT_SESSIONS into the relevant SAP transaction such as SE37 or SE38.
Function Group: AADM
Program Name: SAPLAADM
Main Program: SAPLAADM
Appliation area:
Release date: 09-Nov-2001
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function ARCHIVE_ADMIN_SELECT_SESSIONS pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'ARCHIVE_ADMIN_SELECT_SESSIONS'"Selection of Archiving Sessions and Files.
EXPORTING
* WRITING = "Write Phase Running
* REPLACED = ' ' "Replaced
* TO_BE_ARCHIVED = ' ' "With 'To Be Archived' Flag
* INVALID = ' ' "Invalid
* INTERRUPTED_INCOMPLETE = ' ' "Interrupted/Incomplete
* INTERRUPTED_COMPLETE = ' ' "Interrupted/Complete
* IV_USE_JOB_STATUS = ABAP_TRUE "Include Job Status
* RUNS_WITHOUT_FILES = 'X' "Run Without Files
* INDICATE_PROGRESS = ' ' "Activate GUI Progress Indicator
* CLIENT_DEPENDENCE = 'X' "Take Client-Dependence Into Account
* INCORRECT = ' ' "Errors
* INCOMPLETE = ' ' "Incomplete
* COMPLETE = ' ' "Complete
* BEING_RELOADED = ' ' "Being Reloaded
* CREATED_BY_RELOAD = ' ' "Created Upon reload
IMPORTING
ARCHIVE_RUNS = "Archiving Sessions: Properties, Jobs, and Status
TABLES
* OBJECT = "Range Table for Archiving Object Field
* ADK_SELECTED_RUNS = "Archiving Runs: Header Information, Jobs, and Status
* ADK_SELECTED_FILES = "Archive Files: Header Information, Jobs, and Status
* CLIENT = "Ranking table for client field
* DATE = "Ranking table for date field
* DOCUMENT = "Ranking table for archiving sessions
* USER = "Range Table for Field with Name of User
* SYSID = "Range Table for the System ID Field
* ORIG_CLIENT = "Ranking table for client field
* SELECTED_RUNS = "Archive Runs Header Data
* SELECTED_FILES = "Archive Files of Archive Sessions
EXCEPTIONS
OBJECT_NOT_FOUND = 1
IMPORTING Parameters details for ARCHIVE_ADMIN_SELECT_SESSIONS
WRITING - Write Phase Running
Data type: ADMI_RUN-WRITINGOptional: Yes
Call by Reference: No ( called with pass by value option)
REPLACED - Replaced
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TO_BE_ARCHIVED - With 'To Be Archived' Flag
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
INVALID - Invalid
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
INTERRUPTED_INCOMPLETE - Interrupted/Incomplete
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
INTERRUPTED_COMPLETE - Interrupted/Complete
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_USE_JOB_STATUS - Include Job Status
Data type: BOOLE_DDefault: ABAP_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RUNS_WITHOUT_FILES - Run Without Files
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
INDICATE_PROGRESS - Activate GUI Progress Indicator
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CLIENT_DEPENDENCE - Take Client-Dependence Into Account
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
INCORRECT - Errors
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
INCOMPLETE - Incomplete
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
COMPLETE - Complete
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
BEING_RELOADED - Being Reloaded
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CREATED_BY_RELOAD - Created Upon reload
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ARCHIVE_ADMIN_SELECT_SESSIONS
ARCHIVE_RUNS - Archiving Sessions: Properties, Jobs, and Status
Data type: ARCH_T_RUNSOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for ARCHIVE_ADMIN_SELECT_SESSIONS
OBJECT - Range Table for Archiving Object Field
Data type: RNG_OBJECTOptional: Yes
Call by Reference: Yes
ADK_SELECTED_RUNS - Archiving Runs: Header Information, Jobs, and Status
Data type: ADMI_RUNSTOptional: Yes
Call by Reference: Yes
ADK_SELECTED_FILES - Archive Files: Header Information, Jobs, and Status
Data type: ADMI_FILSTOptional: Yes
Call by Reference: Yes
CLIENT - Ranking table for client field
Data type: RNG_CLIENTOptional: Yes
Call by Reference: Yes
DATE - Ranking table for date field
Data type: RNG_DATEOptional: Yes
Call by Reference: Yes
DOCUMENT - Ranking table for archiving sessions
Data type: RNG_RUNOptional: Yes
Call by Reference: Yes
USER - Range Table for Field with Name of User
Data type: RNG_USEROptional: Yes
Call by Reference: Yes
SYSID - Range Table for the System ID Field
Data type: RNG_SYSIDOptional: Yes
Call by Reference: Yes
ORIG_CLIENT - Ranking table for client field
Data type: RNG_CLIENTOptional: Yes
Call by Reference: Yes
SELECTED_RUNS - Archive Runs Header Data
Data type: ADMI_RUNOptional: Yes
Call by Reference: Yes
SELECTED_FILES - Archive Files of Archive Sessions
Data type: ADMI_FILESOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
OBJECT_NOT_FOUND - Unknown Object
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ARCHIVE_ADMIN_SELECT_SESSIONS Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lt_object | TYPE STANDARD TABLE OF RNG_OBJECT, " | |||
| lv_writing | TYPE ADMI_RUN-WRITING, " | |||
| lv_archive_runs | TYPE ARCH_T_RUNS, " | |||
| lv_object_not_found | TYPE ARCH_T_RUNS, " | |||
| lv_replaced | TYPE CHAR1, " SPACE | |||
| lt_adk_selected_runs | TYPE STANDARD TABLE OF ADMI_RUNST, " | |||
| lv_to_be_archived | TYPE CHAR1, " SPACE | |||
| lt_adk_selected_files | TYPE STANDARD TABLE OF ADMI_FILST, " | |||
| lv_invalid | TYPE CHAR1, " SPACE | |||
| lv_interrupted_incomplete | TYPE CHAR1, " SPACE | |||
| lv_interrupted_complete | TYPE CHAR1, " SPACE | |||
| lv_iv_use_job_status | TYPE BOOLE_D, " ABAP_TRUE | |||
| lt_client | TYPE STANDARD TABLE OF RNG_CLIENT, " | |||
| lv_runs_without_files | TYPE CHAR1, " 'X' | |||
| lt_date | TYPE STANDARD TABLE OF RNG_DATE, " | |||
| lv_indicate_progress | TYPE CHAR1, " SPACE | |||
| lt_document | TYPE STANDARD TABLE OF RNG_RUN, " | |||
| lv_client_dependence | TYPE CHAR1, " 'X' | |||
| lt_user | TYPE STANDARD TABLE OF RNG_USER, " | |||
| lv_incorrect | TYPE CHAR1, " SPACE | |||
| lt_sysid | TYPE STANDARD TABLE OF RNG_SYSID, " | |||
| lv_incomplete | TYPE CHAR1, " SPACE | |||
| lv_complete | TYPE CHAR1, " SPACE | |||
| lt_orig_client | TYPE STANDARD TABLE OF RNG_CLIENT, " | |||
| lt_selected_runs | TYPE STANDARD TABLE OF ADMI_RUN, " | |||
| lv_being_reloaded | TYPE CHAR1, " SPACE | |||
| lt_selected_files | TYPE STANDARD TABLE OF ADMI_FILES, " | |||
| lv_created_by_reload | TYPE CHAR1. " SPACE |
|   CALL FUNCTION 'ARCHIVE_ADMIN_SELECT_SESSIONS' "Selection of Archiving Sessions and Files |
| EXPORTING | ||
| WRITING | = lv_writing | |
| REPLACED | = lv_replaced | |
| TO_BE_ARCHIVED | = lv_to_be_archived | |
| INVALID | = lv_invalid | |
| INTERRUPTED_INCOMPLETE | = lv_interrupted_incomplete | |
| INTERRUPTED_COMPLETE | = lv_interrupted_complete | |
| IV_USE_JOB_STATUS | = lv_iv_use_job_status | |
| RUNS_WITHOUT_FILES | = lv_runs_without_files | |
| INDICATE_PROGRESS | = lv_indicate_progress | |
| CLIENT_DEPENDENCE | = lv_client_dependence | |
| INCORRECT | = lv_incorrect | |
| INCOMPLETE | = lv_incomplete | |
| COMPLETE | = lv_complete | |
| BEING_RELOADED | = lv_being_reloaded | |
| CREATED_BY_RELOAD | = lv_created_by_reload | |
| IMPORTING | ||
| ARCHIVE_RUNS | = lv_archive_runs | |
| TABLES | ||
| OBJECT | = lt_object | |
| ADK_SELECTED_RUNS | = lt_adk_selected_runs | |
| ADK_SELECTED_FILES | = lt_adk_selected_files | |
| CLIENT | = lt_client | |
| DATE | = lt_date | |
| DOCUMENT | = lt_document | |
| USER | = lt_user | |
| SYSID | = lt_sysid | |
| ORIG_CLIENT | = lt_orig_client | |
| SELECTED_RUNS | = lt_selected_runs | |
| SELECTED_FILES | = lt_selected_files | |
| EXCEPTIONS | ||
| OBJECT_NOT_FOUND = 1 | ||
| . " ARCHIVE_ADMIN_SELECT_SESSIONS | ||
ABAP code using 7.40 inline data declarations to call FM ARCHIVE_ADMIN_SELECT_SESSIONS
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single WRITING FROM ADMI_RUN INTO @DATA(ld_writing). | ||||
| DATA(ld_replaced) | = ' '. | |||
| DATA(ld_to_be_archived) | = ' '. | |||
| DATA(ld_invalid) | = ' '. | |||
| DATA(ld_interrupted_incomplete) | = ' '. | |||
| DATA(ld_interrupted_complete) | = ' '. | |||
| DATA(ld_iv_use_job_status) | = ABAP_TRUE. | |||
| DATA(ld_runs_without_files) | = 'X'. | |||
| DATA(ld_indicate_progress) | = ' '. | |||
| DATA(ld_client_dependence) | = 'X'. | |||
| DATA(ld_incorrect) | = ' '. | |||
| DATA(ld_incomplete) | = ' '. | |||
| DATA(ld_complete) | = ' '. | |||
| DATA(ld_being_reloaded) | = ' '. | |||
| DATA(ld_created_by_reload) | = ' '. | |||
Search for further information about these or an SAP related objects