Skip to Content
avatar image
Former Member

swc_get_element container is empty in workflow

I am new to workflow. I created a workflow and I am passing agent via agent rule using functional module. Only one agent at a time. I use SAP_WAPI_CREATE_EVENT.

this is my code. here lt_container has data at the moment.

swc_create_container lt_container.

wa_cont-element = 'GPNUM'.
wa_cont-value = max_gp_num.
append wa_cont to lt_container.
clear: wa_cont.

i_objkey = max_gp_num.

call function 'SAP_WAPI_CREATE_EVENT'
exporting
object_type = 'ZSLBUSGP_1'
object_key = i_objkey
event = 'START'
commit_work = 'X'
importing
return_code = return_code
event_id = event_id
tables
input_container = lt_container.

call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.

My problem is I cannot get any data using

SWC_GET_ELEMENT AC_CONTAINER 'GPNUM' GPNUM.

AC_CONTAINER is empty. I use this inside my functional module.

Event trigger very well.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 08 at 07:45 AM

    Hi,

    Please check the container name is exactly same as capital letter 'GPNUM'. No small letter is in the name in workflow containers.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10 at 10:24 PM

    In your workflow step where you define the rule, you also need to set up the rule container binding. Element GPNUM of the WF container must be mapped to GPNUM of the rule.

    Add comment
    10|10000 characters needed characters exceeded