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_TRANSACTON_ROLLBACK not working on 'BAPI_REQUISITION_CREATE'

Former Member
0 Likes
561

Hi SAP Pundits,

I really appreciate it if you can help me get over this hurdle...

I am able to successfully create a Purchase Requisition using the 'BAPI_REQUISITION_CREATE'.

Now there are situations where I only have to validae a PR creation...so, I post the PR and if it is successful, I want to rollback the created PR and send an outbound message that 'PR can be created'.

However, the rollback is not working....here is the code

CALL FUNCTION 'BAPI_REQUISITION_CREATE'

.....

ENDFUNCTION.

IF PR creation is successful.

CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.

RETURN = BAPITRET2

ENDFUNCTION.

(Rollback is not working and the PR is saved in the system)

2 REPLIES 2
Read only

Former Member
0 Likes
453

How ur saying that, its not working? is "1" is "consuming" the system from the # range? is system is going "advance" 1 #?

""Rollback is not working and the PR is saved in the system""

how both works simulteneously?? at any given point only one either commintting work to DB or rolling back will work, right?

anyways, post ur piece of code, for a quick response.

thanq

Edited by: SAP ABAPer on Feb 8, 2009 9:34 PM

Read only

Former Member
0 Likes
453

I think I have the answer for this one. Thanks eveyone!