SAP Reports / Programs

BTCAUX10 SAP ABAP Report - Schedule Job with Last Execution Date/Time or with Time Window







BTCAUX10 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for You can use this report to schedule jobs with a last execution date/time or an execution time frame...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 BTCAUX10 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 BTCAUX10. "Basic submit
SUBMIT BTCAUX10 AND RETURN. "Return to original report after report execution complete
SUBMIT BTCAUX10 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: VARIANT = D .
Selection Text: USER = D .
Selection Text: JOBNAME = D .
Selection Text: CALID = D .
Selection Text: WEEKS = Weeks
Selection Text: USE_INT = Use Restriction
Selection Text: TIME2 = and
Selection Text: TIME1 = Between
Selection Text: TARGET = Execution Target
Selection Text: REPORT = Report
Selection Text: PRIPARS = Set Print Parameters
Selection Text: NOTHOLDY = Not on Sundays and Pub. Hols
Selection Text: MONTHS = Months
Selection Text: MINUTES = Minutes
Selection Text: LSTT = Last Execution Time
Selection Text: LSTD = Last Execution Date
Selection Text: LANGU = Job Step Language
Selection Text: HOURS = Hours
Selection Text: FSTT = First Execution Time
Selection Text: FSTD = First Execution Date
Selection Text: DAYS = Days
Selection Text: BEFORE = Move to Previous Working Day
Selection Text: ALWAYS = Always Execute
Selection Text: AFTER = Move to Following Working Day
Title: Schedule Job with Last Execution Date/Time or with Time Window
Text Symbol: 160 = Released
Text Symbol: 140 = No successor is created for a periodic job.
Text Symbol: 131 = W. BP_JOB_READ
Text Symbol: 130 = Error
Text Symbol: 126 = Start Date/Time Restrictions
Text Symbol: 125 = Time Interval
Text Symbol: 120 = First or Last Start Date/Time
Text Symbol: 110 = Period values
Text Symbol: 100 = Job Params


INCLUDES used within this REPORT BTCAUX10

INCLUDE LBTCHDEF.


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:

JOB_OPEN CALL FUNCTION 'JOB_OPEN' EXPORTING jobname = p_jobname IMPORTING jobcount = jobcount EXCEPTIONS cant_create_job = 1 invalid_job_data = 2 jobname_missing = 3 OTHERS = 4.

GET_PRINT_PARAMETERS CALL FUNCTION 'GET_PRINT_PARAMETERS' EXPORTING * ARCHIVE_ID = C_CHAR_UNKNOWN * ARCHIVE_INFO = C_CHAR_UNKNOWN * ARCHIVE_MODE = C_CHAR_UNKNOWN * ARCHIVE_TEXT = C_CHAR_UNKNOWN * AR_OBJECT = C_CHAR_UNKNOWN * ARCHIVE_REPORT = C_CHAR_UNKNOWN * AUTHORITY = C_CHAR_UNKNOWN * COPIES = C_NUM3_UNKNOWN * COVER_PAGE = C_CHAR_UNKNOWN * DATA_SET = C_CHAR_UNKNOWN * DEPARTMENT = C_CHAR_UNKNOWN * DESTINATION = C_CHAR_UNKNOWN * EXPIRATION = C_NUM1_UNKNOWN * IMMEDIATELY = C_CHAR_UNKNOWN * IN_ARCHIVE_PARAMETERS = ' ' * IN_PARAMETERS = ' ' * LAYOUT = C_CHAR_UNKNOWN * LINE_COUNT = C_INT_UNKNOWN * LINE_SIZE = C_INT_UNKNOWN * LIST_NAME = C_CHAR_UNKNOWN * LIST_TEXT = C_CHAR_UNKNOWN * MODE = ' ' * NEW_LIST_ID = C_CHAR_UNKNOWN * PROTECT_LIST = C_CHAR_UNKNOWN no_dialog = no_dialog * RECEIVER = C_CHAR_UNKNOWN * RELEASE = C_CHAR_UNKNOWN report = p_report * SAP_COVER_PAGE = C_CHAR_UNKNOWN * HOST_COVER_PAGE = C_CHAR_UNKNOWN * PRIORITY = C_NUM1_UNKNOWN * SAP_OBJECT = C_CHAR_UNKNOWN * TYPE = C_CHAR_UNKNOWN user = p_user * USE_OLD_LAYOUT = ' ' * UC_DISPLAY_MODE = C_CHAR_UNKNOWN * DRAFT = C_CHAR_UNKNOWN * ABAP_LIST = ' ' * USE_ARCHIVENAME_DEF = ' ' * DEFAULT_SPOOL_SIZE = C_CHAR_UNKNOWN * WITH_STRUCTURE = C_CHAR_UNKNOWN * SUPPRESS_SHADING = C_CHAR_UNKNOWN * PO_FAX_STORE = ' ' * NO_FRAMES = C_CHAR_UNKNOWN IMPORTING out_archive_parameters = arcparams out_parameters = priparams valid = valid * VALID_FOR_SPOOL_CREATION = EXCEPTIONS archive_info_not_found = 1 invalid_print_params = 2 invalid_archive_params = 3 OTHERS = 4.

