Tutorial Sap Workflow

Páginas: 28 (6897 palabras) Publicado: 14 de agosto de 2012
Summary This article explains how to create a simple workflow using Object Definition and Implementation, Standard Tasks (Pftc), Event Definition And Implementation, Rule Definition and Implementation, Triggering an Event Explicitly by programming, process a work item in exceptional cases and starting a workflow via the work item manager API . By: John Varughese Company and Title: ApplexusTechnologies, SAP HR Manager Date: 15 Mar 2005 Object Definition and Implementation When implementing a workflow you will often notice that the object types supplied by SAP do not meet your requirements fully. In these cases, you must extend an existing object type by creating a customer specific subtype for it. In Transaction SWO1 , create a subtype „ZMARAJESUB‟ for object type BUS1001.

Create asubtype „ZMARAJES‟of your material object type by entering your parent object „ZMARAJESUB‟.

Extend your new object type so that it meets additional requirements.

For the workflow development , you require events as triggering or terminating events of your tasks. Create two new events BasicMaterialChanged and OldMaterialChanged for your object type.

Implement the two events using eventcreation from change documents.The Change document required is MATERIAL. Restrict the triggering of the event for BasicMaterialChanged to the mara-wrkst field and for OldMaterialChanged to mara-bismt. For the Old MaterialChanged, add a field restriction so that the event is only triggered when mara-bismt changes from anything to NEW. Type transaction SWEC for the change document event creation. Define another DeadlineTest event for you object type with a LatestEndDate parameter Referring to the syst-datum field. This parameter will be used to transfer an end deadline for a step within a workflow.

Create a new ChangedBy attribute based on the mara-aenam field. This attribute specifies the user who last changed the underlying material. You will use this attribute later to filter out yourmaterial.

Create a new Change method on the basis of transaction MM02. This transaction writes your changes to the database using an update task. deselect the synchronous flag in General tab.

Now select the method and then choose the program icon to generate the code. BEGIN_METHOD CHANGE CHANGING CONTAINER. DATA: MATERIALVIEW TYPE T132T-STATM. SWC_GET_ELEMENT CONTAINER 'MaterialView'MATERIALVIEW. IF MATERIALVIEW IS INITIAL. MATERIALVIEW = 'K'. ENDIF. SET PARAMETER ID 'MAT' FIELD OBJECT-KEY-MATERIAL. SET PARAMETER ID 'MXX' FIELD MATERIALVIEW. CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN. END_METHOD. Create a new DisplayView method. The purpose ot this method is to display a material from a particular view. The Desired view is to be transferred using the MaterialView inputparameter. Select the flag dialog and synchronous in General tab.

Select the program icon to generate the code.You need to add code to set the view to K that is „Basis Data 1‟as a default(This default the view to the basis view if no view is received). You can diplay the actual view using transacation MM03. transaction MM03 recognizes a SET/GET parameter MXX Which you can use to control the viewwhere the transaction is started. Supply this SET/GET parameter with your input parameter value. BEGIN_METHOD DISPLAYVIEW CHANGING CONTAINER. DATA: MATERIALVIEW TYPE T132T-STATM. SWC_GET_ELEMENT CONTAINER 'MaterialView' MATERIALVIEW. IF MATERIALVIEW IS INITIAL. MATERIALVIEW = 'K'. ENDIF. SET PARAMETER ID 'MAT' FIELD OBJECT-KEY-MATERIAL. SET PARAMETER ID 'MXX' FIELD MATERIALVIEW. CALL TRANSACTION'MM03' AND SKIP FIRST SCREEN. SWC_set_ELEMENT CONTAINER 'MaterialView' MATERIALVIEW. END_METHOD. A Material master can be assigned to several different plants.Create a plant virtual attribute that refers to your object type zplantje. ZPLANTJE object type is following.

***** Implementation of object type ZPLANTJE ** INCLUDE . BEGIN_DATA OBJECT. " Do not change.. DATA is generated * only private...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Sap Tutoriales
  • Workflow SAP
  • Workflow SAP
  • Tutorial Sap
  • Tutorial Sap
  • Sap business workflow
  • Sap business workflow
  • Breve tutorial de introducción a sap

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS