![](/cvo_files/imgs_sap_abap/logos/logo_cvo_academy_it.png)
✒️ABAP La creación de Tareas y Containers
ABAP La creación de Tareas y Containers
![ABAP La creación de Tareas y Containers ABAP La creación de Tareas y Containers](https://www.cvosoft.com/cvo_files/imgs_sap_abap/og-images/131.jpg)
Task Creation and Containers
Definition of Tasks
Tasks are the central element in the Workflow system and are used to describe a business process.
Tasks identify an action that needs to be executed. They always refer to a method of an object type.
Tasks are created through transaction PFTC.
There are two types of tasks:
- Single-step tasks: Examples of single-step tasks are issuing an invoice or releasing a purchase order request. For each single-step task, we need to ensure three things:
- What work needs to be done?
- Who will perform the work?
- What notifications need to be made?
- Workflow Template (multi-step): Workflow templates are mainly used to modularize a larger workflow, making maintenance easier.
The steps to create a task are:
- Assign a name and description to the task.
- Associate a method of a business object with the task.
- Associate the possible agents of the task. One or more elements of the organizational structure can be associated. It can be defined as a general task (everyone can execute it).
- Define the task text for communications. The text can be created in multiple languages. Variables contained in the task container can be used.
- Mark the attribute of "confirm end of processing" for dialog tasks, allowing the user to add information to the task once the work is completed.
Task creation example:
Select the standard task type and press continue.
In the Basic Data tab, in the Abbreviation field, a name should be entered, and in the Description and Work item fields, a brief description should be provided.
In the Object Type field, enter the name of the object type, and in the Method field, enter the method to be executed first. In the execution window, choose how you want it to be executed.
In the Description tab, clicking on the edit icon allows a brief description of the workflow to be entered.
In the Triggering Events tab, enter the event that will be executed using the methods placed in the Basic Data tab.
Finally, save, and the system automatically assigns the task number. Also, if desired, the task can be called by its abbreviation.
Dialog Tasks
In dialog tasks, the task text will serve to inform users of the activities. The task must be associated with a method marked as "dialog". It must have possible agents assigned to it. It must be marked as a general task (all users are possible agents).
The task attributes are:
- Dialog method
- Synchronous method
- Background processing execution
- Confirm end of processing
The task can be defined to work with Forms, internet, and SAPPhone.
For example, a task that will start when a customer calls a call center and the telephone system requests the number from the customer will initiate a conversation workflow.
Finishing Events
Tasks based on synchronous methods can be defined with a terminating event (or more than one).
Tasks based on asynchronous methods must have at least one terminating event.
The events are taken from the business objects defined in the system (usually the same business objects that provide the task method).
To define a terminating event, the following must be indicated:
- The business object containing the event
- The event
- The element of the task container containing the reference to the business object to be used. The object can only be known at runtime.
Task Groups
They are defined to logically link connected tasks. It is possible, for example:
- To place together in the same task group, Workflow templates that only communicate with each other through events, to achieve a better overall view.
- To gather tasks (workflow templates and standard tasks) that belong to a work area, to increase reusability.
Task groups are also useful in defining the search range of the Business Workflow Explorer Bex. The business workflow explorer can then visualize the tasks of those task groups.
Only task types WS and TS (workflow templates or models and standard tasks) can be assigned to task groups.
A task group can be assigned to another task group, generating inheritance. The child tasks will inherit the responsible assignments of the parent tasks.
Containers
They are groups of variables used as interfaces to carry data back and forth within the workflow.
An element of the container has a table data structure used by the components defined in the workflow. It can also be defined with a Business Object structure.
There are the following containers:
- Event Container: contains an element that can obtain a reference to the object(s) to be processed in the workflow. It always contains an element that can obtain the "initiator" username of the current workflow. It is defined when creating the event in the Business Object using the Business Object Builder transaction SWO1.
- Workflow Container: can take the initiator of the workflow from the event container. The workflow container is defined when creating the workflow using the Workflow Builder transaction SWDD.
- Task Container: always contains an element that can obtain the reference to the object to be processed in the respective single-step task. It can also contain an element that can obtain the result of a method of an underlying object. The task container is defined when creating or modifying the task with transaction PFTC_CHG.
- Role Container: the role container is defined when creating or modifying the role with transaction PFAC_CHG.
 
 
 
Sobre el autor
Publicación académica de Jaime Eduardo Gomez Arango, en su ámbito de estudios para la Carrera Consultor ABAP.
Jaime Eduardo Gomez Arango
Profesión: Ingeniero de Sistemas y Computación - España - Legajo: SW34C
✒️Autor de: 149 Publicaciones Académicas
🎓Egresado de los módulos:
- Carrera Consultor en SAP Fiori
- Carrera Consultor ABAP Nivel Avanzado
- Carrera Consultor ABAP Nivel Inicial
Disponibilidad Laboral: FullTime
Presentación:
Ingeniero de sistemas y computación con 8 años de experiencia el desarrollo frontend & backend (react/node) y en cloud (aws), actualmente desarrollando habilidades en sap btp, ui5, abap y fiori.
Certificación Académica de Jaime Gomez