Hi all,
I have called the workflow through program and in the workflow there is one oblligatory element AbsenceForm and i am passing the value through the program by WI_CONTAINER. My problem the value is not passing correctly and the following error is comming when i execute the program .
Import container contains errors (are any obligatory elements missing?)
Please see the following code
INCLUDE <CNTN01>.
TABLES:
ZCL_LEAVE_WFLOW.
* define table type for data exchange
TYPES:
BEGIN OF MYTABLE_LINE,
LINE TYPE SWC_VALUE,
END OF MYTABLE_LINE.
DATA:
FS_MYLINE TYPE MYTABLE_LINE,
FS_AGENTS TYPE SWHACTOR,
FS_SWCONT TYPE SWCONT.
DATA:
OK_CODE LIKE SY-UCOMM, " return code from screen
G_REPID LIKE SY-REPID.
DATA:
* Reference to wrapper class of control based on OO Framework
G_EDITOR TYPE REF
TO CL_GUI_TEXTEDIT,
* Reference to custom container: necessary to bind TextEdit Control
G_EDITOR_CONTAINER TYPE REF
TO CL_GUI_CUSTOM_CONTAINER.
DATA:
T_MYTABLE TYPE TABLE " To store text in text editor
OF MYTABLE_LINE,
T_AGENT TYPE TABLE " To store agents
OF SWHACTOR,
T_SWCONT TYPE TABLE " To store Instance Structure
OF SWCONT.
SWC_CONTAINER T_SWCONT.
SWC_SET_ELEMENT T_SWCONT 'ABSENCEFORM' '0000000005'. "AbsenceForm
SWC_CONTAINER_TO_PERSISTENT T_SWCONT.
CALL FUNCTION 'SWW_WI_START_SIMPLE'
EXPORTING
* CREATOR = sy-uname
* PRIORITY = SWFCO_NO_PRIO
TASK = 'WS30000015'
* CALLED_IN_BACKGROUND = ' '
* DEADLINE_DATA = ' '
* NO_DEADLINE_PARAMETERS = ' '
* IMPORTING
* WI_ID =
* WI_HEADER =
* RETURN =
* WI_RESULT =
* SWF_RETURN =
TABLES
AGENTS = T_AGENT
* DEADLINE_AGENTS =
* DESIRED_END_AGENTS =
* LATEST_START_AGENTS =
* EXCLUDED_AGENTS =
* NOTIFICATION_AGENTS =
* SECONDARY_METHODS =
WI_CONTAINER = T_SWCONT
* CHANGING
* WI_CONTAINER_HANDLE =
EXCEPTIONS
ID_NOT_CREATED = 1
READ_FAILED = 2
IMMEDIATE_START_NOT_POSSIBLE = 3
EXECUTION_FAILED = 4
INVALID_STATUS = 5
OTHERS = 6
.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Please suggest me what is the exact problem here.
Thanks in advance,
Mahi.