JOB_SUBMIT CALL FUNCTION 'JOB_SUBMIT' EXPORTING arcparams = arcparams authcknam = p_user jobcount = jobcount jobname = p_jobname language = p_langu priparams = priparams report = p_report variant = p_variant * IMPORTING * STEP_NUMBER = EXCEPTIONS bad_priparams = 1 bad_xpgflags = 2 invalid_jobdata = 3 jobname_missing = 4 job_notex = 5 job_submit_failed = 6 lock_failed = 7 program_missing = 8 prog_abap_and_extpg_set = 9 OTHERS = 10 .

JOB_CLOSE CALL FUNCTION 'JOB_CLOSE' EXPORTING * AT_OPMODE = ' ' * AT_OPMODE_PERIODIC = ' ' * calendar_id = p_period-calendarid * EVENT_ID = ' ' * EVENT_PARAM = ' ' * EVENT_PERIODIC = ' ' jobcount = jobcount jobname = p_jobname * LASTSTRTDT = NO_DATE * LASTSTRTTM = NO_TIME sdlstrtdt = i_startdate sdlstrttm = i_starttime * startdate_restriction = p_period-prdbehav * START_ON_WORKDAY_NOT_BEFORE = SY-DATUM * START_ON_WORKDAY_NR = 0 * WORKDAY_COUNT_DIRECTION = 0 * RECIPIENT_OBJ = targetserver = p_tserver targetgroup = p_tgroup * IMPORTING * JOB_WAS_RELEASED = * CHANGING * RET = EXCEPTIONS cant_start_immediate = 1 invalid_startdate = 2 jobname_missing = 3 job_close_failed = 4 job_nosteps = 5 job_notex = 6 lock_failed = 7 invalid_target = 8 OTHERS = 9 .

BP_JOB_COPY CALL FUNCTION 'BP_JOB_COPY' EXPORTING dialog = btc_no source_jobcount = curr_jobcount source_jobname = curr_jobname target_jobname = curr_jobname * STEP_NUMBER = 0 IMPORTING new_jobhead = successor * CHANGING * RET = EXCEPTIONS cant_create_new_job = 1 cant_enq_job = 2 cant_read_sourcedata = 3 invalid_opcode = 4 jobname_missing = 5 job_copy_canceled = 6 no_copy_privilege_given = 7 no_plan_privilege_given = 8 OTHERS = 9 .

