on 09-02-2010 7:37 PM
Hi,
I have a scenario to control the restart of the BRF SC worklfow only if price of the document is changed while in awaiting
approval state.
I implemented the BADI /SAPSRM/BD_WF_PROCESS_RESTART, but unfortunately the behaviour of BADI is not at all supporting to restart the workflow based on the condition.
I noticed the behaviour of triggerring of this BADI as follows
When in awaiting approval state the requestor can change the document.
1. Once click on EDIT BADI gets triggered
2. after changing the document values once Order clicked it will be called twice.
Is it normal behaviour or is there any problem in my custome SRM system?
If this is normal, can you please guide how to implement this BADI?
Can you provide your experience on this BADI?
Deeply appreciate the your help.
Thanks & Regards,
Yaseen M
First check whether your BADI Z implementation is active..
I advice to implement the logic under "VALIDATE_RESTART" method which makes more sense..
But the problem is I don't find any concrete logic to code because SC will not create versions like PO or Bid document dose..
All the changes are simply stored in a change document table, If a SC changed more than once then you will find multiple entries in the table as a result you can't validate only for price field here :-(..
Thanks!!
Bharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharat,
The main problem is not with extracting price condition values, it can be done by choosing the latest counter in the change table.
But my issue with BADI triggering twice for a single click of Order. Due to this the change table values are getting updated with the new values in the second call and BADI condition always fails and cant control the restart using this BADI.
First of all I want to know whether this behaviour is right and second one is if it is right, how to control this BADI to check our conditions.
Thanks,
Yaseen M
Here is the logic.. this works perfect for me..
DATA:
Internal Table to hold Shopping Cart Item details ...
lt_item_detail TYPE bbpt_pd_sc_item_d,
Internal Table to hold Shopping Cart Item Master table details ...
lt_PDIGP_master TYPE BBP_PDIGP,
Work Area to hold Shopping Cart Item details ...
lt_item_detail_line LIKE LINE OF lt_item_detail,
Work Area to hold shopping cart details ...
lwa_sc_header TYPE bbp_pds_sc_header_d.
Fetch Shopping Cart Item details ...
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = is_document-document_guid
i_with_itemdata = 'X'
IMPORTING
e_header = lwa_sc_header
TABLES
e_item = lt_item_detail.
Loop at lt_item_detail into lt_item_detail_line.
SELECT *
from BBP_PDIGP into lt_PDIGP_master
Where GUID = lt_item_detail_line-GUID.
ENDSELECT.
IF lt_item_detail_line-QUANTITY GT lt_PDIGP_master-QUANTITY.
EV_RESTART = ''.
ELSE.
EV_RESTART = 'X'.
ENDIF.
ENDLOOP.
Thanks!!
Bharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.