on 10-11-2014 10:20 AM
Actual Issue is in updating Container elements for SAP_WAPI_CREATE_EVENT in WDA Application.
Hello experts,
I have a requirement of triggering a WF from my WDA Application.
All are set but while populating the container elements im stuck.
The issue is im unable to update multiple line container element.
That multiple line container element is of my custom table type.
First of all, is it possible to send table values via container to WF from WDA ??
Secondly if not so then what is the solution ??
Two ways i tried,
1. Using swc_set_table MACRO statement.
Here i need to add an include statuement INCLUDE <CNTN0>.
But there seems to be some issue with the decleration inside this include.
there was a decleration with LIKE and not TYPE.
Im not aware how to resolve this.
2. Next way is i tried using FM SWC_TABLE_SET.
But even here there is no type table parameter .
So i tried using Field symbols but no luck.
Can anyone pls help. I need this very urgent.
Thanks a lot in advance.
Hi,
You can wrap the code inside a Function Module and then call that FM from your WDA method.
include <cntn01>.
DATA: lt_cont TYPE TABLE OF swcont,
ls_cont TYPE swcont,
lt_table type <your_custom_table_type>
*polulate lt_table
swc_create_container lt_cont.
swc_set_table lt_cont 'TT_DATA' lt_table.
pass lt_cont to input_container of SAP_WAPI_CREATE_EVENT
place the above code inside a FM and call that FM from your WDA method to trigger WF.
hope this helps,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
I thought of the same thing and it will work for sure.
But i want deploy it inside WDA method itself.
I know creating a FM wont be tedious or stressful but would like to know why MACRO coding is hard inside WDA ?
Or is it possible to use FM SWC_TABLE_SET by using table parameters of field symbols .
Thanks a lot for your quick response Kiran.
Hi,
Since WDA is based on OO framework, you cannot write include statements, so wrap your code in a FM and then call it from method as it also adheres MVC.
Or you can try using class based workflow and use if_swf_ifs_parameter_container~set( ) method of if_swf_cnt_container to pass the internal table to WF container.
hope this helps,
Regards,
Kiran
Hello Kiran,
The Integration works well and im able to read the WI Container elements.
THANKS A LOT!.
I have a small issue now. When the WF calls the WDA Application im getting the WI value in the Parameter of the Application. And assigned the value to a component controller global variable in my WINDOW Method HANDLEDEFAULT .
But when the component is triggered the View is being called first and not the Window. So should i handle this.
-
Vignesh R.
hi,
yes i think it's possible.
create a parameter with Import for your method say p_lt_reclist with multiline,
use the SWC_SET_TABLE CONTAINER 'p_lt_reclist' lt_reclist.
Bind p_lt_reclist with LT_RECTLIST (task container) and later to get it to your WF bind the task container to your WF container.
but make sure the element in the task container must be import and export enable.
Hope this can help you.
Regards.
Jaydeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are using SAP_WAPI_CREATE_EVENT then all you need to do is fill the table parameter INPUT_CONTAINER.
Create a internal table and structure type SWR_CONT and move the container element name to ELEMENT field and the values to VALUE field.
Regards,
Felipe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot for your quick response Felipe.
I have done all what you have mentioned.
The issue does is now how am i going to populate the container element and pass to WF but while doing so for multiple like container element im not able to do so in WDA itself.
Pls suggest if you have come across anything i have mentioned
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.