JOB_CLOSE CALL FUNCTION 'JOB_CLOSE' EXPORTING * AT_OPMODE = ' ' * AT_OPMODE_PERIODIC = ' ' * CALENDAR_ID = ' ' * EVENT_ID = ' ' * EVENT_PARAM = ' ' * EVENT_PERIODIC = ' ' jobcount = successor-jobcount jobname = successor-jobname * LASTSTRTDT = NO_DATE * LASTSTRTTM = NO_TIME * PRDDAYS = 0 * PRDHOURS = 0 * PRDMINS = 0 * PRDMONTHS = 0 * PRDWEEKS = 0 * PREDJOB_CHECKSTAT = ' ' * PRED_JOBCOUNT = ' ' * PRED_JOBNAME = ' ' sdlstrtdt = next_startdate sdlstrttm = next_starttime * STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS * STRTIMMED = ' ' * TARGETSYSTEM = ' ' * START_ON_WORKDAY_NOT_BEFORE = SY-DATUM * START_ON_WORKDAY_NR = 0 * WORKDAY_COUNT_DIRECTION = 0 * RECIPIENT_OBJ = * TARGETSERVER = ' ' * DONT_RELEASE = ' ' * TARGETGROUP = ' ' * DIRECT_START = * IMPORTING * JOB_WAS_RELEASED = * CHANGING * RET = EXCEPTIONS cant_start_immediate = 1 invalid_startdate = 2 jobname_missing = 3 job_close_failed = 4 job_nosteps = 5 job_notex = 6 lock_failed = 7 invalid_target = 8 OTHERS = 9 .

BP_JOB_DELETE CALL FUNCTION 'BP_JOB_DELETE' EXPORTING jobcount = del_jobcount jobname = del_jobname * FORCEDMODE = ' ' * COMMITMODE = 'X' EXCEPTIONS cant_delete_event_entry = 1 cant_delete_job = 2 cant_delete_joblog = 3 cant_delete_steps = 4 cant_delete_time_entry = 5 cant_derelease_successor = 6 cant_enq_predecessor = 7 cant_enq_successor = 8 cant_enq_tbtco_entry = 9 cant_update_predecessor = 10 cant_update_successor = 11 commit_failed = 12 jobcount_missing = 13 jobname_missing = 14 job_does_not_exist = 15 job_is_already_running = 16 no_delete_authority = 17 OTHERS = 18.

GET_JOB_RUNTIME_INFO CALL FUNCTION 'GET_JOB_RUNTIME_INFO' IMPORTING jobcount = p_curr_jobcount jobname = p_curr_jobname * STEPCOUNT = EXCEPTIONS no_runtime_info = 1 OTHERS = 2.

BP_JOB_READ CALL FUNCTION 'BP_JOB_READ' EXPORTING job_read_jobcount = p_curr_jobcount job_read_jobname = p_curr_jobname job_read_opcode = btc_dont_read_priparams * JOB_STEP_NUMBER = IMPORTING job_read_jobhead = p_curr_jobhead * JOBLOG_ATTRIBUTES = TABLES job_read_steplist = curr_steps * SPOOL_ATTRIBUTES = * CHANGING * RET = EXCEPTIONS invalid_opcode = 1 job_doesnt_exist = 2 job_doesnt_have_steps = 3 OTHERS = 4.

BP_START_DATE_EDITOR CALL FUNCTION 'BP_START_DATE_EDITOR' EXPORTING stdt_dialog = btc_no stdt_input = stdt_input * STDT_OPCODE = 0 IMPORTING * STDT_MODIFY_TYPE = stdt_output = stdt_output EXCEPTIONS fcal_id_not_defined = 1 incomplete_last_startdate = 2 incomplete_startdate = 3 invalid_dialog_type = 4 invalid_eventid = 5 invalid_opcode = 6 invalid_opmode_name = 7 invalid_periodbehaviour = 8 invalid_predecessor_jobname = 9 last_startdate_in_the_past = 10 no_period_data_given = 11 no_startdate_given = 12 period_and_predjob_no_way = 13 period_too_small_for_limit = 14 predecessor_jobname_not_unique = 15 startdate_interval_too_large = 16 startdate_in_the_past = 17 startdate_is_a_holiday = 18 startdate_out_of_fcal_range = 19 stdt_before_holiday_in_past = 20 unknown_fcal_error_occured = 21 no_workday_nr_given = 22 invalid_workday_countdir = 23 invalid_workday_nr = 24 notbefore_stdt_missing = 25 workday_starttime_missing = 26 no_eventid_given = 27 OTHERS = 28.

