cancel
Showing results for 
Search instead for 
Did you mean: 

Shopping Cart & Purchase Requisition

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

peter_novoth
Active Contributor
0 Kudos

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