Triggers workflow from badi
In crm 2007 two installed bases are there. one is customer ibase and the other is company ibase when the customer wants to transfer the component from company ibase to customer ibase(he simply drags the component from company ibase to his ibase) that needs to go for approval process. no event is triggering at this point. after he press save button 3 badis are triggering, i found one badi which suits me the problem is i will trigger workflow from badi if that approver approves that component should be saved in companys ibase if approver rejects that should not save anyone please guide me how to handle this ....
Hi Sunil,
To achieve this functionality, in t-code SE18 create a BADI implementation and add a function module call to SAP_WAPI_CREATE_EVENT. Trigger any BO event and associate the same event as the triggering event of your workflow.
Please note that direct workflow call is not an optimum approach so use BO events.
Create a workflow using t-code SWDD. Add a 'User Decision' step to send workflow task to the approver.
Add two branches in it one for 'Approve' other for 'Reject'. In the approve branch add the logic for saving the component in company ibase.
Hope this helps!
Regards,
Saumya
Similar Messages
-
Triggering Workflow from Custom Module pool
Hi,
I am trying to trigger my workflow from my custom module pool using the function module "SAP_WAPI_START_WORKFLOW". I am passing the following parameters for the above function module
TASK, LANGUAGE, DO_COMMIT, USER and INPUT_CONTAINER
but, it is returning the following message
"You are not one of the possible agents of task 'WS90100020'"
Please suggest a solution for this problem?
Regards
Sujith P. SomanHi,
A better way would be to trigger your WF using an event and calling SAP_WAPI_CREATE_EVENT. But if you want to start it directly then if you are calling this FM in dialog you need to be a possible agent. The easiest is if you jsut make it a general task so anyone can start it.
In PFTC, open your WF goto Additional Data -> Agent assignment -> Maintain. Click on 'Attribnutes' and select 'General Task'.
Also run SWU_OBUF afterwards to synch all buffers before testing your FM again.
Cheers,
Mike -
Triggering workflow from Web Dynpro
Hi,
What is the best way to trigger a workflow from a web dynpro application?
Is there a standard 'Netweaver' workflow component or only the classic workflow is available?
I want to trigger some workflow activity after the user has made a new entry using the dynpro application.
Also is there a way to view the users 'Inbox' in a web browser or the only way is to use iView in a Portal?
Thanks for any feedback.
Regards, HariThanks for the information Tomas & Anil.
What part of the component is GP? Is it part of CAF?
Anil you have mentioned I need to install it on the J2EE.
We have currently Java stack for Web AS 6.4, what other components do I need to make this happen.
Thanks, Hari -
Triggering Workflow from Adobe Form in ERP
Hello,
With SAP ERP 2005 version, Adobe Interactive forms can be created within SAP environment. Is there a way to link the SAP Adobe forms to a SAP Workflow instead of using the Adobe Workflow Designer?
Can we trigger the approval process using SAP WOrkflow from Interactive Adobe form?
Thanks.Hi Anjali,
Interactive Forms is integrated in other environments that use workflow and make it easier to set it up:
Guided Procedures (in NetWeaver 2004s): Fully Java-based, GP is the process component of the Composite Application Framework (CAF), and thus largely model- and not development-based. You can use an interactive PDF form in a GP for offline steps.
Refer the link for more info on CAF
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/devguide2004s -> Fundamentals -> Creating Composite Applications">CAF</a>
The general integration into Web Dynpro, which allows you to build a workflow from scratch (requiring full workflow knowledge) and integrate the forms as steps in the workflow. Using this method, you could also integrate PDF forms into lower-release backends.
Hope this helps
Regards,
Sharadha -
Can we trigger other workflow from BADI- PT_GEN_REQ
Hi all,
I would like to know , if we can trigger other ( custom) workflows, using the badi - PT_GEN_REQ - method start_wf, instead of the standard workflow
( WS12300111).
Regards,
NRHi,
In the existing custom workflow ( WS20000081) which was modified earlier with some addditional 27 activities in it.
Now we are implementing EP7 , and in the standard leave request, uses standard WS12300111 worflow.
Is it possible that we can use old WF get triggered instead of the new one by using this BADI?
Regards,
NR. -
Triggering Workflow Using BADI
Hi All,
can any one tel me how a workflow can be triggered using BADI??Call function module SAP_WAPI_CREATE_EVENT (with COMMIT_WORK = space) to create an event, and use the event to start your workflow (triggering event). Alternatively, you can start the workflow directly using the corresponding SAP_WAPI function module for that purpose. My recommendation is that you normally don't start workflows directly as it is a less flexible solution (or you have to build that flexibility yourself instead of using what you get for free with triggering events).
-
Can workflow be enhanced by BADI? Any one has this exprience before? can you share your experience how to do it?
Hi Jrockman,
Please check these threads
BADI for Workflow
Triggering Workflow Using BADI
Calling FM after Approval
Hope this would help you to some extent..
Good luck
Narin -
Triggering workflow using user-exits
Hi all,
can anyone tel me how a workflow can be triggered using user-exits??
thanks in advanceCall function module SAP_WAPI_CREATE_EVENT (with COMMIT_WORK = space) to create an event, and use the event to start your workflow (triggering event). Alternatively, you can start the workflow directly using the corresponding SAP_WAPI function module for that purpose. My recommendation is that you normally don't start workflows directly as it is a less flexible solution (or you have to build that flexibility yourself instead of using what you get for free with triggering events).
However, why are you asking this question? I started wondering after seeing you ask an almost identical question in [another thread|Triggering Workflow Using BADI; here. -
Trigger workflow from Email (lotus or Outlook)
Hi All,
Is it possible to trigger a workflow from An Email (lotus or Outlook). if so how can we do it?
Reg,
Sre
Edited by: sre on Jul 9, 2009 3:53 PMCheck the following links.. which answers its pretty much possible to Trigger workflow from email...
triggering workflow from incoming mail.
Triggering a workflow on receiving mail from external mail id.
Can we trigger workflow on receiving e-mail ?
Regards,
PR. -
Triggering SRM workflow from a web-based form (HTML)
I am a beginner in SAP, please bear with me.
I have created an online data entry form using html to populate a table in a non-SAP database. I am able to call this form in SAP EP using URL iView.
I want some help on triggering an SRM workflow from this form.
Thanks.Hi Vadim,
I would like to explain the scenario:
1.The form would reside in the SAP Enterprise portal
2.When the form is completed and the "submit" button is clicked, I expect a workflow in SAP SRM to be triggered.
3.The workflow is a developed three-step approval workflow. It was developed using the Hierarchical Approval workflow wizard.
Questions:
1. How can the workflow be triggered when the submit button is clicked?
2. How can the data from the Form be integrated into the workflow and vice versa? -
Hi there,
1. Can we migrate SharePoint Designer 2013 workflows from DEV to UAT to Live without any issues? Any bad experiences?
2. When we deploy these workflows - does IIS need a restart?
Thank you.That depends, did you create reusable workflows? Those can be deployed to another environment (of course depending on dependencies within the workflow itself)
Kind regards,
Margriet Bruggeman
Lois & Clark IT Services
web site: http://www.loisandclark.eu
blog: http://www.sharepointdragons.com -
What triggers workflows execution from IDocs
I have set up a process that triggrs workflows from IDocs by setting the Process code to 'Process by task'.
In some cases, when the workflow falls over, it would be easier to create a new workflow rather than fix the old (the workflow has checks in so that it will not create duplicate documents at any point).
I would like to write a restart report that allows an IDoc to be reprocessed using a new workflow, but I don't see how it is triggered; it is not via an event because the workflow does not have a triggereing event.
Can somebody tell me what the function module is that triggers the workflow, or if it is a report program?
Kind regards,
Tony.Found it: it is IDOC_START_INBOUND.
Bit of a giveaway really.
- Tony. -
System is not picking up approvers from BADI in Item level workflow
Hi All,
My problem is that
1. when I creat the shopping cart the system is picking up the correct approver from BADI and showing it in approval preview.
2. My first level approver is a general task so Workitem going to the correct persons.
3. after first level approver I am fillng approver in BADI for 2 nd level.
4. But after first approval the SC is directly getting approved finally as system is not picking up approvers from the BADI.
I dont understand the problem. even We applied SP9 as well, but the problem is not resolved.
Please suggest something.
Thanks
SmitaHi ,
I am pasting the code of my BADI. Let me know if i need to do some changes.
Regards,
smita
if lv_wf = '4'.
1st approval step executed for indices 1 and 0
IF actual_approval_index LE 1.
First approval step (General task)
endif.
2. approval step executed for indices 2,1 and 0
IF actual_approval_index LE 2.
*break-point.
**get the approver for the commodity
LOOP AT lt_item INTO ls_item WHERE del_ind IS INITIAL.
We consider only items, which are not deleted (del_ind = 'X')
Set the product category
MOVE ls_item-category_id TO lv_call_value1.
Find the approver of this item based on the customizing table ZCOMMODITY
CALL FUNCTION 'ZWF_COMODITY_ITEM_APPROVAL_GET'
EXPORTING
SC_GUID = ls_header-guid
ITEM_GUID = ls_item-guid
APPROVAL_DESCRIPTION =
HIDE_ITEMS_NOT_RESPONSIBLE = 'X'
CRITERION1 = 'COMMODITY'
CATEGORY_ID = ls_item-category_id
ITEM_VALUE = ls_item-VALUE
APPROVAL_INDEX = '2'
CHANGING
APPROVAL_TABLE = approval_table
ITEM_APPROVAL_TABLE = item_approval_table
ITEM_APPROVAL_OBJ = item_approval_obj
endloop.
*ELSEIF actual_approval_index EQ 2.
don't process 2nd step
no_further_approval_needed = 'X'.
endif.
endif. " if lv_wf = '4'.
FUNCTION ZWF_COMODITY_ITEM_APPROVAL_GET.
""Local Interface:
*" IMPORTING
*" VALUE(SC_GUID) TYPE BBP_GUID
*" VALUE(ITEM_GUID) TYPE BBP_GUID
*" VALUE(APPROVAL_DESCRIPTION) TYPE BBP_STEP_DESCRIPTION OPTIONAL
*" VALUE(HIDE_ITEMS_NOT_RESPONSIBLE) TYPE BOOLEAN OPTIONAL
*" REFERENCE(CRITERION1) TYPE BBP_WFL_APP_CRITERION
*" VALUE(CATEGORY_ID) TYPE ZBBP_CATEGORY_ID
*" VALUE(ITEM_VALUE) TYPE BBP_VALUE
*" VALUE(APPROVAL_INDEX) TYPE SWH_NUMC10
*" CHANGING
*" REFERENCE(APPROVAL_TABLE) TYPE BBPT_WFL_APPROVAL_TABLE_BADI
*" REFERENCE(ITEM_APPROVAL_TABLE) TYPE BBPT_WFL_ITEM_APPROVAL_BADI
*" REFERENCE(ITEM_APPROVAL_OBJ) TYPE BBPT_WFL_ITEM_APPROVAL_OBJ
*" OPTIONAL
this Function Module is for getting the commodity approvers
for the commodity items, in the Shopping cart
DATA:
ls_approval_table TYPE bbp_wfl_approval_table_badi,
ls_item_approval_table TYPE bbps_wfl_item_approval,
ls_approval_def TYPE bbpt_wfl_lia_def,
ls_item_approval_obj TYPE BBPS_WFL_ITEM_APPROVAL_OBJ.
DATA:
lv_app_obj_guid TYPE bbp_guid_32,
lv_is_new_approval_object TYPE boolean.
**structure for commodity data
data : ls_commodity type zcommodity.
data : lv_value1 type BBP_WFL_APP_PROPERTY.
CONSTANTS:
c_agent_is_user TYPE otype VALUE 'US'.
First find the right approval object the item belongs to.
All items of an approval object are approved togheter in
this approval step, and therefore only one workitem is
created for this items. IF possible use this standard function
BBP_WFL_DIN_APP_OBJ_GET for creating the approval object.
lv_value1 = category_id.
CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
EXPORTING
SC_GUID = sc_guid
CRITERION1 = criterion1
CRITERION2 = ''
CRITERION3 = ''
VALUE1 = lv_value1
VALUE2 = ''
VALUE3 = ''
IMPORTING
APPROVAL_OBJ_GUID = lv_app_obj_guid
IS_NEW_APPROVAL_OBJECT =
TABLES
ITEM_APP_OBJ = item_approval_obj
CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
EXPORTING
SC_GUID = sc_guid
CRITERION1 = criterion1
CRITERION2 = ''
CRITERION3 = ''
VALUE1 = lv_value1
VALUE2 = ''
VALUE3 = ''
IV_ITEM_VALUE = ITEM_VALUE
IMPORTING
APPROVAL_OBJ_GUID = lv_app_obj_guid
IS_NEW_APPROVAL_OBJECT =
TABLES
ITEM_APP_OBJ = item_approval_obj.
CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
EXPORTING
sc_guid = sc_guid
criterion1 = criterion1
CRITERION2 = ''
CRITERION3 = ''
value1 = category_id
VALUE2 = ''
VALUE3 = ''
IMPORTING
If 2 items of the same shopping cart have the same
values for the criterias, this function returns the
same (!!!) approval object guid
approval_obj_guid = lv_app_obj_guid
TABLES
This table saves the criterias for which the approval object
was created. For example:
|approval object1| "cost center" | 1000 |
|approval object2| "cost center" | 1200 |
|approval object3| "prod categ " | office |
item_app_obj = item_approval_obj
Check if this approval object already exists in the approval
table
READ TABLE approval_table INTO ls_approval_table
WITH KEY approval_object_guid = lv_app_obj_guid
approval_index = approval_index.
IF sy-subrc EQ 4.
lv_is_new_approval_object = 'X'.
ENDIF.
IF lv_is_new_approval_object = 'X'.
Now read your own approval table based on your criteria's
**now check whether the category id is a commodity material and
*find the responsible person for that and
*check if the amount of item is falling in the approval limit of the comodity manager
select single * from zcommodity into ls_commodity
where CATEGORY_ID = category_id
and ( ZFROMAMT <= item_value and ZTOAMT >= item_value ).
SELECT * FROM bbpt_wfl_lia_def
INTO CORRESPONDING FIELDS OF ls_approval_def
WHERE
app_crit_name1 = criterion1 AND
app_crit_value1 = value1
ENDSELECT.
IF sy-subrc NE 4.
Fill approval table (who is responsible for which approval
object in which approval step)
ls_approval_table-approval_index = approval_index.
CONCATENATE c_agent_is_user ls_approval_def-approval_agent1
INTO ls_approval_table-approval_agent.
CONCATENATE c_agent_is_user ls_commodity-person
INTO ls_approval_table-approval_agent.
ls_approval_table-name = ls_commodity-name.
ls_approval_table-approval_description = approval_description.
ls_approval_table-approval_object_guid = lv_app_obj_guid.
ls_approval_table-hide_items_not_responsible =
hide_items_not_responsible.
APPEND ls_approval_table TO approval_table.
IF ls_approval_def-approval_agent2 IS NOT INITIAL.
Second approver for the same workitem exists
CONCATENATE c_agent_is_user ls_approval_def-approval_agent2
INTO ls_approval_table-approval_agent.
ls_approval_table-name = ls_approval_def-agent_string2.
APPEND ls_approval_table TO approval_table.
ENDIF.
ENDIF.
ENDIF.
Fill item table (Which items belongs to which approval object)
ls_item_approval_table-approval_object_guid = lv_app_obj_guid.
ls_item_approval_table-approval_item_guid = item_guid.
APPEND ls_item_approval_table TO item_approval_table.
**Fill Item approval object
ls_item_approval_obj-sc_guid = sc_guid.
ls_item_approval_obj-APP_CRIT_NAME1 = CRITERION1.
ls_item_approval_obj-APP_CRIT_VALUE1 = CATEGORY_ID.
ls_item_approval_obj-APPROVAL_OBJECT_GUID = lv_app_obj_guid.
append ls_item_approval_obj to ITEM_APPROVAL_OBJ. -
FM or include that triggers Workflow in sap SRM 5.0.
Hi All,
Can anyone tell me the FM, for triggering a workflow in SAP SRM 5.0. I mean the name of the program or Include or an FM which finally triggers workflow while saving?
Thanks,
Edited by: Manoj Singh on Oct 6, 2011 6:51 PMHi Gaurav,
Thanks for responding. Yes, all the backend config are in place since I am able to successfully run an equivalent RFC (BBP_PD_SC_GETLIST) and another RFC named BBP_PD_SC_GETDETAIL from SE37. The problem seems to be something very specific to the ES. May I request you to run this ES at your end (if possible) and let me know the result possibly with the input and output message similar to the one I pasted in the origincal question.
Thanks in advance,
Nilay -
RFC issue in Triggering workflow
Hi,
I am trying to trigger a custom workflow from EP in Newly set up ECC 6.0 system.
Problem here is, Business object Event is getting triggered in R/3 with custom workflow as reciever, but the workflow is not going to the first stepThe event trace (SWEL) gives following information,
Action Receiver started correctly
RFC Status Logon not possible (error in license check)
I have checked the configuration in SWU3, all where fine, also the RFC WORKFLOW_LOCAL_100 tested successfully. The ECC6.0 has the full license.
Please let me know why this has happened? How can it be solved? Please reply ASAP.
Thanks,
ShrinivasHi,
WF-BATCH has validity till 12/31/9999 and also the workflow initiator has SAP_ALL authorization,
Still the issue has not been solved. New thing i noticed this this problem happens intermittently !
For some time it is working fine, some other time its giving the same RFC error.
Thanks,
Shrinivas
Maybe you are looking for
-
Monitor sensor stopped responding alerts and typing problems with external keyboard.
The past few days I have been getting these alerts. Also, I use my MacBook as a desktop about 60% of the time and like to hook up a full size keyboard. It's worked fine for two years but now I can only type a few words before there is a stall and I c
-
PORTAL(WEBDYNPRO UI)+ XI+MDM AND R/3 WHAT SHOULD BE PREFERRED CERTIFICATION
Hi All, Our product is based on webdynpro UI which is deployed on Portal,then XI and R/3 and MDM. Can anybody please tell me which certification options will be suitable for this product? And also the related details for that certification. Thanks in
-
Exactly Once In Order ..in File adapter ???
Hi Xi friends.. in my file to idoc .. i am getting files as wear*.xml . i think , i have to use Exactly once in Order in Communication Channel to process multiple files in order starting with wear*.xml if i select Exactly Once In Order.. i have to
-
IPod won't restore - problem downloading iPod software
When the restore window comes up and I select the restore button, an error window pops up that says "there was a problem downloading the iPod software for the iPod "iPod". The requested resource was not found". I've tried several of the tips includin
-
BlazeDS amf-polling on secure channel
I tried using blazeDS amf-polling via https, and it doesnt work. amf (remote object) works through securechannel, but amf-polling does not. Is there a way to make amf-polling work on https?