cancel
Showing results for 
Search instead for 
Did you mean: 

Pass document id to workflow

Former Member
0 Kudos

Hi,everyone.

I'm writing a report program which can trigger a workflow .

The workflow is used to change the documnt's status.

Can someone give me some advice how can I pass the document id to the workflow.

I'm waiting for your help.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

bpawanchand
Active Contributor
0 Kudos
I'm writing a report program which can trigger a workflow .

How you are trying to trigger the WF i mean by using start workflow funcitons or by raising any event.

If you are staring the workflow by using FM like

SAP_WAPI_START_WORKFLOW

EWW_WORKFLOW_START e.t.c

then you will have a parameter in the tables parameter with the name like container check the type of that container declare in your report. and fill that table with tha values tha you want to pass to the workflow.

like the below snippet.

DATA: lt_cont    TYPE STANDARD TABLE OF swr_cont,
DATA: ls_cont    TYPE                                   swr_cont.
 
 
ls_cont-element  = 'PERNR'.
ls_cont-value   =  <varible name whioch will hold the value of the pernr>
APPEND ls_cont TO lt_cont.

Former Member
0 Kudos

Hi,Bhamidipati

I'm using a event to trigger the workflow.

How to pass data to the key of business object ??

Can you give me some advice?

Thanks.

bpawanchand
Active Contributor
0 Kudos

Use the FM SAP_WAPI_CREATE_EVENT and as i mentioned fill a internal table of same type and pass it to the tables parameter INPUT_CONTAINER

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks.

I have solved this problem.

Former Member
0 Kudos

you need to use the FM : swe_event_create

pass the follwoing parameters

OBJTYPE Object type u created in swo1

OBJKEY Object key like material number

EVENT event name which u have created

If any . let me know

Regards ,

kiran