on 10-11-2009 8:03 AM
Hi Experts,
When i create a Shopping Cart in SAP SRM, FM BAPI_CREATE_REQUISITION gets called in the backend system ( SAP R/3 ) to create a Purchase Requisition.
Now i want to call a different FM in backend system. So i did following steps
1) Created a Z Function Module in backend system which i want to call.
2) Created an implementation of BADI BBP_DRIVER_DETERMINE in SRM and put the following code in that implementation.
CASE functionname.
WHEN 'BAPI_CREATE_REQUISITION'.
functionname = Step 1 FM.
Endcase.
But still , in back system ( R/3), BAPI_CREATE_REQUISTION gets called and not my Z-FM.
Any thoughts on this as to where i am missing anything. Any help will be highly appreciated.
Regards
Charitha
The FM called to create PR in the Backend is BAPI_REQUISITION_CREATE.
Try this.
Create an implicit enhancement point in class CL_BBP_BS_ADAPTER_RQ_CRT_470 and method CREATE_DOCUMENT with condition so that, it should not affect the standard functionality.
CL_BBP_BS_ADAPTER_RQ_CRT_470- CREATE_DOCUMENT is the final step in SRM, which call the RFC BAPI_REQUISITION_CREATE. Please check it.
Regards,
Deepthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Charitha,
please look at the table BBP_FUNCTION_MAP, and execute it with the parameters:
Objekttype BUS2105, Method CreateFromData1. You will get the result:
Adapter
CL_BBP_BS_ADAPTER_RQ_CRT_470
CL_BBP_BS_ADAPTER_RQ_CRT_470
CL_BBP_BS_ADAPTER_RQ_CRT_470
CL_BBP_BS_ADAPTER_RQ_CRT_NOR3
CL_BBP_BS_ADAPTER_RQ_CRT_31I
CL_BBP_BS_ADAPTER_RQ_CRT_31I
CL_BBP_BS_ADAPTER_RQ_CRT_40B
CL_BBP_BS_ADAPTER_RQ_CRT_45B
CL_BBP_BS_ADAPTER_RQ_CRT_45B
CL_BBP_BS_ADAPTER_RQ_CRT_46C
CL_BBP_BS_ADAPTER_RQ_CRT_470
With the BAdI BBP_DRIVER_DETERMINE you can overwrite these adapters. So in case you have the backend release ERP_1.0, then the CL_BBP_BS_ADAPTER_RQ_CRT_470 will be assigned by default.
If you call this driver CL_BBP_BS_ADAPTER_RQ_CRT_470 in the SE24, doubleclick into the method CREATE_DOCUMENT. There you will see how the BAPI_REQUISITION_CREATE is called.
But now back to your question, you have two option
- if you use the BAdI BBP_DRIVER_DETERMINE, you need to copy the CL_BBP_BS_ADAPTER_RQ_CRT_470 (or other one, depending on the release of your backend system) e.g. into Z_CL_BBP_BS_ADAPTER_RQ_CRT_470. In the CREATE_DOCUMENT of your method Z_CL_BBP_BS_ADAPTER_RQ_CRT_470 you can change the BAPI_REQUISITION_CREATE to something else.
- you can modificate directly the CL_BBP_BS_ADAPTER_RQ_CRT_470, that it calls your user defined BAPI.
Regards,
Peter
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.