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_PR_CREATE

Former Member
0 Kudos

HI,

Iam trying to create Purchase Requisition using BAPI_PR_CREATE in 4.7 system. If data populated is correct

the BAPI is creating PR.if any data populated is incorrect , the bapi is not returning any error message in return parameter.could any body let me know how to get error messages in 4.7 system

thanks in advance,

prasanna kumar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi ,

check BAPIMEREQHEADER stuructre which returns from bapi

if this field is not PREQ_NO initial the u can write u r message

~linganna

6 REPLIES 6

Former Member
0 Kudos

hi..

Paste your code part of calling this BAPI for further analysis.

Former Member
0 Kudos

Please check the RETURN (type BAPIRET2) table contents coming from the BAPI.

Updated part: Even if you are testing in se37 or you are processing through report or from front end portal

you get all messages in RETURN table only...

Regards,

Lalit Mohan gupta

Former Member
0 Kudos

u can read the return table from the BAPI

read table return with key TYPE NE 'S'.

write : return-message.

Former Member
0 Kudos

hi ,

check BAPIMEREQHEADER stuructre which returns from bapi

if this field is not PREQ_NO initial the u can write u r message

~linganna

0 Kudos

HI all,

thanks for your response.

See my question is iam testing the bapi in se37, how can i see the errors in return parameter if data passed in incorrect, for ex: iam passing material as XYZ which is not maintained in DB table. This bapi should throw error that material entered is incorrect. Iam at testing level only in se37.

regards

prasanna kumar

Former Member
0 Kudos

in se37, menu bar FM--> Test --> test Seequences . here give ur bapi name & below that bapi_transaction_commit.click on execute. fill in all the required field in header & item structures. then execute.then pres back give 'X' for wait in bapi transaction commit execute & then come back.

now if u goto me53n, ur PR wud be displayed.

Before executing bapi_tr_commit, u have to get messages in return paramter..

if u r not getting anything in return parameter, then debug the FM.

Thanks,

Manjunath MS