Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_REQUISITION_GETITEMS not returning data where a requisition exists.

Former Member
0 Kudos
270

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

3 REPLIES 3

former_member657499
Participant
0 Kudos
88

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.

0 Kudos
88

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.

Former Member
0 Kudos
88

Populated struture BAPIEBANV manually by selecting data from EBAN and then mapping the fields between the two structures instead.