BBP_WFL_APPROV_BADI
Hi,
I have an issue with the approval process in BADI.
When a SC it has 2 approval steps
1. Buyer is required to enter an appropriate vendor and the approve the SC
2. Manager approves the SC
The following scenario works correctly
1. Buyer enters a vendor and approved the SC
2. Manager then is sent SC to approve
My issue
1. Buyer approves the SC and doesn't enter a vendor, the vendor is a required field and the SC is returned to the Buyer to enter the vendor
2. Buyer approves the SC and enters a vendor
3. The manager doesn't recieve the SC to approve, the approval step is lost some how......
Any ideas
Regards
J-J
Here is a bit more info that may help ...
when the SC is created there are 3 approvers in the approver list
2 level 1 approvers and 1 level 2 approver.
After one of the level 1 approvers (Buyer) selects approve without entering a vendor .... the buyer approval is still outstanding (WS14000134)
Now there are only 2 approvers in the approver list all at level 1, level 2 approval has been disappered from the approver list. ID has been populated in the approver list
Regards
J-J
Similar Messages
-
How to fetch Requestor of the PO in BBP_WFL_APPROV_BADI
Hi All,
While processing PO in, I need to retrieve the approvers based on the approval limit of the Requestor.
However, I am not able to execute the FM BBP_PD_PO_GETDETAIL as during creation of PO, system is not giving the value of the OBJECT_ID. (I am getting the guid into the BADI)
Hence, can any one specify what exactly I need to do to fetch the Requestor (creator) of the Purchase Order details in the BADI BBP_WFL_APPROV_BADI.
Thanks in Advance
VenkyHi,
I guess you can pass the GUID also to the FM "BBP_PD_PO_GETDETAIL ".If not,you can always get the object ID using the GUID from the tbale CRMD_ORDERADM_H.
You will get the requestor name in the tables E_HEADER(PO header data ) e_header-created_by by field .
You just need to use this FM directly to get all the details of the PO.
BR,
Disha.
<b>Pls reward points for useful answers.</b> -
Error with workflow approval BADI- BBP_WFL_APPROV_BADI
Hi All,
We are running SRM 5.5 Classic Scenario.
We have activated "BBP_WFL_APPROV_BADI" for n-step approval process of shopping carts. From a certain period of time I am facing the following problem: when a user, with defined output limit in the extended attributes, creates shopping cart below this limit, the shopping cart instead to be ordered immediately stays in status u201CIn your inboxu201D and there is a message in the field "notes for approval" that the user WF-BATCH is not assigned in the organizational structure, and the item status is u201Cawaiting approvalu201D. Although, if you go to approval preview, the message is that no approval is required, the shopping cat is sent for approving to the manager.
It is very strange, because workflow user has never been assigned to the organizational structure and the other strange thing is that this problem exists in all SRM systems (development, quality and training).
We tried to debug the BADI, and we couldn't find any problem. The BADI first checks the spent limit of the user (which is the set output limit in the extended attributes of that user) and because the validation is ok (the value of the shopping cart is below the spent limit) the process stops. But at the same time the shopping cart is sent for approving to the first manager.
Has anybody of you faced this problem?
Thank you in advance!
DesislavaHi Masa,
Yes, this is my issue, that the shopping cart is sent to the manager for approving! And at the same time when the user is checking the status of the shopping cart -the status is"In your inbox" and the status of the item is "awaiting approval". When you go to item details-> to additional specification tab(field), a system message is generated in the field "notes for approval" and the message is "Cannot find org unit for user WF-BATCH". In my opinion that means that the system is searching for WF-batch as approver. Let me briefly tell you how the BADi works, first validates the spent limit of the user if the value of the shopping cart is below then the shopping cart should be sent directly to r/3 system and a PO should be created. If the value is above, the system start checking to which organizational unit the users belongs, and after that determines the first approver!
Hope it is more clear for you!
Thanks
Desislava -
BBP_WFL_APPROV_BADI error scenario
Hi,
SRM 5.0
I have activated N-Step BADI BBP_WFL_APPROV_BADI and it works well (good scenario cases) as per the customization.
In the customization, many tables are accessed. Due to some reasons if the record is not available, how do I error out ?
I want the user to see the error in the "approval preview" as well.
Is it possible ?
PranavHi
Thanks
In my case, if there is an error (say no record), the work item has not been sent to the approver. When I check the SC (in approval preview), it shows "approver...." BLANK.
The reason is that the custom program can't get the record as it doesn't exist.
Do you mean in this scenario I can use BBP_DOC_CHECK_BADI ?
-Pranav -
BBP_WFL_APPROV_BADI - There are already implementations active
Hi
I was thinking about using badi BBP_WFL_APPROV_BADI to set up different approvers for approval of the Shopping Cart in SRM. But unfortunately I get the message "There are already implementations active". Looks like SAP is already using this BADI. Does that mean that there is no way that I can use this BADI too?
Best regards
SteenHi Steen,
please look at BBP_WFL_APPROV_BADI in SE80. In the object tree you should see the implemantation(s).
Regards,
Clemens -
Using BBP_WFL_APPROV_BADI for a user defined WF
Hi SRM Workflow Gurus,
May I know if it is possible to use BADI BBP_WFL_APPROV_BADI for a custom workflow aside from the standard WS14000145? If yes, how do we differentiate (ABAP code) in the BADI?
What I want is to have different starting conditions based on the GOODS RECIPIENT's org unit. I don't know if you can use the org unit as a criteria in your BADI since from the samples, it is purely PO header fields that are used...I'm not too sure. Is there a better alternative to creating a new workflow?
Regards,
MarvinThe Badi is there to provide a means of creating your own approval behaviour of SC's and PO's.
The examples of the badi implementations are not used as guidelines.
Just create your own custom logic in the Badi, which can be based on anything..
Kind regards, Rob Dielemans -
Purpose of table of APPROVAL_ADMINISTRATORS in BADI BBP_WFL_APPROV_BADI
Hi Gyus,
what is the purpose of the table parameter APPROVAL_ADMINISTRATORS in BADI BBP_WFL_APPROV_BADI? Is it to pass on approval information to the WF-Administrator?
Where can I find a useful description on this?
Kind regards,
ThomasHi,
You need to populate this table in the badi if you need to define an administrator for the workflow.
If the approvers are not found in the badi,you can fill the adminsitartor table with workflow admin deatils in the badi because of which the work item will go to the workflow admin.
See these useful related threads:
Re: Workflow Administrator appears in workflow without cause
how to code APPROVAL_ADMINISTRATORS in n-step WF?
Re: doubt
Re: ADMINISTRATOR_APPROVAL parameter in n-step approval badi
SRM 5.0 N-Step : No Administrator Defined in BADI
Re: N-step BADI workflow
BR,
Disha. -
Approval_history_table of BADI BBP_WFL_APPROV_BADI
Hi all,
Can anybudy tell me what all entries will come in runtime for the table approval_history_table of BADI BBP_WFL_APPROV_BADI.
Will it contain all the approving agents populated in previous BADI calls? And what does flag "type" in the table brings?
Thanks
SangharshHi Sunil,
I don't think you need to code with the actual_approval_index.
We don't use the actual_approval_index, but just add approvers and levels to the export-table as needed.
Suppose you would need the follwing scenario:
- total value <= 100 : no approval
- total value > 100 : 1-step approval
- total value > 1000 : 2-step approval
- total value > 10000 : 3-step approval
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = lv_guid
i_object_id = object_id
IMPORTING
e_header = ls_header.
IF ls_header-total_value le 100.
no_further_approval_needed = 'X'.
endif.
IF ls_header-total_value > 100.
ls_approver-approval_index = 1.
ls_approver-approval_agent = 'US 146296'.
ls_approver-name = 'SA'.
ls_approver-approval_description = 'First approval step'.
APPEND ls_approver TO approval_table.
endif.
if ls_header-total_value > 1000.
ls_approver-approval_index = 2.
ls_approver-approval_agent = 'US 146720'.
ls_approver-name = 'BA'.
ls_approver-approval_description = 'Second approval step1'.
APPEND ls_approver TO approval_table.
endif.
if ls_header-total_value > 10000.
ls_approver-approval_index = 3.
ls_approver-approval_agent = 'US 146474'.
ls_approver-name = 'SU'.
ls_approver-approval_description = 'Third approval step1'.
APPEND ls_approver TO approval_table.
endif.
regards,
Hendrik-Jan Bosma -
BAPI BBP_WFL_APPROV_BADI
Hi Experts,
I want to know that in an n-step approval workflow WS14000133, at which point exactly is the BADI BBP_WFL_APPROV_BADI triggered ?
Can anyone help ???
Regards,
Radhika.Its becuase the task which the method is useing to determine the agent is a background task and if you want to debug it you need to modify make it fore ground and then insert a break point in the badi.
we can debug workflow task's only if they are foreground other wise even after inserting a break point the control won't stop.
so now its upto you whether you want to make the task fore ground or not.? -
Debbuger never stop in BADI 'BBP_WFL_APPROV_BADI' 's Method Implementation
Hi Experts,
We are implementing the PO n-step BADI workflow WS14000145 . I have implemented the method 'GET_REMAING_APPROVERS' of BADI 'BBP_WFL_APPROV_BADI', but when I put a break-point, the debbuger never stop!!!... please help about it!.
Thanks in advance.Hello,
Try the following:
- Set a breakpoint at function BBP_PDH_WFL_DB_UPDATE;
- Craete the cart. Breakpoint should stop in FM above;
- Change variable IV_IN_DIALOG to X (it is blank originally);
- Set a breakpoint at BBP_WFL_DIN_APPR_BY_RULE_GET. In here the badi to determine the approvers is called;
- F6 down until the call of this badi, i.e. CALL METHOD lv_wfl_appr_list_exit->get_remaing_approvers.
Regards,
Ricardo -
WS14000109 and BBP_WFL_APPROV_BADI
Hi
We are using workflow [SLAPPROVER]. In the scenario when approver substitutes to a person who is also a requester [has manager role] then the requester becomes the approver. In this case he is able to approve his own SC. In standard WS Wf_initator check is also there but somehow it is not working.
SAP has asked to use BADI BBP_WFL_APPROV_BADI but our requirement is to stop the approval and not to build the custom logic to derive the approvers.
Is there any other way to do this? Can this BADI be used for this purpose?
AlokHi,
If the version for the PO is created,thats means the PO has been changed.You can get the version details using the FM "BBP_PD_PO_GETDETAIL".
BR,
Disha. -
Multiple Implementation For BBP_WFL_APPROV_BADI
hi,
is it possible to have multiple an implementations for BBP_WFL_APPROV_BADI definition badi. because my opinion is instead of using same implementations for all n-step workflow why don't use different implementations for each and every workflow separately using that single BBP_WFL_APPROV_BADI definition.
I know we can have n number of implementations, but those are all should be active not inactive stage.
i hope you understand my question .
thank you,
John.hi smita,
the answer which you were giving , was my question.
why do we have each implementation for each workflow rather than single implementation for all workflows.
say for example WS13000133 and WS14500015. again i have specified my question here,
as i have specifed above WFs we have to use BBP_WFL_APPROV_BADI definition.
the above Badi defition has only one method , for this method even if you implement two implementations , any one of the implementations can be active . we can't active both implementatios right . but my scenario is i have to active both implementations. is it possible to have both implementatios for above defition?
please give me some hints.
regards,
john. -
Urgent help on SC approval BADI BBP_WFL_APPROV_BADI
Hello SRM Gurus,
I am working on the BADI BBP_WFL_APPROV_BADI for SC Approval.I need some clarifications on the foll points before I can proceed with the development...
My requirement is
1>The no of levels of Approval depends on the total Value fo SC and the Product Category of the Items(i.e. the Whole shopping cart since all the Items will be of the same Product category as well as same cost centre).
Based on the combination of these 2 values,I will have to set the approval_index field.
2>Also after this,based on the combination of the value for the fields Product Category + Cost centre,the approvers have to be determined.
Now for the deteremination of Approvers,either a custom table can be maintained or they ca be retrieved form teh Org structure itself.
But now here,for getting the Approvers,if I have to get the apporvers from the Table(database table bbpt_wfl_lia_def),I can only maintain the combination of values for the fields Cost center and Prod category and the corresponding agent and not the approval level.How do I link the approval index and the approvers???
Also, if i ma getting the approvers form the Org structure how is the link between Cost centre+Prod cat and Corresponding approver maintained????Or in case of getting the approvers for the Org structure,I just need to get the Chief/manager of the Person who is creating the Shopping cart(Since cost centre will be maintained at the User level)???
3>Also since my approval is purely at the Header level,whcih of the example implementations given with the std BADI will be usitable for my reqt(particularly for the APprovers part)????
Also since mine is Header level approval(since cost center+Prod cat will necessarily be same the whole of the SC,do I need to activate only the workflow 14000133(and no other wfs i.e.WS14500015,WS10000031,WS10000060,WS10000129 )?
Also,Please correct me if i have gone wrong in any of my understanding.Any help on this is highly appreciated.
Regards,
Disha.Though i think this was posted long back, but still:
You need to do a BRF configration which will take care of ur approval levels and the corresponding approvers.
You need to define the schemas there.
Thanks
Nitin -
How to capture the Actual approver from BADI :BBP_WFL_APPROV_BADI
If the approval branch(index) has 5 approvers and If any one of them is approving,
the APPROVAL_HISTORY_TABLE has all the 5 approvers of that branch.
User1 is one of the 5 users.When he is approving,the approval table has all the 5 approvers and no where the actual approver of that branch is captured.
Can we capture the actual approver based on Sy-Uname?
Or is there any other specific solution?please suggest.Hello Kittu,
Here is below process for BBP_WFL_APPROV_BADI BAdI call by function modul:
BBP_WFL_DIN_APPR_CONTAINER_SET > BBP_WFL_DIN_APPR_FINALLIST_GET > BBP_WFL_DIN_APPR_CONTAINER_GET > BAdI BBP_WFL_APPROV_BADI.
Now, check what's happened for first function module local variable lv_actual_index and local table lt_cont_approver
coming from BAdI parameters ACTUAL_APPROVAL_INDEX and APPROVAL_TABLE.
Maybe your BAdI method is not correctly implemented.
Regards.
Laurent. -
BBP_WFL_APPROV_BADI container element
Could you please tell me how to read container of the shopping cart in the dynamic approver determination badi in n level item based workflow ?
thanks
ps.i copied for the object type bus2121 the existing code given for po and contract in the example impl of the badi but i cudnt get any result.
i put this code in when c_shop.
swf_create_object lo_new_instance object_type guid.
swf_get_property lo_new_instance 'Initiator' l_initiator.Hi Rita,
If you want to retrieve SC attributes , like the descripton, you can use FM BBP_PD_SC_GETDETAIL. By using this function, you can get the header, items information as well as its account information. Here, you can get both the shopping cart and item guids.
However, there's FM BBP_WFL_DIN_ITEM_APPROVAL_GET that allows you to build and control the dynamic approval information, which I suppose is the type of information you need to have. This function is used to create an approval object (more specifically, an approval guid), through which you relate the item and their respecitve approvers. Then, you fill up tables APPROVAL_TABLE, ITEM_APPROVAL_TABLE and
ITEM_APPROVAL_OBJ.
These functions work together. I don't exactly what your approval determination requirements are, but I can give you a little example, just a piece of the coding I had to go through when attending a customer recently:
METHOD if_ex_bbp_wfl_approv_badi~get_remaing_approvers.
DATA:
ls_header TYPE bbp_pds_sc_header_d,
tables for different approval criteria
lv_call_crit1 TYPE bbp_wfl_app_criterion,
lv_call_value1 TYPE bbp_wfl_app_property,
local help variables
lv_guid TYPE crmt_object_guid,
item fields and structures
ls_item TYPE bbp_pds_sc_item_d,
lt_item TYPE TABLE OF bbp_pds_sc_item_d,
accounting structures
ls_account TYPE bbp_pds_acc,
lt_account TYPE TABLE OF bbp_pds_acc.
DATA: ls_approver TYPE bbp_wfl_approval_table_badi.
DATA:
v_lin TYPE i ,
w_group TYPE i,
w_level TYPE swh_numc10,
w_index LIKE sy-tabix,
t_approval TYPE bbpt_wfl_approval_table_badi,
t_item_app TYPE bbpt_wfl_item_approval_badi,
t_item_obj TYPE bbpt_wfl_item_approval_obj.
Business objects (local)
CONSTANTS:
c_po TYPE crmt_subobject_category_db VALUE 'BUS2201',
c_shop TYPE crmt_subobject_category_db VALUE 'BUS2121',
c_contract TYPE crmt_subobject_category_db VALUE 'BUS2000113'.
CONSTANTS:
c_code TYPE bbp_wfl_app_criterion VALUE 'CODE'.
CASE object_type.
WHEN c_shop. " shopping cart
get the details of the shopping cart
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_object_id = object_id
IMPORTING
e_header = ls_header
TABLES
e_item = lt_item
e_account = lt_account.
...... Determine the approvers
loop while approval level number is not reached
Important. Do not change actual_approval_index_directly
IF actual_approval_index <= 1 .
w_level = 1.
ELSEIF actual_approval_index <= 2 .
w_level = 2.
ELSEIF actual_approval_index <= 3 .
w_level = 3.
ELSEIF actual_approval_index >= 4 .
w_level = 4.
ENDIF.
WHILE w_level <= 3.
LOOP AT lt_item INTO ls_item WHERE del_ind IS INITIAL. " AND deduct_ind IS INITIAL.
CALL FUNCTION 'ZBBP_WFL_DIN_ITEM_APPROVAL_GET'
EXPORTING
sc_guid = ls_header-guid
item_guid = ls_item-guid
approval_index = w_level
approval_description = text-001
hide_items_not_responsible = 'X'
criterion1 = c_code
value1 = ''
created_by = ls_header-created_by
TABLES
criterion = t_crit
ITEM_APPROVAL_HISTORY_TABLE = ITEM_APPROVAL_HISTORY_TABLE
CHANGING
approval_table = approval_table
item_approval_table = item_approval_table
item_approval_obj = item_approval_obj.
ENDLOOP.
IF sy-subrc <> 0 .
no_further_approval_needed = 'X'.
ENDIF.
IF actual_approval_index GE 4 OR approval_table[] IS INITIAL.
no_further_approval_needed = 'X'.
ENDIF.
ENDCASE.
Edited by: Andre Sousa on Jan 3, 2008 1:39 AM
Maybe you are looking for
-
my phone has stopped connecting to my gmail account.When I click on the mail button it opens and the a message appears that says the user name and password for "imap.gmail.com" is incorrect. My information is correct under settings I have even delete
-
How to get open production orders by plant wise
Hi, How to get open production orders by plant wise. i know from tcode COOIS, is it possible to get from this. if so what are the parameters we have to give to get open production orders by plant wise. is there any tcode or tables available , please
-
Cascading Style Sheets in JEditorPane..
I have created a Java program that displays an HTML page in a JEditorPane. The JEditorPane seems to have a problem displaying pages with internal Cascading Style Sheets. The app grabs an HTML file off my and displays it in the JEditorPane but the fil
-
Jsf headache, please help, thank you.
Dear everyone, I have made this customized jsf component. In the following, I have shown the code of the UIComponentTag codes and in the bold part, I would like to set the component id to be dojoid, which is unique id. I would like to apply component
-
I have 2 of the standard mac pro video cards. my main monitor is in port 1 and works great- the second monitor is vertically orientated and i can't get it to be recognized to Rotate: 90 degrees. (3rd and 4th monitor are another tv and standard monito