Skip to Content
0
Former Member
Apr 21, 2010 at 12:00 PM

Getting object key in workflow default method

153 Views

Hi gurus,

I am finishing a OO based workflow but I am facing a problem.

In the Business Workplace I see my workflows and when selecting one I see a link on the bottom right for objects and attachments. When clicking this link I go to my class method BI_OBJECT~EXECUTE_DEFAULT_METHOD. In this method I want to call a method which corresponds to the selected line in the Business Workplace. I am not able to do so, can anyone help me?

I've tried this, but it doesn't work (both values (WI_ID and WI_KEY) are 0000000000):

FIELD-SYMBOLS:
    <fs_field>  TYPE sww_wiid,
    <fs_field2> TYPE siw_wf_inf,
    <fs_line>   TYPE any.

* Create data reference
  CREATE DATA result TYPE sww_wiid.

* Get data
  ASSIGN ('(SAPLSIW1)WI_ID')  TO <fs_field>.
  ASSIGN ('(SAPLSIW1)WI_KEY') TO <fs_field2>.

* Assign data
  ASSIGN result->* TO <fs_line>.

* Set data
  <fs_line> = <fs_field>.
  <fs_line> = <fs_field2>-wi_id.

I just need to retrieve the selected line.