on 10-14-2008 1:57 PM
Hi All,
Iam calling a WF from a BSP application by using the FM
EWW_WORKFLOW_START
for this fucntion module iam passing a table to the parameter
X_CONATINER = t_values
but I am a bit confused that how this table is assigned to the workflow conatiner.
what I want to know is I need to assign the values of t_values to the WF conatiner elements .
Thanks In Advance.
Regards
Pavan
Thanks SAHOO it worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
in top of your code
include<cntn01>.
then create container
swc_container lt_event_container.
swc_create_container lt_event_container.
To set container element use:
swc_set_element
lt_event_container
'ZDATE' DATE.
To assign table means multiline container element.
swc_set_table
lt_event_container
'ZUSER' zagents.
In above E.G. ZDATE and ZUSER(multiline) is container element. and date and zagents is variable and table.
pass this container when you call WF.
Hope magic Works!
Regards,
Purvesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thanks for the reply but let me explain my case to you clearly,
First of all
Iam not passing the values from a ABAP program
the values are passed from a BSP application and all the necessary instructions are defined where Iam able to fill the values into the conatiner (T_conatiner) .
Now When I call the FM EWW_WORKFLOW_START from the BSP I am passing the T_conatiner to the work flow , from the BSP side the sy-subrc value is equal to zero.
Workflow side
Now in the workflow side how I can assign the values that are in the table t_conatiner to the workflow conatiner element CONT
Regards
Pavan
Pavan,
this table is used to pass the workflow container element values to the workflow. Make sure you pass the 'ELEMENT' and 'VALUE' pair to this table, whatever values you want to pass to the workflow container. Also make sure the name you pass to the 'ELEMENT' should be present in the workflow container and the name should be exactly same. U can also use the FM 'SAP_WAPI_START_WORKFLOW' or 'SAP_WAPI_CREATE_EVENT' to start the WF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I tried but it is not working , as you said I have declared a table enabling Multiline with the same type in the work flow container but still Iam able to see only 0000000000 but nothing any more.
Even I tried to execute the Function module directly from SE37 and passed some values to the table parameter X_CONATINER but still am not able to get the values that are stored in the table.
Regards
Pavan
Pavan,
try this code and include this in your corresponding include.
Make sure that your workflow has a multiline import element with the same name as of the internal table. Here, WERKS.
REPORT yh_sample.
DATA : t_container TYPE TABLE OF swcont WITH HEADER LINE,
wf_id TYPE swwwihead-wi_id.
DATA: werks TYPE STANDARD TABLE OF werks_d WITH HEADER LINE.
DEFINE swc_set_element.
call function 'SWC_TABLE_SET'
exporting
element = &2
tables
container = &1
table = &3
exceptions
type_conflict = 1.
END-OF-DEFINITION.
werks = '1000'.
APPEND werks.
werks = '1003'.
APPEND werks.
werks = '1056'.
APPEND werks.
swc_set_element t_container 'WERKS' werks.
CALL FUNCTION 'EWW_WORKFLOW_START'
EXPORTING
x_task = 'WS99901222'
IMPORTING
y_workflow_id = wf_id
TABLES
x_container = t_container
EXCEPTIONS
invalid_task = 1
no_active_plvar = 2
start_failed = 3
general_error = 4.
IF sy-subrc = 0.
COMMIT WORK.
MESSAGE 'success' TYPE 'S'.
WRITE:/ wf_id.
ELSE.
MESSAGE 'Error' TYPE 'S'.
ENDIF.
Regards
Indu.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.