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

Triggering workflow from webdynpro application

Former Member
0 Likes
676

Hello Experts,

I got a requirement to trigger workflow from pop-up window in webdynpro application. Iam using  'SAP_WAPI_CREATE_EVENT' function module to trigger workflow, after triggering workflow am showing success message.

Here the message is displayed but the workflow is not showing in SBWP i.e. am not getting any mail in the inbox. During debugging it is showing correct EVENT and BUSINESS OBJECT.

Any ideas what went wrong or i missed something??

Thanks & Regards,

Mohammed.

Accepted Solutions (1)

Accepted Solutions (1)

rajeshkothamasu
Active Participant
0 Likes

Hi,

check SWI1 tcode your workflow has been triggered or not. If workflow has been triggered check the workflow log.

If workflow has been suspended at mail step(Reason mail id has to be maintained) for mail step.

check your mails in SOST status of mails is available.

Former Member
0 Likes

Hello Rajesh,

I have checked in SWI1, but it is not showing any thing in it. Even email is unavailable in SOST.

The function module 'SAP_WAPI_CREATE_EVENT' is working fine. The procedure is followed according to Kiran Reddy Document on "How to trigger workflow from webdynpro".

Any suggestions??

Thanks,

Mohammed

rajeshkothamasu
Active Participant
0 Likes

Hi,

If no workitem entries are found in SWI1 related to your workflow, then the workflow has not been triggered. If workitems are there its working fine.

check again and tigger the workflow from webdynrpo again. see workitems are coming in SWI1 are not.

rajeshkothamasu
Active Participant
0 Likes

try this below parameters are passed or not

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'

           EXPORTING

             object_type    = 'BUS2105'

             object_key     = lv_objkey

             event          = 'CREATED'

             commit_work    = 'X'

             event_language = sy-langu

             language       = sy-langu

             user           = sy-uname.

Answers (1)

Answers (1)

Former Member
0 Likes

Have you checked in SWEL

Former Member
0 Likes

Hi Prabhakar,

Checked it but its not showing any entries..

Thanks,

Mohammed

Former Member
0 Likes

Use commit work after triggering of the event.

Once you can't find the event in SWEL, it means your event was not fired. Most likely you forgot to commit your operation. In this case only a new ID of the event is generated (probably NUMBER_GET_NEXT), but no database modifications were done.

Former Member
0 Likes

Hi,

Commit work is already inside the function module, do i need to explicitly do it?? Check the function module.

Calling Function Module to Trigger Business Object Event

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'

EXPORTING OBJECT_TYPE = OBJECT_TYPE " ZBUS593

OBJECT_KEY = OBJECT_KEY

EVENT = EVENT " FIRE

COMMIT_WORK = 'X'

EVENT_LANGUAGE = SY-LANGU

LANGUAGE = SY-LANGU

USER = SY-UNAME

TABLES

INPUT_CONTAINER = lt_cont. " Business Object Container

Former Member
0 Likes


Have you activated your object, check it in SWETYPV.

Former Member
0 Likes

Hello Experts,

Thanks for your time,

I have defined the business object as

DATA: OBJECT_TYPE TYPE SWR_STRUCT-OBJECT_TYP VALUE 'ZBUS535'.

I have change and hardcoded the business object in the Function Module it triggered, dont know what is the difference/ why it happened.

Thanks,

Mohammed.