on 07-28-2014 5:12 PM
Hi Guys,
Can we trigger workflow from 'Z' program by using FM SAP_WAPI_CREATE_EVENT without doing anything in SWDD tcode.
I know this FM is used mainly for creating the Event but not sure wether it will trigger Workflow with an email sending to the concerned person given in the Selection screen of Custom Program.
Hi,
did you create any custom workflow which will trigger for BO 'ZFI_ALERT' and EVENT 'FailedIDOC' and also with event parameters binding in workflow ?
if you create workflow then that workflow will be triggred and you can see that container values in Workflow log .
Thanks,
Phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
From a custom program I am passing container lt_cotainer from FM SAP_WAPI_CREATE_EVENT to the custom Business Object.
I created event in the Business Object and also created parameters for this event which are same with the container.
This is my code in custom program
ls_container-element = 'IDOCNUMBER'.
ls_container-value = objkey.
append ls_container to lt_container.
ls_container-element = 'MESSAGETYPE'.
ls_container-value = P_MESTYP.
append ls_container to lt_container.
ls_container-element = 'CREATEDDATE'.
ls_container-value = P_CREDAT.
append ls_container to lt_container.
ls_container-element = 'CRETIM'.
ls_container-value = ls_edidc-CRETIM.
append ls_container to lt_container.
ls_container-element = 'MSGTXT'.
ls_container-value = ls_t100-TEXT.
append ls_container to lt_container.
ls_container-element = 'EMAILID'.
ls_container-value = P_E_ADDR .
append ls_container to lt_container.
"FM for Triggering the Triggering the Event and Workflow
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = 'ZFI_ALERT'
OBJECT_KEY = objkey
EVENT = 'FailedIDOC'
* COMMIT_WORK = 'X'
* EVENT_LANGUAGE = SY-LANGU
* LANGUAGE = SY-LANGU
* USER = SY-UNAME
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* EVENT_ID =
TABLES
INPUT_CONTAINER = lt_container
MESSAGE_LINES = lt_msglines
* MESSAGE_STRUCT =
.
My question is how we can see the this lt_container table in business object Program because i am not able to get some values in my INBOX.
what is the process to check this lt_container?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
when you create a custom Business Object we need to mention program name and Application details.
you can give any Z program name as per your standards it will automatically implement program for BO methods.
for Application select application-specific which these BO belongs to like SD, MM, FI.
then create Event in BO.
Once BO is created you can call that BO and Event using FM from SE38 program or enhancement based on your requirement.
Thanks,
Phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phani,
My only concern is whatever container i am populating from FM SAP_WAPI_CREATE_EVENT in my Program not able to see it in my Business object Program.
How to see this table(Container) in Business object....i searched in internet but none of them is direct.
If we are not able to see this table in business object then what is the need for uing this Function Module
Hi,
1. create Workflow using Tcode SWDD and in WF Start Events use (Business Object / Class ) and EventsTo trigger Workflow.
2.Use FM SAP_WAPI_CREATE_EVENT to raise (Event of Business Object /class ) using Z program.
3. By using the above FM we can Pass data from program to Workflow using Event Container.
Thanks,
Phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi VR,
I think you write logic in Custom BO itself in methods as per requirement.
You can go through this link for custom BO related WF.
Thanks,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.