on 04-21-2011 7:04 PM
Dear Friends
I am using SRM 7.0.
I want to check the "Default Settings" when a Shopping Cart item(s) is created.
User can set default settings before creating SC, for example, Product Category and Product Group.
I need help with following.
When a SC item is created, I want to check the Product Category entered by the user in SC line item and if the entered Product Category is different from the default setting of Product Category then I donu2019t want the Product Group defaulted.
I can probably use BBP_DOC_CHANGE_BADI to do this check and blank out the Product Group.
But, how do I check or get the "Default Settings" during SC item creation, in this BADI?
Thank you very much in advance for any help or suggestion.
Acharya
Hello,
I am not sure if this will be possible.
Data stored in default settings is usually taken from defaults set in PPOMA or account tables. However, product categories are taken from the latest used.
Kind regards,
Ricardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ricardo and Deviprasad
Thank you both for quick response. They are useful answers but would not help with what I am trying to do. May be my question is not clear enough.
The Default setting are initially loaded from PPOMA attributes but a user can change them temporarily just before creating a SC. These changes are not saved in the PPOMA but are just loaded in buffer.
I want get the Default setting from this buffer.
For example, in the Default Setting user has following values set:
Product category: Matl00001
Product Group: PGRP1
When the user creates a new SC line item, he enters Product category Matl00002.
Currently the material group PGRP1 will be defaulted.
I want to stop this from happening. The product group PGRP1 should only be defaulted if the SC line item has Material category of Matl00001 (same as in Default settings).
I am looking forward to any other suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In change badi you can check the item is created newly and then you can check the prodct category.
paste the below code in the change badi and then accordingly make u r changes
DATA: lo_item TYPE REF TO /sappssrm/if_item,
lo_factory TYPE REF TO /sappssrm/if_instance_factory.
CALL FUNCTION '/SAPPSSRM/BO_BASE_FACTORY'
IMPORTING
eo_factory = lo_factory.
lo_item ?= lo_factory->lookup_srm_guid( <xs_item>-guid ).
IF lo_item IS NOT BOUND . " if it is not bound then it is a new item in the Shopping cart.
" New item then check the prodct category....
else.
" Existing item then no need to clear prodct category
endif.
Regards,
Deviprasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.