on 05-28-2007 10:44 AM
Hi,
I am new to SRM, i am working on BBPSC03 and in this tcode, i am working for shopping cart. My requirement:
While creating shopping cart items, i will be entering the vendor for one item thru "Source of supply/service agents" and when i create a new item without entering the vendor, previous vendor shud reflect for the created item also. I have made changes in method: IF_EX_BBP_DOC_CHANGE_BADI~BBP_SC_CHANGE.
Right now i am getting the error as :"Enter no more than one partner of type Goods Recipient". Please help me in this issue.
Regards
Kannaiah
Solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can any one throw light on this.
Regards
Kannaiah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the response. I have created order thru web interface and also in R/3, in which there is no source of supply. Order was created successfully. But when i have written the logic for assigning the same vendor for the another item also, it is throwing the error. Check the logic given below:
*If SRM users entered preferred vendor for only one line item in a shopping cart which has more than one line items,
populate the preferred vendor for the rest of line items.
data: l_fill_item type i,
l_fill_part type i,
ls_partner1 like ls_partner.
*- Num of items in the shopping cart
describe table IT_ITEM lines l_fill_item.
describe table it_partner lines l_fill_part.
if l_fill_part = 5.
CLEAR ls_partner1.
read table it_partner index 5 into ls_partner1.
export vendorid from ls_partner1-PARTNER_ID to memory id 'VEND'.
endif.
*- Get Number of entries in the partner table. For each item by default the it_partner populates with 4 records .
After selecting the vendor, 5th entry will be added.
if l_fill_item > 1.
l_fill_item = l_fill_item * 5.
*- If the num of records in the partner table is less than (no of items * 5), insert the record at the index (no of items * 5).
if l_fill_part LT l_fill_item.
l_fill_item = l_fill_item / 5.
clear ls_item.
*- Read item at index l_fill_item
read table IT_ITEM index l_fill_item into ls_item.
if sy-subrc = 0.
ls_partner-P_GUID = ls_item-GUID.
*- Import the vendor for the first item and set this as default vendor for all the items
Import vendorid to ls_partner1-PARTNER_ID from memory id 'VEND'.
ls_partner-PARTNER_FCT = '00000039'.
ls_partner-PARTNER_GUID = '00000000000000000000000000000002' * l_fill_item.
ls_partner-PARTNER_ID = ls_partner1-PARTNER_ID.
append ls_partner to it_partner.
clear ls_partner.
endif.
endif.
endif.
*
Regards
Kannaiah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.