Skip to Content
author's profile photo Former Member
Former Member

Pass parameter to workflow container

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Feb 28, 2009 at 07:56 AM

    Hi,

    Was the workflow active and without any errors.Becoz it seems like a interface connectivity is missing here.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.