FM to initiate a work flow

FM to initiate a work flow
SWE_EVENT_CREATE
 

 

  DATA :L_F_OBJKEY  TYPE SWO_TYPEID.
  
CALL FUNCTION 'SWE_EVENT_CREATE'
    
EXPORTING
      OBJTYPE           
'Z_YT3R' “EVENT object type (swo1)
      OBJKEY            
L_F_OBJKEY “Object key can be matnr ,Project id etc
      
EVENT             P_G_F_EVENT "event
    
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.
  
ELSE.
 
  
ENDIF.





No comments:

Post a Comment

/*Newer Post*/ Older Post Home