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

Headertext in BAPI_PR_CHANGE

Former Member
0 Likes
1,406

Hello!

I have to insert a headertext via BAPI_PR_CHANGE to an existing Purchase Requisition.

I was testing this BAPI while filling the table PRHEADERTEXT and the field NUMBER, but the Purchase Requisition wasn't changed.

Have I to do something more?

Kind regards!

Dennis

9 REPLIES 9
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,212

hi Dennis,

do you COMMIT after the FM call?

ec

Read only

0 Likes
1,212

Hi Eric,

I have set TESTRUN = 'X'.

Is it not enough to test the bapi and understand how it works?

Read only

0 Likes
1,212

if testrun is set, nothing will be posted, you have to take it out and do a COMMIT WORK statement after the function call (if everything is all right). If your objective is only to see if the data which you give to the BAPI is ok, than you can set testrund and check the return message.

Read only

0 Likes
1,212

I do a COMMIT WORK after the function call, but nothing happens.

Have I to fill some more fields to change the headertext with this BAPI?

Read only

0 Likes
1,212

sorry... no idea...

check the return parameter of the BAPI, if it is OK, than you have to debug...

Read only

Former Member
0 Likes
1,212

Use function module BAPI_TRANSACTION_COMMIT

after coming calling BAPI.

Read only

mh97
Contributor
0 Likes
1,212

Was this ever solved? I have encountered the same problem: I have a purchase requisition, I try to add header text with BAPI_PR_CHANGE, the return messages says requisition was updated, but the text was not updated. I do not have "test run" checked!

I have tried debugging but I could not discover what the problem is.

Has anyone here ever successfully updated purchase requisition header text with BAPI_PR_CHANGE?

Thanks,

Margaret

Read only

Former Member
0 Likes
1,212

And you ran BAPI_TRANSACTION_COMMIT after each call to the BAPI?

Rob

Read only

0 Likes
1,212

Rob,

I tried this change using Test function of SE37. Other changes I tested in SE37 were applied to the purchase requisition without separately calling BAPI_TRANSACTION_COMMIT . I confess I don't understand how I would (or why I would need to) do that.

Margaret