on 09-18-2009 10:04 AM
Hello All,
After adding the required items in to cart , then comes the selection on the vendor .The selection of vendor can be from the assigned one's or can be given in the preferred vendors .Iif the vendor is selected from assgned vendor a PO is created, but if the preferred vendor is given a Purchase requisition is created,
My requitement is i want a PO to be generated, also when preferred vendor is selected.
are there any badi's through which i can accomplish this or any other way.
thank you in advance.
with regards,
sandeep akella..
I have got the solution by implementing this piece of code in the method BBP_SC_CHANGE of BADI BBP_DOC_CHANGE_BADI
DATA: ls_item_d TYPE bbp_pds_sc_item_icu,
ls_item_u TYPE bbps_sc_item_badi,
ls_account_d TYPE bbp_pds_acc,
ls_account_u TYPE bbps_acc_badi,
ls_partner TYPE bbp_pds_partner.
Initialization
Fill all export structure and tables
MOVE-CORRESPONDING is_header TO es_header.
LOOP AT it_item INTO ls_item_d.
MOVE-CORRESPONDING ls_item_d TO ls_item_u.
APPEND ls_item_u TO et_item.
ENDLOOP.
LOOP AT it_account INTO ls_account_d.
MOVE-CORRESPONDING ls_account_d TO ls_account_u.
APPEND ls_account_u TO et_account.
ENDLOOP.
et_orgdata[] = it_orgdata[].
et_partner[] = it_partner[].
et_hcf[] = it_hcf[].
et_icf[] = it_icf[].
Change partner function from preferred vendor to assigned vendor
LOOP AT et_partner INTO ls_partner.
IF ls_partner-partner_fct = '00000039'.
ls_partner-partner_fct = '00000019'.
MODIFY et_partner FROM ls_partner INDEX sy-tabix.
ENDIF.
ENDLOOP.
Note:
set the filter value to BUS2121(Object type EBP Shopping Cart), as we need to work the functionality for SC.
There is no need to consider SY-UCOMM status, as for each change in SC like add to sc etc an updation takes place(storing in temp tables), this badi is called and the values need to be updated every time into the tables.We can not change the values for only pertaining to certain conditions , at that time we get an error 'CAN NOT CHANGE PARTNER FUNCTION'.
Edited by: sandeep akella on Sep 25, 2009 8:25 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is the sourcing setting for that product category?
understand that you are in classic
without source of supply setting is there it will go to cockpit for vendor assignment since prefered vendor is not consider as source of supply.
if you dont have sourcing settings
it will create a PR since partner function 39
prefered vendor has partner function 39 fixed vendor is 19.
so you need to swap 39 to 19, then po will be created if you assig prefered vendor.
doc change badi - sc change method helps.
many discussions are available in the forum search thrice..you will get everything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
source category for that product category is not maintained. so i think we will get the partner function for that item as 39 which we need to swap as 19 in the implimentation of method BBP_SC_CHANGE in badi BBP_DOC_CHANGE_BADI...i am asking this as i can not test it by debugging n i need to be very sure before i make changes.
thank you
with regards,
sandeep akella.
Hello Muthuraman,
I have implemented the BADI BBP_DOC_CHANGE_BADI for method BBP_SC_CHANGE.but while i am creating order with prefered vendor i am still getting a PR instead of PO.
Are ther any more change i need to make.
i have refered to links
with regards,
sandeep akella
hello muthuraman,
thank you for the reply.
Definition of objects in backend system are
there are many entries.in each entry
Purchasing group is specified.
Category ID is maintained as '*'
source syst. is maintained.
internal procurement : Always External Procurement.
External procurement : Purchase order if data is complete, otherwise PR
with regards,
sandeep akella.
hello Muthuraman,
The badi is getting called in the part of code. But i am getting 4 records in the import parameter IT_PARTNER of the BADi, with partner function as 75,27,20,16.there is no trace of partner func. with 39.
I have checked in 'Partner Functions'
for function : 19 function type is 12(Vendor) and
for function : 39 function type is 26(Preferred Vendor)
these are the partner functions i am getting when i am debugging
function Function type
00000075 0031-Location
00000027 0017-Ship-To Address
00000020 0002-Goods Recipient
00000016 0013-Requester
I am not getting function 19
with regards,
sandeep akella.
Edited by: sandeep akella on Sep 23, 2009 1:03 PM
Hello muthuraman,
i am going till the end but i am getting an error message stating 'SRROR IN SYSTEM: SHOPPING CART CAN NOT BE PROCESSED FURTHER' as windows popup and in the messages tab of the screen i am getting 'PARTNER FUNCTION MAY NOT BE CHANGED' . After i press ok for windows popup, the system automatically goes to home page.
what more settings i need to change.
with regards,
sandeep akella.
in BADI BBP_CREATE_PO_BACK has a method FILL_PO_CREATE1_INTERFACE. This method has a parameter CV_NEW_PO_CREATE can we create by setting this parameter when preffered vendor is given.
I am using SRM 4.00.
with regards,
sandeep akella
Edited by: sandeep akella on Sep 18, 2009 12:51 PM
Edited by: sandeep akella on Sep 18, 2009 12:53 PM
Edited by: sandeep akella on Sep 18, 2009 1:18 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
How about BBP_TARGET_OBJTYPE BADI and BBP_CREATE_BE_PO_NEW BADI ?
or
BBP_DOC_CHANGE BADI to assign fixed vendor.
Regards,
Masa
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.