cancel
Showing results for 
Search instead for 
Did you mean: 

Plz adviseApply validation to enforce one purchasing grp per Cart in SRM3.0

Former Member
0 Kudos

HI Experts,

My query is to Applying a validation to enforce one purchasing grp per Cart . ...

Now user is able create a shopping cart with multiple Purchaging group but my requirement is to restrict the user create a shopping with multiple purchasing groups. and it has to change the remaining items with the first occuring purchasing group value ....

When the user creates a cart with Multiple Purchasing groups for diff items ... then it has to consider the first item purchasing group and change the remaining items purchasing groups with the first item Purchasing group...

Please let me know the Badi to achive this functionality ... and the code ..

This iwll be rewarded if my requirement is resolved ...

I've tried in badi BBP_DOC_CHANGE_BADI - BBP_SC_CHANGE but it is not working ... it is triggering the warning message but the values are not getting changed...

DATA: w_item TYPE bbps_sc_item_badi,

v_ekgrp TYPE ekgrp.

LOOP AT et_item INTO w_item.

IF sy-tabix = 1.

v_ekgrp = w_item-be_pur_group.

ENDIF.

IF v_ekgrp IS NOT INITIAL.

IF w_item-be_pur_group NE v_ekgrp.

w_item-be_pur_group = v_ekgrp.

MODIFY et_item FROM w_item TRANSPORTING be_pur_group

WHERE be_pur_group NE w_item-be_pur_group.

IF sy-subrc EQ 0.

MESSAGE w027(z00)." INTO ls_message-message.

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.

Thanks in advance ....

Edited by: hari prasad on Jun 30, 2010 6:19 AM

Edited by: hari prasad on Jul 1, 2010 6:18 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Hari,

The badi and method is correct . You will have to modify the table ET_ORGDATA for your requirement. Also good to chnage the ETI_ITEM-BE_PUR_GROUP.

Cheers

Iftekhar alam