BP_RETRIEVE_PRIPARS CALL FUNCTION 'BP_RETRIEVE_PRIPARS' IMPORTING pripars = pri_params EXCEPTIONS no_runtime_info = 1 job_notex = 2 no_pripars = 3 OTHERS = 4.

GET_PRINT_PARAMETERS CALL FUNCTION 'GET_PRINT_PARAMETERS' EXPORTING mode = 'CURRENT' no_dialog = 'X' IMPORTING out_archive_parameters = arc_params out_parameters = pri_params valid = valid EXCEPTIONS archive_info_not_found = 1 invalid_print_params = 2 invalid_archive_params = 3 OTHERS = 4.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'CALENDARID' * dynpprog = sy-repid * dynpnr = sy-dynnr * dynprofield = scrnfield_carid value_org = 'S' TABLES value_tab = calendar_hlp_tbl field_tab = calfieldtbl return_tab = cal_return EXCEPTIONS parameter_error = 1 "#EC FB_RC no_values_found = 2 "#EC FB_RC OTHERS = 3. "#EC FB_RC

DYNP_VALUES_READ CALL FUNCTION 'DYNP_VALUES_READ' EXPORTING dyname = sy-repid dynumb = scrnnr1 TABLES dynpfields = dynpfields EXCEPTIONS invalid_abapworkarea = 1 invalid_dynprofield = 2 invalid_dynproname = 3 invalid_dynpronummer = 4 invalid_request = 5 no_fielddescription = 6 invalid_parameter = 7 undefind_error = 8 OTHERS = 99.

BTC_OPTION_GET CALL FUNCTION 'BTC_OPTION_GET' EXPORTING name = var_nodisplay * IMPVALUE1 = * IMPVALUE2 = * IMPORTING * COUNT = TABLES options = var_options EXCEPTIONS invalid_name = 1 OTHERS = 2 .

RS_SELSCREEN_EXISTS CALL FUNCTION 'RS_SELSCREEN_EXISTS' EXPORTING report = entered_progname IMPORTING answer = report_needs_variant EXCEPTIONS OTHERS = 99.

DDIF_FIELDINFO_GET CALL FUNCTION 'DDIF_FIELDINFO_GET' EXPORTING tabname = 'BTCVARHTBLT' TABLES dfies_tab = fieldtbl EXCEPTIONS not_found = 1 internal_error = 2 OTHERS = 3.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'VARIANT' dynpprog = my_repid dynpnr = scrnnr1 dynprofield = scrnfield_var value_org = 'S' TABLES value_tab = variant_hlp_tbl field_tab = fieldtbl EXCEPTIONS parameter_error = 1 "#EC FB_RC no_values_found = 2 "#EC FB_RC OTHERS = 3. "#EC FB_RC

F4IF_INT_TABLE_VALUE_REQUEST





CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'TARGET' dynpprog = my_repid dynpnr = scrnnr1 dynprofield = scrnfield_svr value_org = 'S' TABLES value_tab = btc_sys_srv_tbl EXCEPTIONS parameter_error = 1 "#EC FB_RC no_values_found = 2 "#EC FB_RC OTHERS = 3. "#EC FB_RC

TH_SERVER_LIST CALL FUNCTION 'TH_SERVER_LIST' EXPORTING services = batch TABLES list = sys_tabl EXCEPTIONS OTHERS = 99.



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