2010 Jun 10 2:20 PM
Hi All,
I currently using BAPI called 'BAPI_REQUISITION_GETITEMS' as a first step in changing a purchase requisition via BAPI 'BAPI_REQUISITION_CHANGE'. It works for most cases that I process in a batch but there is one specific case where for the plant number that forms part of the selection criteria the BAPI does not work and the error message returned states 'No purchase requisitions satisfying these selection criteria exist'. However I can still use the same selection criteria (i.e. Purchase requisition + plant) to view and even change the purchase requisitions details via transactions ME52N and se16.
Does anyone know what has to be in place (maybe configuration/master data) in order for the BAPI 'BAPI_REQUISITION_GETITEMS' to be able to retrieve a purchase requisition's items?
Your assistance will be greatly appreciated in a way of points.
Thank you.
Regards,
Andile
2010 Jun 21 4:56 AM
I think this is a coding issue ... anyways, to validate this don't pass Plant. Just pass requisition number and see if it pulls all PR lines from all plants. If it does then delete unwanted line items and continue with your processing.
2010 Jun 21 7:07 AM
Hi Raj,
I don't think it's merely a coding issue at all. The BAPI works for certain plant values when I pass them in combination with a requisition number but as soon as one specific plant value is passed it does not recognise the requisition at all.
So I populated the structure 'BAPIEBANV' manually by selecting the requisition's item data from table EBAN and then matched/mapped all the fields between the two structures (i.e. EBAN + BAPIEBANV). In this way it always works even for the previously defaulting plant value.
This issue therefore has been resolved.
Thank you for your response in this regard.
2010 Jun 21 7:09 AM
Populated struture BAPIEBANV manually by selecting data from EBAN and then mapping the fields between the two structures instead.