Geometric Dimensioning and Tolerancing (GD&T) Training Kit World Class Manufacturing Solutions (WCMS) GD&T, Version:1, Nov 2003 Day â€“ 1 Agenda Introduction to GD&T Concept of Function a…Descripción completa
HCNA-Transmission Training Material for Huawei CertificateDescripción completa
AS400 Administration Training MaterialFull description
Training Material Distillation
Olympiad training material linguisticsFull description
Course Content Introduction Workflow architecture Workflow Definition and workflow Template Workflow steps in details Task Business Objects and Methods Container Structure and Container Programming Events Organisational structure and role resolution Different types of Agent Workflow and ALE |
SAP Business Workflow SAP Business Workflow® is a cross-application tool that makes it possible to integrate business tasks/processes between applications. This tool was introduced in R/3 Release 3.0A, and received a substantial facelift in the Enjoy Release, 4.6A,which warranted the new name Workflow Builder.
Why SAP Workflow Workflow ensures that the right work is sent to the right person at the right time in the right sequence with the right information. Tool for the automization of business processes Not tied up to any paricular application Operates uniformly accross applications Coordinate all participating tasks Provide users with active support Intelligent routing
Workflow Builder The workflow definition is created in the Workflow Builder and displayed graphically in a network. Transaction: SWDD Menu Path: Tools Business Workflow Development Definition tools Workflow Builder.
Workflow definition steps Workflow definition is made up of individual steps. When creating a step in a workflow definition, the step type must be specified first. There are - Steps which refer to business activities (activities & user decision) -
Steps which are used for internal process control and monitoring (condition, multiple condition, loop, etc)
Business Activities Steps Activity - Can be a single step task with basic business functionality - Can be a multi-step task, which reference to a workflow definition User Decision - This provides an opportunity for user interaction with the system. - The response to this decides the selection of the subsequent step. Document from template - PA document is created from a document template using variables in the text that are filled during program execution. Web Activity - Selected container elements are posted using http protocol in XML or SOAP message
An activity which refers to a workflow rather than a task |
Internal process control Steps Condition - Branch on the basis of control information from the runtime dependent context of the workflow. - An attribute of this object can also be accessed for condition evaluation - Condition evaluation can be done by Field comparison e.g constants , object attribute, system fields Multiple condition - In contrast to condition, multiple condition makes it possible for the workflow definition to branch in more than two branches. -
For evaluation of the multiple condition, the value of the basis of comparison is checked at runtime against the comparison values and branched accordingly.
Internal process control (contd.) WHILE Loop - Steps are processed repeatedly until the conditions contained in the WHILE step no longer apply. Until Loop - Steps are processed repeatedly until the condition contained in the UNTIL step is true. Fork - Used for parallel processing branches. - Only a part of the parallel processing branches actually has to run to continue the workflow. - Dynamic parallel processing is also possible
Internal process control (contd.) Send mail - Text entered in this step can be used to send a mail to the agent assigned Container operations - Used to perform arithmetic operation of value assignment to workflow container elements using constants and data in the workflow container .
Internal process control (contd.) Event Creator - An event is created when this step in the workflow is reached. - Other workflows can be started as a reaction to the event created in this step. This event must be the triggering event of the relevant workflow tasks and/or templates. WAIT for event - Used to stop the whole execution of the workflow until the event is created in the system. - Used to wait for events for parallel processing
Important Task Attributes General -Workitems can be executed and forwarded to any SAP User General Forwarding Allowed -Workitems can be forwarded to any user General Forwarding Not Allowed -Work items can be forwarded to possible users Forwarding not allowed -No forwarding allowed
Work Item ƒ Executable single-step tasks are represented by work items at runtime. ƒ Object that represents a task or action in the workflow system at runtime. ƒ Depending on the work item type, some of these work items are displayed in a user's work list. Other work items, on the other hand, are only used and processed internally. ƒ The work items are displayed in the integrated inboxes of their selected agents, and can be reserved and executed from there.
Workitem Types W: Dialog work item Runtime display for a single step task with a user dialog D: Missed deadline work item The message recipient for the missed deadline is informed. F: Workflow work item Runtime representation of a multi step task B: Background work item Runtime display for a task executed in the background. E: Wait step work item: Runtime display for a wait step in the workflow definition.
Object Types & Workflow ƒ SAP Business Workflow has been developed on an objectoriented basis. ƒ The business object types are identified and described with their object methods in the Business Object Repository(BOR) of the R/3 System. ƒ Generally one object is created in the system and then processed in a workflow over several steps by various employees.
Object Types & Objects Workflow deals with object types. Object types are definitions of data. In order to access database data, workflow uses the object type interface. Most of the information represented by object types is available in the ABAP/4 Dictionary.
Objects are created at runtime and are specific instances of defined object types. Many object types are delivered by SAP. In addition, the customer can create new object types or extend SAP objects by creating subtypes (child objects). New customer objects or subtypes may be desired if the delivered SAP object does not contain all the characteristics (attributes) or processing options (methods) desired.
Interfaces are a combination of attributes, methods, and events to be used in common among multiple object types. The purpose of interfaces is to define common functionality in one object type, and to assign that common functionality via an interface to multiple object types across the Business Object Repository. This avoids redundancy of data and functionality definition.
Each new object type automatically receives the interface IFSAP, the SAP standard interface. IFSAP provides every object type with the following: - Method Display - Method ExistenceCheck - Attribute ObjectType
Key Fields Key fields are designed to uniquely identify the object type.
If the key field has a data type reference of a dictionary table field, the runtime system will look to that table field to retrieve the value of the key when processing the object. When the key field is created, the ABAP/4 program code is generated automatically when the object type is generated.
Methods - Call attributes –Dialog / or background : Execution of the method is via a work item in a user’s integrated inbox or in background by the workflow runtime system. Background methods cannot use messages or exceptions because they cannot be processed by the background system and will result in termination of the program. –Synchronous / Asynchronous •Synchronous
methods finish executing before handing control back to the calling program. These types of methods can return export parameters, results and exceptions. Asynchronous methods do not return control to the calling program immediately. Once executed, they depend upon events to communicate the results of the method back to the calling program. Asynchronous object methods cannot have results, export parameters or exceptions. |
Result: Synchronous methods may return an export parameter as a result. A result can be defined like a dictionary field or an object type .
Instance independence: Indicates whether an object reference is passed to the method by binding at the time of execution. Methods that generate and return an object reference, such as Create, or methods that generate a report listing should be instance independent.
Import /Export Parameters •The method parameter container contains references to all import, export and result parameters which need to be exchanged back and forth between the calling program (single-step task) and the method. Binding is necessary between the single-step task and the method parameter container to accomplish the data transfer. •Import parameters are those values which are necessary to execute the method. Import parameters are retrieved from the container CONTAINER using the macro instructions SWC_GET_ELEMENT (single-line) or SWC_GET_TABLE (multiline). •Export parameter values are passed to the container CONTAINER using the macro instructions SWC_SET_ELEMENT (single-line) or SWC_SET_TABLE (multiline). The result parameter is passed to the CONTAINER element RESULT via the same macro instructions.
Exceptions •Error handling is accomplished through the use of method exceptions (synchronous methods only). •The workflow definition can branch according to these possible error states and allow for subsequent steps to handle these conditions. Messages and exceptions cannot be used with background methods because they will terminate the program. •Number of the exception: •0001-1000: exceptions defined for interfaces •1001-7999: application-specific exceptions (free for SAP development) •8000-8999: exceptions raised by the object manager •9000-9999: exceptions defined by the customer (free for customers)
Exceptions •Exceptions are implemented within a method, between the macro instructions BEGIN_METHOD and END_METHOD. –EXIT_RETURN Code Variable1 Variable2 Variable3 Variable4. •Code = the 4-digit number of the exception •Variable1 through Variable4 correspond to up to 4 variables which can be derived from the message issued with the exception. •The following exceptions (for temporary errors) are also available to allow exiting of the program: –EXIT_OBJECT_NOT_FOUND = object not found –EXIT_CANCELLED = cancelled by the user
Subtype The subtype inherits all attributes, methods and events of the supertype and is open for new customer-specific attributes, methods and events. The key fields of the supertype and subtype must be identical. This means that any methods and attributes defined on the parent can be executed and accessed on the child object.
Workflow Container ƒ The workflow container contains workflow-specific system variables and other elements which are defined explicitly. ƒ As part of the definition of the workflow task, the import and export parameters of the workflow are defined as elements of the workflow container. ƒ When the workflow is defined in the workflow editor, elements can also be added to the workflow container. These elements are then "local variables" within a workflow definition and can be used, for example, to set up a counting loop. |
Task Container ƒ Each task container already contains the workflow system variable and any additional elements for the method parameters of the referenced object method. ƒ You have to add additional elements to the task container for additional values are required for variable replacement in the work item text or in the long texts
Other Types of Containers Event parameter container Contains an element which can take the (object) reference to the object whose change of status is announced via the event. Role parameter container Contains the elements required as input in connection with the role resolution to be run at runtime. Method parameter container Contains elements which will be required as import and export parameters in connection with the method execution.
Binding ƒ A binding is simply the art of of pouring selected container elements from one container into another. ƒ The binding editor is available when defining: Workflow definitions Triggering events Workflow steps Workflow steps ( Standard roles/ Object methods with parameters) ƒ The binding editor always references the container to receive the application data. Binding definitions can reference: Constants Variables (container elements) System fields
Reading Container Elements Defined as Object Types Declare a variable as an object: DATA: MATERIAL TYPE SWC_OBJECT.
Container Instance: CONTAINER
Read value of container element to your object: SWC_GET_ELEMENT CONTAINER ‘MATRL’ MATERIAL. Declare a variable as the key of your object: DATA: MATNR LIKE MARA-MATNR.
Object Element: MATRL
Read the object type key into your variable: SWC_GET_OBJECT_KEY MATERIAL MATNR. Declare a variable to hold the object type: DATA: OBJTYPE LIKE SWOTOBJID-OBJTYPE. Obtain the object type from your object type variable: SWC_GET_OBJECT_TYPE MATERIAL OBJTYPE. |
Writing to Container Elements Defined as Multiline Object Types Declare a variable as an internal table object: DATA: REQITEMS TYPE SWC_OBJECT OCCURS 0.
Container Instance: CONTAINER
Since this internal table has no header, declare a work area: DATA: REQITEM TYPE SWC_OBJECT. Declare key fields of the object (e.g. called PREQKEY) and fill them (e.g. within a select loop).
Create an instance of your object for each table line: SWC_CREATE_OBJECT REQITEM ‘BUS2009’ PREQKEY. Append the object instance to the internal table: APPEND REQITEM TO REQITEMS. Once the internal table is filled, transfer the internal table to the multiline container element: SWC_SET_TABLE CONTAINER ‘PRItems’ REQITEMS. |
Reading Container Elements Defined as Multiline Object Types Read value of multiline container element into your internal table object: SWC_GET_TABLE CONTAINER ‘PRItems’ REQITEMS. Declare your object: DATA: REQITEM TYPE SWC_OBJECT. Declare a variable to hold the object type: DATA: OBJTYPE LIKE SWOTOBJID-OBJTYPE.
Container Instance: CONTAINER
Object Element: PRItems
Loop through your internal table object REQITEMS into individual REQITEM entries. Perform operations as needed. Use this macro to get the keys of each entry: SWC_GET_OBJECT_KEY REQITEMS PREQKEY Use this macro to get the object type of each entry: SWC_GET_OBJECT_TYPE REQITEMS OBJTYPE. |
Event Creation of Message Control Triggering an event using message control occurs with NAST. Create Message type and define workflow as transmission medium Create Condition Table Create Access Sequence Assign Access Sequence to defined message type
Maintain the processing program RSWEMC01 with the FORM routine CREATE_EVENT for the output type EVEN and transmission medium 9.
Define Condition Records Assign message type To procedure |
Using ABAP Code This is using done by writing custom code e.g. by using SAP FM like SWE_EVENT_CREATE inside user exits, BADI etc. CALL FUNCTION 'SWE_EVENT_CREATE' EXPORTING OBJTYPE = OBJTYPE OBJKEY = OBJKEY EVENT = EVENT CREATOR = APPLICANT START_WITH_DELAY = ' ' IMPORTING EVENT_ID = EVENTID TABLES EVENT_CONTAINER = CONTAINER EXCEPTIONS OBJTYPE_NOT_FOUND = 01. IF SY-SUBRC = 0. COMMIT WORK. ENDIF. |
Organizational Structure Business Scenario ƒ An organizational plan in SAP describes the organizational structure of a company. ƒ The workflow system finds the agents of the individual tasks by evaluating the organizational plan ƒ The functions to create and maintain organizational plans are part of the Personnel Planning and Development (PD) part of the SAP HR module ƒ You must connect this organizational structure to the workflow
Organizational Management ƒ Organizational units contain positions, occupied by employees. ƒ Jobs are abstract descriptions of task assignments. ƒ Positions can be linked to jobs. They inherit all the tasks assigned to that job. ƒ Users. A user is an SAP logon user ID. It thus represents a single person. ƒ Persons. A person is a specific employee created in the HR module. ƒ Workflow tasks can be assigned to organizational units, positions, jobs or users. ƒ The workflow system uses organizational structure to route work items to the correct recipients |
Create Organisational Plan Transaction: Menu Path: PPOCW Tools Business Workflow - Development - Environment - Organizational Management Simple Maintenance – Org plan basic data - Create Create root organizational unit
Standard Rules A rule container is defined for each rule. The rule parameters determine which information is required for the rule resolution to be executed at runtime. If an error occurs during rule resolution, setting the termination indicator for the rule resolution determines how the workflow will continue: Flag is selected - the workflow assumes an Error status and a notification is sent to the workflow administrator. Indicator is not activated - the workflow forwards this work item to ALL possible agents.
Rule Definition in a Activity Step Type Various options to create standard rules : 3. Responsibility (Pure configuration no ABAP coding) Defined Value ranges are assigned to Agents Data is filled from workflow container at runtime
Evalution paths (Pure configuration no ABAP coding)
Organizational data (Pure configuration no ABAP coding) Jobs , positions
6. Functions to be executed – ABAP Code – Function Module
Evaluation path as Rule contd. Here are the basic steps: 2. 3. 4. 5. 6.
Determine the evaluation path that needs to be used Create a rule setting the type ‘Function to be executed’. Enter function module RH_GET_STRUCTURE Enter the evaluation path determined in step 1 above Following rule container needs to be created
Role Resolution with Function Modules Role resolution with function module should be done only for complex criteria Here are the basic steps: 4. A function module with the following interface is created
1. 2. 3.
Data Type Ref
Incoming rule container
Outgoing list of agents in agent format
Exception indication no agents found
Create a rule setting the type ‘Function to be executed’. Enter the created function module name Create container elements.
Execution of a Role Resolution via Organizational Objects Via organizational objects: Role resolution utilizing organizational data analyses the assignment of an organizational object (plant, laboratory, MRP controller, planner group, shipping point, sales office) to a position or organizational unit. Plant
Error in inbound function module ALE triggers error event input Error Occurred
Workitem appears in user's Inbox Execute Workitem Display IDoc for user processing (IDoc method "InputForeground") Fix error and reprocess IDoc or Flag IDoc for deletion ALE triggers end event input Finished
ALE error handling- Example The example below of an inbound error for a material master message shows the steps in ALE error handling: 3.
The inbound function module passes message to the ALE layer that an error has occurred.
ALE triggers the object event "inputErrorOccurred" from the IDCOMATMAS category.
This event is linked to standard task number 00007947, "MATMAS_inbound error“
A work item appears in the user’s inbox, the work item’s short text is the first fifty characters of the error message contained in the IDoc’s status record.
When the user processes the work item, the IDOCMATMAS method "IDOC.InputForeground" is processed.
IDoc status record is displayed and the user can display the error message's long text. If the user was able to remedy the error, the IDoc can be submitted for updating. If the error cannot be remedied, the user can flag the IDoc for deletion.
If the IDoc was either successfully submitted or flagged for deletion, IDOCMATMAS’s event "inputFinished" is triggered indicating that the task has been carried out. |
Active Monitoring Active monitoring allows to specify threshold values for the state of the system For e.g threshold can be on the number of IDocs in error or the time limit Report Program RSEIDOCA can be executed periodically Selection screen takes as input the threshold values and persons to be notified When defined threshold is exceeded Single Step Task TS30200088 is executed
The standard system can be configured to start a WF for an incoming IDoc. Useful when review is essential before posting Custom. SAP does not deliver standard. The settings are: --Create the custom task or WF --Create a new process Code ( WE42) and attach this custom WF/Task. --In the Partner Profile, attach the new Process code
Notification of Successful Posting The ALE/EDI interface can raise events on successful posting of an IDOC. The settings are: --Identify the Appl.Obj created by the Idoc. Txn: WE57 --Identify the event that needs to be raised. --Go to BD67, select Process code and populate Object type and Event. --Identify/Create tasks/WF and enable event linkage.