Showing posts with label Controlling-Tasks. Show all posts
Showing posts with label Controlling-Tasks. Show all posts

Sunday, November 25, 2007

Controlling Whether Jobs Are Started in fico

Use

If you schedule a job in the daily overview but do not release it, it is not automatically started by the system when the start time is reached.
This function is particularly useful for scheduling a complete task listEinplanung kompletter Aufgabenpläne .

Features

You can release a job:

  • When inserting it into the task list
  • After scheduling the job in the daily overview

Activities

You are in the mode task list - scheduling.

  1. You select a job with the right mouse button.
  2. You choose Schedule.

  3. On the subsequent screen, you specify under Release task whether the job is executed automatically when the start time is reached.

Leaving content frame

Runtime Analysis for Jobs

Use

Runtime analysis shows you the average runtime of jobs or flow definitions.
It also estimates the runtime of the next job to be executed.

Activities

  1. Select a job with the right mouse button.
  2. Choose runtime analysis.

  3. The system shows you the following information:
  • The average runtime
  • The number of runs executed
  • The runtime of the last and next-to-last runs
  • The estimated runtime of the next run
  1. You can also enter your own estimation of the runtime.

Note

If any runtime information is available for tasks in the task list, it is displayed in the last three columns of the task list.

Leaving content frame

Relative Start Time in fico

Use

You can schedule complete task lists.

To do this, it is necessary to specify a relative start time for each task.

Features

The relative start time contains two time parameters:

  • The number of calendar days or workdays (called the offset), such as 2 calendar days or 1 workday.
  • The actual starting time, such as 12:15 pm.

Using these parameters, you can schedule and reschedule the individual tasks independently of the actual run date of the task list itself.

Example 1

You have created the task foreign currency valuation with the parameters offset in working days: 1 and start time: 12:15 pm. If the task list is scheduled to start on a Friday and a factory calendar is being used, the task will be started the following Monday at 12:15 pm (weekends are not working days). If a Gregorian calendar is being used (in this case all days are working days), the task would be started on Saturday at 12:15 pm. If the same task list were scheduled to start on a Monday, in both cases the task would be started on the following Tuesday at 12:15 pm.

If the task list contains several tasks with relative start times, the actual start times are always calculated on the basis of the scheduled date and the specified calendar.

Example 2

The task assessment has an offset of 1 calendar day, and the task settlement has an offset of 2 calendar days. The schedule date of the task list is March 11. The task assessment is started on March 12 (March 11 + 1 day), and the task settlement is started on March 13 (March 11 + 2 days).

Note

The offset for the start time is always based on the concrete schedule date. The system then calculates the concrete start date from this offset using the schedule date and the specified calendar.

Leaving content frame

Scheduling a Complete Task List in the Daily Overview

Use

You can schedule a complete task list. The advantage of doing so is that you can use the same task list each month for scheduling purposes simply by changing the start date and time.

Prerequisites

Before you can schedule the complete task list, you must specify a relative start timerelatives Startdatum for each task in the task list. This schedules the sequence of tasks independently of the concrete start date of the task list.

Scheduling a Complete Task List in the Daily Overview

  1. Select the highest node of the task list with the right mouse button.
  2. Choose Schedule.
  3. Specify when the task list should be run.
    You can choose between:
  • Starting on the current day
  • Starting on any other day

Scheduling the Complete Task List

Before actually scheduling the task list, you can run a simulation.RESET N1

  1. Select the highest node of the task list with the right mouse button.
  2. Choose Simulation of scheduling.
  3. Specify when the task list should be run.

  4. The system outputs a list showing the starting dates of the tasks in the task list.

Deleting the Scheduling of a Complete Task List

  1. Select the scheduled task list in the daily overview.
  2. Choose Delete.

  3. The system outputs a table showing the statuses of the tasks in the task list.

Note

You can decide when the jobs in the task list should be started. For more information, refer to Controlling Whether Jobs Are StartedJobs "freigeben".

Leaving content frame

Scheduling Tasks in the Daily Overview

Use

To enable the system to start tasks at certain times, you need to schedule the tasks from the task list in the daily overview.

Prerequisites

You have inserted tasks into a task list.

Procedure

  1. Choose Insert task.
  2. Use drag-and-drop to schedule a task from the task list in the daily overview, by dropping the task onto an appropriate time.

Caution

Transactions and programs can only be started directly by you. You cannot schedule these task types in the daily overview.

  1. To start a transaction or program from the task list, select this task.
  2. Use the right mouse button to choose Execute.

Result

The system executes the tasks at the times you specified.

Leaving content frame

Storing Task Documentation

Use

You can attach Microsoft Office documents to the tasks where they are required for processing. You can also store straightforward long texts to document a task.

Procedure

Creating Microsoft Office Documentation

  1. Choose Change task list.
  2. Use the right mouse button to select the task to be documented.
  3. Choose Office document.
    The required Microsoft Office document type appears. You can now enter your text.
  1. Save the document and return to the scheduler by choosing File ® Close ® Back to the Schedule Manager.

Creating a Long Text

  1. Choose Change task list.
  2. Use the right mouse button to select the task to be documented.
  3. Choose Long text.
    A window appears in which you can enter a note.
  1. Choose Continue.
    The system returns to the scheduler.

Note

You can only store one long text and one Microsoft Office document at the same time for a given task.

All users assigned to this task list have access to these documents.

Kompletten Aufgabenplan einplanenSending Long TextsRESET N1

  1. Use the right mouse button to select the task for which you have entered a note.
  2. Choose Send note.
  3. Enter the recipient and a recipient type.
    You can select the priority of the transmission and other attributes.

  4. You can view the note again and create attachments.

Result

You have stored a document for a task, which is now permanently available to you for reference.

Leaving content frame

