Create
key fields with
ABAP dictionary field proposal.
It is the identifying key, via
which the system can access a specific object, that is, an instance of the
object type. The key fields of an object type are usually also the key fields
in the table containing the header data for the object type. Only
character-based data types are allowed as key fields. The total length allowed
for all key fields is 70 characters. Each key field refers to a field in the
ABAP Dictionary.
Enter ‘BKPF’ in table name field and select all the key
fields. Press Continue button. Next set the status of these key fields to Implemented.
Edit ->Change Release Status-> Object Type Component ->Implemented
The whole business object needs to be implemented so
click on the business object title and…
Edit-> Change Release Status-> Object Type ->Implemented
Now you can check the syntax, generate the Business
Object and then test it. Execute the custom method you created and give the
Company code, Document number and Year.
Now we need to create a workflow task, this will be
triggered by the event and will call the desired method in your business object
subtype/Object type.
Tasks to user means generic
actions, which are in the responsibility of a person (agent) or group of
persons (agents), that, may have to be done in a predefined interval.
Runtime execution of a single
step task produces a work item in the selected agents integrated inbox.
Transaction SWLD
Definition
Tools ->Tasks/Task Group -> Create
This task will be of type TS (Standard Task)
Tasks are of two types.
Standard and Customer tasks.
Standard tasks (object Type TS)
are supplied by SAP and can also be created by the customer, they are client
independent.
Customer tasks (object Type TS)
are client dependent and created by the customer.
(SAP’s
recommendation is that all new tasks should be of type TS) after this is entered click
the create icon (Don’t give the Task number, it will be created automatically).
This will bring up the main task window. Under the Basic Data tab enter the Abbreviated Name (this name should be
unique for tasks), Name and Work Item Text. Enter your business object
subtype/ object type name as the Object
Type and enter the Method you
created within the subtype / object type. If you tick Background Processing as the execution mode, the work item is
executed without need for manual intervention.
Next move to the Triggering Events tab. Insert a new entry in the table here -
referencing the business object subtype/ object type and the relevant event.
When this event occurs, the
system starts this task. Another event is Terminating Event: When this event
occurs, the system terminates the work item for this single-step task.
(If the single-step task has the property
Confirm end of processing, the work item is not terminated when the event
occurs. The work item must still be set to ‘Done’ by one of its recipients.)
Use:
Single-step tasks that refer to
an asynchronous method must have at least one terminating event.
Single-step tasks that refer to
a synchronous method can have terminating events.
No comments:
Post a Comment