cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP_WAPI_CREATE_EVENT - Passing parameters fail..

Former Member
0 Likes
374

G'day

Last friday I changed my FM call from SWE_EVENT_CREATE_FOR_UPD_TASK to SAP_WAPI_CREATE_EVENT

Now the parameter "Spec" won't follow the event-call which causes Wrong workflow to be created.

Ive checked [related link|]

IF bkpf-bktxt(4) = '1234'.
    swc_set_element lt_container 'Spec' 'X'.
  ENDIF.

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
  EXPORTING
    OBJECT_TYPE             = gc_obj_bkpf
    OBJECT_KEY              = lv_obj_key
    EVENT                   = gc_ev_pr_created
   COMMIT_WORK             = 'X'
 TABLES
   INPUT_CONTAINER         = lt_container.

*  CALL FUNCTION 'SWE_EVENT_CREATE_FOR_UPD_TASK'
*       EXPORTING
*            event           = gc_ev_pr_created
*            objtype         = gc_obj_bkpf
*            objkey          = lv_obj_key
*       TABLES
*            event_container = lt_container.
*

Do you have any suggestions..

Best reg

Henrik

View Entire Topic
Former Member
0 Likes

It seems like the two uses different declarations of the container...

SWR_CONT / SWCONT

...need to check that...

/H

Former Member
0 Likes

I answered it myself.

I used the new declaration of the table for CONTAINER....then append info to that table...

Parameter is passed on to the triggered EVENT.

Best reg

H

(sorry for taking your time)