Inserting Your Own Programs as Tasks

Prerequisites

To add your own programs to the task list and schedule them, you must store them in the system and make sure the Schedule Manager knows how to access them.

Procedure

  1. To do so, choose Extras
  2. ® Settings ® Customer Programs.
    This brings you to the table Registration of Customer Schedule Manager Programs.
  3. Choose New entries.
  4. Enter the ABAP program name or search for it using the input help.
  5. Use the input help to select an application.
    You can enter either a CUSTOMER application or a standard application. If you use a standard application, you must replace the constant value CUSTOMER_APPL in the coding for SCHEDMAN_INIT with your chosen value.

  6. Example
    constants: customer_appl like smmain-application value '********'.
  7. You can set the following indicators:

AVo (worklist)
Determines that the program

  • Receives the objects to be processed in the worklist of the Schedule Manager. This means that no scope of selection must be defined for the report itself. The scope of selection only has to be defined once in the flow definition.
  • Processes these objects within the worklist, and that a processing status is set for each processing step and object during processing.
  • Issues messages on the object within the worklist.

To ensure that these requirements are met, certain programming guidelines must be followed when the customer program is written.

Sel (Selection)

A program for which this indicator is set is a selection program for the worklist (or for a flow definition with worklist) for a customer application. Programming guidelines must be followed for such programs as well.

Rep (Reports)

This indicator is set for programs that generate reports that are based on worklists. Programming guidelines must be followed for such programs as well.

  1. Save your entries.

Caution

Essentially any program can be scheduled in Schedule Manager.

However, to enable information on the program to be output in the job monitor, the program must meet certain programming guidelines.

Additional programming guidelines must be met to enable the program to be scheduled with the workflow (flow definition).

For the program to use the worklist, the programming guidelines for the job monitor and the flow definition must be met. Further programming guidelines must also be noted.

For more information, see Inserting Your Own Programs as Tasks .

Leaving content frame

Inserting Your Own Programs as Tasks

Use

You can include your own transaction directly in the task plan without having to make changes to the transaction.

If you run your own program periodically, you can extend the program so that it can be used in flow definitions (Workflows) and you can see the processing status in the monitor.

For the program to use the worklist, the programming guidelines for the job monitor and the flow definition must be met. You must carry out further program extensions.

Procedure

Connecting Your Own Program to the Monitor

The program CUSTOMER_REPORT is available in the system as standard. This shows you how to call two function modules that enable the easiest connection to the monitor (without a workflow connection).

Incorporate the two Includes SCHEDMAN_INIT and SCHEDMAN_CLOSE in your program. The program is connected to the Job Monitor.

Utilizing Your Program for Flow Definition

If you also want to utilize your program in flow definitions, you must incorporate the Include RKASMAWF in the selection screen.

At the beginning of processing, install the following coding instead of the Include SCHEDMAN_INIT mentioned above:

data: gs_key like schedman_key.

data: ls_detail like schedman_detail_user.

data: ls_appl like schedman_customer.

data: ld_dummy(20) value 'ABCDEFGHIJKL'.

constants: customer_appl like smmain-application value 'CUSTOMER'

ls_detail-application = customer_appl.

ls_detail-repid = sy-repid.

* ls_detail-testflag = true. "Decide if testrun or not

ls_appl-customer_field = ld_dummy.

CALL FUNCTION 'KPEP_MONI_INIT_RECORD'

EXPORTING

LS_DETAIL = ls_detail

* LS_WITEM =

LS_APPL = ls_appl

* LD_WORKLIST_FLAG = ' '

IMPORTING

LS_KEY = gs_key.

* TABLES

* LT_SELKRIT =

* LT_PARAM =

In the structure SCHEDMAN_CUSTOMER, you can define your own fields, which you fill with values at runtime.

At the end of program processing, install the following coding instead of the Include SCHEDMAN_CLOSE:

data: ld_aplstat like smmain-aplstat.

data: LS_SCMA_EVENT LIKE SCMA_EVENT.

constants: c_status_ok value '0'.

constants: c_status_undefined value '2'.

constants: c_status_error value '4'.

constants: c_status_aborted value 'A'.

include schedman_events.

*.decide the status you want to send

ld_aplstat = c_status_ok.

* ld_aplstat = c_status_undefined.

* ld_aplstat = c_status_error.

* ld_aplstat = c_status_aborted.

*.If the report ended with error -> stop whole workflow. Otherwise

*.start the next job

if ld_aplstat = '4' or ld_aplstat = 'A'.

ls_scma_event-wf_event = cs_wf_events-error.

else.

ls_scma_event-wf_event = cs_wf_events-finished.

endif.

*.the variables wf_witem and wf_okey

*.are from include RKASMAWF and are filled AUTOMATICALLY

*.fill them into strcuture ls_scma_event

ls_scma_event-WF_WITEM = wf_witem.

ls_scma_event-WF_OKEY = wf_okey.

CALL FUNCTION 'KPEP_MONI_CLOSE_RECORD'

EXPORTING

LS_KEY = gs_key.

* LS_MESSAGE =

* LD_OBJECTS =

* LS_EXT =

* LS_RL =

LS_SCMA_EVENT = ls_scma_event

* TABLES

* LT_SPOOL =

CHANGING

LD_APLSTAT = ld_aplstat

EXCEPTIONS

NO_ID_GIVEN = 1

OTHERS = 2.

Note

For programs that you want to include in flow definitions, note the following:

  • If it is a cross-application program, you need to copy the program that was already stored with an application, and then store the new program in the SCMAPROG table with the new application.

Enter the name of your program as a customer program in Schedule Manager. For more information, see Inserting Your Own Programs as Tasks .

You can include your own program in a flow definition using these settings, and see the results in the monitor.

Leaving content frame