cancel
Showing results for 
Search instead for 
Did you mean: 

Starting workflow from WB (java)

maarten_duits2
Participant
0 Kudos

Hi there WD guru's,

I am new on Web Dynpro (WD) and i do have some questions. What i have to realise is when the WD fields are filled in and the user pushed the "submit" button there need to be a workflow started in R/3.

What i have in mind is this:

1. Create a model in WD for SAP_WAPI_START_WORKFLOW

When i import this BAPI there is a yellow triangle in front of the BAPI. I think that it is a warning, but i do not know for sure. Hope somebody can tell me? Is this SAP_WAPI_START_WORKFLOW the correct way? What you need to know is that we don't want that the data is first saved in R/3 before it is approved.

2. In the <b>DoInit()</b> fase of the Component Controller i want to create a new element of the SAP_WAPI_START_WORKFLOW_INPUT. This works fine. But when i create a new element of the INPUT_CONTAINER it goes wrong. As far is i understand, the input_container is a multi line structure. Can someone tell me if it's possible to fill the structure with the correct data? If there is a alternative, pls let me know.

The code looks like this:


// Create a new element in the Sap_Wapi_Start_Workflow_Input node

Sap_Wapi_Start_workflow_Input input = new Sap_Wapi_Start_workflow_Input();

// Create new elements in the Input_Container node

input.setInput_container(new Swr_Cont()); [here it goes wrong]

wdContext.nodeSap_Wapi_Start_Workflow().bind(input);

I hope i described it well enough. If there are questions, pls let me know.

Thx in advance

Regards,

Maarten

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Maarteen

1. you need not wory about the warning messages.

2.

Sap_Wapi_Start_workflow_Input input = new Sap_Wapi_Start_workflow_Input();

// bind the context node

wdContext.nodeSap_Wapi_Start_workflow_Input().bind(input);

input.set<ParamName>("Param value");

//execute the BAPI

Kind Regards

Mukesh

maarten_duits2
Participant
0 Kudos

Hi Mukesh,

Thx for the answer, hope you (or somebody else) can help me i little bit more.

When i try,

input.setInput_Container("Param value");

It is not working. The setInput_Container(); is of type AbstractList arg0. Can somebody tell me how to fill this input container.

The input container has 2 fields ELEMENT and VALUE. I need to submit more lines in the input container.

Thx in advance.

Regards, Maarten.

Former Member
0 Kudos

Hi Maarteen ,

Try This

Sap_Wapi_Start_workflow_Input input = new Sap_Wapi_Start_workflow_Input();

Input_Containter container=new Input_Container();//or the Structure name Swr_Cont

container.setValue("Value");

container.setElement("Element");

input.setInput_container(container);

Kind Regards

Mukesh

Answers (1)

Answers (1)

Former Member
0 Kudos

> 1. Create a model in WD for SAP_WAPI_START_WORKFLOW

>

> When i import this BAPI there is a yellow triangle in

> front of the BAPI. I think that it is a warning, but

> i do not know for sure. Hope somebody can tell me?

> Is this SAP_WAPI_START_WORKFLOW the correct way?

> ? What you need to know is that we don't want that

> the data is first saved in R/3 before it is

> approved.

Hi,

You get a yellow triangle in front of the function module when it has not been fully released for use. In the case of the FM you are using, it has only been internally released so you get the yellow triangle. I'd be wary of using FM's that haven't been completely released as SAP don't offer support and reserve the right to change them!

Gareth.