Hello all,
First, I'm completely new to ABAP/SAP so go easy on me...
I'm trying to create a purchase requisition using BAPI_PR_CREATE. I know it is easier to use BAPI_REQUISITION_CREATE and I did earlier but it didn't suit my purpose because the requirement was to create several PRs based on certain conditions on posting of a material document. It works fine when posting directly in SAP but when using batch upload, I cannot create several PRs because the program terminates after creating the first PR.
I call BAPI_REQUISITION_CREATE 3 times because of the different circumstances that the user specified. I think (and I may be wrong but I tested), the commit statement terminates it because after testing using SHDB and specifying continue after commit, the program works fine for batch.
Now I'm trying to explore using BAPI_PR_CREATE because creation via batch is mandatory. I don't know if after testing it would result to the same issue and I would need to explore other options but I'll cross that bridge when I get to it.
The problem is, I'm not able to even test BAPI_PR_CREATE. I populated the PRHEADER, PRHEADERX, PRITEM, PRITEMX, PRITEMEXP, PRACCOUNT, PRACCOUNTX tables but I'm getting error- E ME 083 Enter Valuation Price- and I have the price fields populated. (Note- for the requirement, I must be able to specify the following information - valuation price, Purchase group, MRP Controller, Account assignment, Purchasing organization, Delivery date, posting date, created by, Requisitioner, tracking number, desired vendor- depending on the material, Outlline agreement number- depending on the material and document type to be created).
When I try not using account assignment (it is required though) and removing it, I still cannot create a PR. I'm sure it is something I'm doing wrong but I cannot figure it out and I've been testing this BAPI non stop for a while now.
Any assistance would be greatly appreciated.
Thanks.