on 06-17-2015 3:02 PM
Hi All,
Our SRM system is 702 (SP level 10).
I know that BADI BBP_DOC_CHANGE_BADI will be used for enhancing the change in the delivery address records.
I have checked here the existing threads for reference and noticed that the FM BBP_PD_SC_GETDETAIL is used to change the address number.
When I checked this with my system, the given FM doesn't exist and when I debugged this Badi I have seen that only the change line item is fetching/calling to this Badi program (IT_PARTNER) and no other line items are retrieved to edit the field (whereas all the line items are retrieved for cost center change).
Requirement is that it is an one time activity that the user will modify the first line item of the Delivery address record manually and the same value will be updated to other corresponding items. I want your help that what is the other FM can be used or the possibility way to modify the new value to all items.
Also please confirm me the component, view name are correct as in the attachment and provide me the method to enhance and it is a post-exit enhancement or not.
Thanks & Regards,
Hi Everyone,
There is no one here to guide me or answer that whether my post is upto your understanding or not.
If it is not clear , I will try update it again clearly.
Please guide.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I don't think that you will get a simple reply to your post because this issue cannot be solved with a BADI implementation. I had a similar problem some time ago - the requirement was to change something in all PO items after a field on the PO header was set. But I'm pretty sure that works similar for Shopping Carts.
The problem can be solved if you make sure the relevant or even all items are passed to the Change BADI. Class /SAPSRM/CL_PDO_UPDATE_BUFF_SC method PREPARE_PD_UPDATE controls which items are passed to the update function of the SC. An implicit enhancement at the beginning of that method that makes sure that MS_BUFFER-items contains all items you need to change would solve the issue.
Here's an example for POs that only kicks in if no items are present. You need to translate this to the Shopping Cart data structures and maybe it should have a different logic to populate MS_BUFFER-ITEMS:
data: ZZ_ITEMS type bbpt_pd_item,
ZZ_ITEM type bbp_pds_item,
ZZ_items_po TYPE bbpt_pd_po_item_icu,
ZZ_item_po TYPE bbp_pds_po_item_icu.
field-symbols:type bbp_pds_header.
if ms_buffer-items is initial.
* Get header out of attribute
ASSIGN ms_buffer-header->* TO.
if sy-subrc = 0.
CALL FUNCTION 'BBP_PROCDOC_GETDETAIL'
EXPORTING
I_GUID =-guid
TABLES
E_ITEM = zz_items.
loop at zz_items into zz_item.
MOVE-CORRESPONDING zz_item to zz_item_po.
append zz_item_po to zz_items_po.
endloop.
if sy-subrc = 0.
GET REFERENCE OF zz_items_po INTO ms_buffer-items.
endif.
endif.
endif.
But let me warn you: Even though this would be an implicit enhancement it is absolutely the same as a modification. It would need very thorough testing and there is no guarantee that it will work in future releases as well. But this is the only way I have found to make sure the items I need are passed to the Change BADI.
Regards
Oliver
Hi Friends,
Anyone can help me here
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.