Application Development and Automation 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: 
Read only

BAPI_PR_CREATE Issue.

keyur_pawar
Active Participant
0 Likes
975

Hello friends,

Can any one guide me,

How to handle, BAPI:  BAPI_PR_CREATE.

What should I pass in,  PRHEADER,  PRHEADERX, PRITEM,  PRITEMX or  any other table.

Please help me.

Try to provide sample code for this issue.....

I tried so much but, i m unable to create Purchase requisition through above BAPI.

Thanks & Regards,

Keyur Pawar

1 REPLY 1
Read only

PatrickDean
Participant
0 Likes
452

Okay, so the following is overkill a little, but this created new PReqs for me, based on EBAN entries that were already there in the database.

Our requirement was to copy existing PReq Lines and consolidate them into 1 big PReq with lots of lines.

Top Tips:

You need the PRITEMX table to be populated, same as you would for a CHANGE BAPI.

Document Header structure needs populating at least with document type (BSART)

Have a look at the contents of table EBAN on your database to get an idea for what's being populated.

Admittedly what I'm doing here is cheating a little, because I'm copying, rather than flat out creating PReq Line Items.

I'd recommend copying the attached, using a select statement on EBAN to populate the t_items table, and seeing if that creates new PReqs.

Once that's been done, you can start populating with your own new lines data, rather than the existing data, and take out unnecessary data assignments.

Good luck with it.