hi friends,
i tried to trigger the work flow from the Proxy program from BPM from SAP PI.
for that i created a code as follows, but while syntax check in the proxy (server proxy) implemtation (methode), i am getting the message as "Include <CNTN01>
Within classes and interfaces, you can only use "TYPE" to refer to ABAP
Dictionary types (not "LIKE" or "STRUCTURE")."
can any body tell me how can i resolve this problem.
the fallowing is the implemented mothode code:
method ZII_WF_MI~EXECUTE_ASYNCHRONOUS.
**** INSERT IMPLEMENTATION HERE **** ***
include <cntn01>.
SWC_CONTAINER it_swcont.
types: BEGIN OF T_STR ,
EMPID TYPE ZEMPID,
LSDATE TYPE ZLSDATE,
LEDATE TYPE ZLSDATE,
END OF T_STR.
Data: agent_p type Standard table of sWHACTOR .
Data: IT_STR type table of t_str,
wa_str like line of it_str.
wa_STR-EMPID = INPUT-WF_MT-EMPID.
wa_STR-LSDATE = INPUT-WF_MT-SDATE.
wa_STR-LEDATE = INPUT-WF_MT-EDATE.
APPEND wa_STR to it_str. CLEAR WA_STR.
SWC_SET_element it_swcont 'abs_form_leave' IT_STR.
CALL FUNCTION 'SWW_WI_START'
EXPORTING
CALLBACK_FB = ' '
CHECKED_WI = SWFCO_NO_ID
CONFIRM = ' '
CREATOR = 'anilb'
DESIRED_END_ACTION = SWFCO_WI_DEF_DH_ACT
DESIRED_END_DATE = SWFCO_NO_DATE
DESIRED_END_TIME = SWFCO_NO_TIME
DESIRED_START_DATE = SWFCO_NO_DATE
DESIRED_START_TIME = SWFCO_NO_TIME
LANGUAGE = SY-LANGU
LATEST_END_ACTION = SWFCO_WI_DEF_DH_ACT
LATEST_END_DATE = SWFCO_NO_DATE
LATEST_END_ESCALATION = SWFCO_NO_ESC
LATEST_END_TIME = SWFCO_NO_TIME
LATEST_START_ACTION = SWFCO_WI_DEF_DH_ACT
LATEST_START_DATE = SWFCO_NO_DATE
LATEST_START_TIME = SWFCO_NO_TIME
MAX_EVENT_COUNT = SWFCO_DEF_MAX_EVT_CNT
PRIORITY = SWFCO_NO_PRIO
TASK = 'WS99900263'
WORKITEM_TYPE = ' '
DO_COMMIT = 'X'
DO_SYNC_CALLBACK = ' '
TEXT = ' '
DO_SYNC_WI_CHAIN = ' '
CREATED_BY_USER = SY-UNAME
CREATED_BY_ADDRESS = ' '
CALLED_IN_BACKGROUND = ' '
STEP_MODELED_WI_DISPLAY = ' '
NO_DEADLINE_PARAMETERS = ' '
RESTRICTED_LOG = ' '
SECONDS_UNTIL_TIMEOUT =
CREATE_EVENT = ' '
STATUS_EVENT = ' '
XML_PROTOCOL =
WLC_FLAGS =
START_PROPERTIES =
DEBUG_FLAG = ' '
TRACE_FLAG = ' '
WI_CONTAINER_HANDLE =
START_ASYNCHRONOUS = ' '
IMPORTING
WI_ID =
WI_HEADER =
RETURN =
WI_RESULT =
SWF_RETURN =
NEW_STATUS =
TABLES
AGENTS = agent_p
DEADLINE_AGENTS =
DESIRED_END_AGENTS =
LATEST_START_AGENTS =
EXCLUDED_AGENTS =
NOTIFICATION_AGENTS =
SECONDARY_METHODS =
WI_CONTAINER = it_swcont
COMP_EVENTS =
EXCEPTIONS
ID_NOT_CREATED = 1
READ_FAILED = 2
IMMEDIATE_START_NOT_POSSIBLE = 3
EXECUTION_FAILED = 4
INVALID_STATUS = 5
OTHERS = 6
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
thanks,
kumar
Request clarification before answering.
Hey Kumar,
I suggest you use the function module SAP_WAPI_CREATE_EVENT wherein you just need to put in the event of the workflow which is there as the starting condition of the workflow.
Let me know if you still face issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.