cancel
Showing results for 
Search instead for 
Did you mean: 

Workflows

Former Member
0 Kudos
66

Hi everybody

Can anybody help me with creation of a simple work flow...and creation of business objects required for workflow...I am very much new to this so i need simple step by step help on workflows

\[removed by moderator\]

Edited by: Jan Stallkamp on Sep 3, 2008 3:51 PM

View Entire Topic
Former Member
0 Kudos

HI goswami,

Pls refer the below link

u can get complete info..

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/88c71c47-0a01-0010-5dad-ee3df613...

http://saptechnical.com/Tutorials/Workflow/Workflow.htm

You can use the following function modules to trigger the workflow templates, in background.

SWE_EVENT_CREATE can be used to trigger an event statically, (If triggering events are defined for your workflow template. Also check whether the event linkage is active or not)

SAP_WAPI_START_WORKFLOW can be used to trigger the workflow template directly.

This is the sample code, used in one of my objects, for calling the function module SWE_EVENT_CREATE.

REPORT ZTESTING1 .

tables :

ZOPM_OBJKEY.

data :

  • object key

objectkey type SYSUUID_C,

objkey like sww_contob-objkey.

  • defining the event container..........................................

data begin of event_container occurs 0.

include structure swcont.

data end of event_container.

  • workitem list

data :

t_wid like SWOTOBJID occurs 0 with header line.

clear event_container.

refresh event_container.

CALL FUNCTION 'SYSTEM_GET_UNIQUE_ID'

EXPORTING

DCE_COMPATIBLE = 1

IMPORTING

UNIQUE_ID = objectkey.

objkey = objectkey.

clear objectkey.

call function 'SWC_ELEMENT_SET'

exporting

element = 'CONTEXT'

field = 'UAD'

tables

container = event_container

exceptions others = 1.

call function 'SWC_ELEMENT_SET'

exporting

element = 'SUBJECT'

field = '3333'

tables

container = EVENT_CONTAINER

exceptions others = 1.

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'ZPSKUMAR'

objkey = objkey

event = 'GENERIC'

  • CREATOR = ' '

  • TAKE_WORKITEM_REQUESTER = ' '

  • START_WITH_DELAY = ' '

  • START_RECFB_SYNCHRON = ' '

  • NO_COMMIT_FOR_QUEUE = ' '

  • DEBUG_FLAG = ' '

  • NO_LOGGING = ' '

  • IDENT =

  • IMPORTING

  • EVENT_ID =

TABLES

EVENT_CONTAINER = EVENT_CONTAINER

EXCEPTIONS

OBJTYPE_NOT_FOUND = 1

OTHERS = 2

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF

[removed by moderator]

thanks

sagar

Edited by: Jan Stallkamp on Sep 3, 2008 3:51 PM