cancel
Showing results for 
Search instead for 
Did you mean: 

Call BAPI_REQUISITION_CREATE from EBP.

Former Member
0 Kudos

Hi all,

I have make a copy from BAPI_REQUISITIO_CREATE, in order to call it in test mode to control the R/3 checks, this BAPI makes, before SC is ordered.

Now I have to get the fields to inform the BAPI, somebody knows where the standard process call this function to create a Requisition Purchase to see how it is populated?

Thx,

Su

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Suzor,

this is an interesting approach.

Document creation simulation is already existing for GR, IV (in SRM 5.0), PO maybe (BAPI_PO_CREATE1 has a simulation mode), but not for Requisitions.

To implement this, you should use the BADI BBP_DOC_CHECK_BADI, and when IV_SAVE = X, you execute your simulation.

Do execute your simulation (this is where), you will first have to simulate the transfer of SC items, to determine if you create a RS, PR or a PO and how SC items are grouped.

And then for each backend document, you will call your simulation function.

To do this, build your own META driver, and copy the standard document creation flow:

ex for a PR:

SPOOL_RQ_CREATE_DO --> copy to ZSPOOL_RQ_CREATE_SIMULATE

this FM uses SPOOL_RQ_READ_BAPI_EXPORTS to map SC items linked to this doc ID: in your case the SC items are not yet linked to a backend doc (this is done during the real transfer). So you will have to redevelop this logic.

And then call a copy of META_REQUISITION_CREATE --> ZMETA_REQUISITION_SIMULATE, with the driver logic (table BBP_FUNCTION_MAP) where you will finally call your R/3 copy of BAPI_REQUISITION_CREATE in test mode.

And of course return back the R/3 error messages if any.

Rgds

Christophe

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Suzor

Usally this BAPI is called either when SC is Ordered or if there is approval Process then the final approver approves the SC.

this is a function module while creating a SC insert a break point at Function module "BAPI_REQUISITION_CREATE"

regards,

Nimish Sheth

Do reward points for helpful answers