How to debug Workflow background steps
o 1782731 - Instructions for debugging background steps
Generally use “SAP_WAPI_*” FMs for programming purpose
Start workflow programmatically
FM SAP_WAPI_START_WORKFLOW can be used to start the workflows in general. But when you
need to start event based workflows use FM SWW_WI_START_SIMPLE.
Reason for use SWW_WI_START_SIMPLE Its not possible to initialize container elements
referring to BO or of type SWC_OBJECT
To create object
Include <CNTN01>
<objRef> of type SWC_OBJECT
<BusinessObject> like BUS2032 for SalesOrder
<BOKey> Business object key like Sales Order Number
SWC_CREATE_OBJECT <objRef> <BusinessObject> <BOKey>
Set Element container Element
<Container> of type TABLE OF SWCONT
swc_set_element <Container> <ElementName> <ElementValue>.
Eg.
swc_set_element wi_container 'ZMARA' object.
Get Container Element container Element
swc_set_element wi_container 'ZMARA' object.
Instantiate Container / Call Method of BO
< ContainerName> of type TABLE OF SWCONT
SWC_CONTAINER <ContainerName>