on 04-11-2007 2:43 PM
Hello Everybody,
Please let me know if such behaviour is correct as I do not have any other way to verify it.
We are using Classic scenario. In SRM we have two purch. groups which have a function 'purchasing group' and are 'connected' with pur. groups from backend. We did not assign any product reponsibilities as buyers from both groups can order all products. I would expect, that when I transfer purchase requisition from the backend, system will assign it for sourcing to the right purchasing group in SRM: SRM purch. group = purch. req. line purch. group . In my case it always assigns the same purch. group. I have no idea why. Both are ok because if I remove the group from SRM then the whole sourcing goes to the other one.
Please advise. I will grant point for usefull answers.
kind regards,
Robert
Hi
<b>Yes correct behaviour... By default, SAP picks up the first Purchasing Group. It is standard functionality.</b>
<u>You can use the standard function module ->
<u>CALL FUNCTION 'BBP_OM_DETERMINE_RESP_PGRP'</u>
inside BBP_DOC_CHANGE_BADI using SE18 Transaction (By creating custom implementation and code your logic accordingly as per your business requirements.)</u>
<i>Please refer to this link for details.</i>
Do let me know, incase you face any issues.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
I am facing an issue whcih is related to Robert 's query....hence updating this thread....
We are running on SRM 5.0(SP6)...When i transfer the PR's from the R/3 backend system to SRM,I want to change the Purchasing group in the SC created by using the Product category value whcih comes from the external PR.
As understood from Atul's reply,the Purcshing group picked up is the First Purchsaing group available....But my query is that when i run the report "BBP_EXTREQ_TRANSFER",then the Purchasing group picked up is of the RFC user or the R/3 user who is executing the program.
I can use the BADI "BBP_PGRP_FIND" for this.
Now my query is that when i assign the responsible Purchasing group in the ORg structure based on the Product category,in the BADI based on the Product category value in the Incoming PR,i want to set the resposnible Purchasing group from the ORG structure......
Is there any function module whcih gives me the <b>responsible pur Group</b> value based on the Product Category value....??
The FM BBP_OM_DETERMINE_RESP_PGRP gives the <b>Purchasing Org</b> Value based on the <b>Product Category</b> while I want the <u><b>Purchasing group</b></u> value....
BR,
Disha.
Hello Again,
I was able to implement BADi BBP_DOC_CHANGE_BADI with method BBP_SC_CHANGE but it still goes to the wrong group(default one). I checked that the pur. gr. in shopping cart is changed as it should (in BBP_PDBEI table) but still in sourcing it goes to the default one.
1. Please help me, what else I should change?
2. Where the information is kept about current purchasing group(as visible in sourcing cockpit)?
I will reward points for usefull answers.
kind regards,
Robert
Hi
Try this sample code.
METHOD if_ex_bbp_doc_change_badi~bbp_sc_change.
data:
ls_header TYPE bbp_pds_sc_header_d,
ls_item TYPE bbps_sc_item_badi,
ls_orgdata TYPE bbp_pds_org,
ls_purch_grps TYPE bbps_om_pgr_light,
lt_purch_grps TYPE TABLE OF bbps_om_pgr_light INITIAL
SIZE 5.
*--- Get the shopping cart header details
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = is_header-guid
IMPORTING
e_header = ls_header.
* Map header data
MOVE-CORRESPONDING is_header TO es_header.
* Map Item data
LOOP AT it_item INTO ls_item.
APPEND ls_item TO et_item.
ENDLOOP.
et_orgdata[] = it_orgdata[].
* For every purchasing organization, get the corresponding
* purchasing group assigned in the Organization structure
CALL FUNCTION 'BBP_OM_FIND_PURCH_GRPS_BEI'
EXPORTING
read_purch_org = 'X'
IMPORTING
pgrp_tab_ext = lt_purch_grps.
* change the purch org id and purch grp id in et_orgdata
LOOP AT it_orgdata INTO ls_orgdata.
CLEAR: ls_item.
READ TABLE et_item INTO ls_item WITH KEY guid = ls_orgdata-p_guid.
IF sy-subrc EQ 0.
CLEAR: ls_purch_grps.
* Use ls_purch_grps to update org data based on changed purch org
LOOP AT lt_purch_grps INTO ls_purch_grps.
IF ls_purch_grps-purch_orgx+10(4) EQ ls_item-be_pur_org AND
ls_purch_grps-purch_grpx+10(3) EQ ls_item-be_pur_group.
ls_orgdata-proc_group_ot = ls_purch_grps-purch_grp-otype.
ls_orgdata-proc_group_id = ls_purch_grps-purch_grp-objid.
ls_orgdata-proc_org_resp_ot = ls_purch_grps-purch_org-otype.
ls_orgdata-proc_org_resp_id = ls_purch_grps-purch_org-objid.
ls_orgdata-proc_org_ot = ls_purch_grps-purch_org-otype.
ls_orgdata-proc_org_id = ls_purch_grps-purch_org-objid.
MODIFY et_orgdata FROM ls_orgdata TRANSPORTING proc_group_ot
proc_group_id
proc_org_resp_ot
proc_org_resp_id
proc_org_ot
proc_org_id
WHERE guid = ls_orgdata-guid.
EXIT.
ENDIF.
ENDLOOP.
ENDIF. " if sy-subrc eq 0 --> read table et_item
ENDLOOP. " loop at it_orgdata into ls_orgdata
ENDMETHOD.
Regards
- Atul
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.