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_CHANGE

Former Member
0 Kudos

Hello Guru's,

I want to update a field called EBAN-BLKCD

So I use the following code:

wa_pritem-preq_item = eban-bnfpo.

wa_pritem-req_blocked = tp_blckd.

APPEND wa_pritem TO it_pritem.

wa_pritemx-preq_item = eban-bnfpo.

wa_pritemx-req_blocked = 'X'.

APPEND wa_pritemx TO it_pritemx.

break nly33460.

  • * UPDATE EBAN TABLE

CALL FUNCTION 'BAPI_PR_CHANGE'

EXPORTING

prnumber = eban-banfn

TABLES

return = it_return

pritem = it_pritem

pritemx = it_pritemx.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

I even get a ' COMMIT WORK executed by system' but the update is not done. What is going wrong?

11 REPLIES 11

Former Member
0 Kudos

Hi checked the bapi in se37. But it is not available. Is the bapi name is right?

Former Member
0 Kudos

Put 'X' for both

wa_pritemx-preq_item = 'X'

wa_pritemx-req_blocked = 'X'.

APPEND wa_pritemx TO it_pritemx.

0 Kudos

Hello,

I have the bapi in my R3 system so it's there. You cannot mark preq_item with an 'X' because that is the item you want to update, it must be the number. I have tried it though but without result.

Best regards

0 Kudos

I am asking you to put 'X' in wa_pritemx not in wa_pritem

wa_pritemx-preq_item = 'X'

0 Kudos

Hi,

It doesn' t work to put in an ' X' for wa_pritemx-preq_item, because it's not a flag you set. It's of the type BNFPO and needed to point to which record you want to update. I did try it though without any result.

Best regards,

0 Kudos

The eban field is not updatable via a FM.

Former Member
0 Kudos

Hi

The fm are presnt you have not given the mandatory import export parameters which are need to be given for the fm to work properly.Please give that

Regards

Divya

0 Kudos

Hi,

Which mandatory import and export parameters do I need to fill in?

Because when I select my FM (control+F6) then I see that only one parameter is mandatory and that is prnumber, see below:

CALL FUNCTION 'BAPI_PR_CHANGE'

EXPORTING

prnumber =

  • PRHEADER =

  • PRHEADERX =

  • VERSIONS =

  • SKIP_ITEMS_WITH_ERROR =

  • TESTRUN =

  • TABLES

  • RETURN =

  • PRITEM =

  • PRITEMX =

  • PRITEMEXP =

  • PRITEMSOURCE =

  • PRACCOUNT =

  • PRACCOUNTPROITSEGMENT =

  • PRACCOUNTX =

  • PRADDRDELIVERY =

  • PRITEMTEXT =

  • PRHEADERTEXT =

  • PRLIMITS =

  • PRCONTRACTLIMITS =

  • PRSERVICES =

  • PRSRVACCESSVALUES =

  • PRSERVICESTEXT =

  • EXTENSIONIN =

  • EXTENSIONOUT =

  • ALLVERSIONS =

.

Hope someone can help me out with this...

Former Member
0 Kudos

Hi,

problem may be due to test data...

so test the bapi in se37..with the test data & check...

sujeet2918
Active Contributor
0 Kudos

Hi,

Please Use Commit Work where you are finally Modifying your table and if sy-subrc = 0.

Commit work and wait.

else Rollback work.

Because one your last record is posted then it will insert your next record.But Use At the time of finaly modifying the tables.

reward point if it works.

0 Kudos

This function module CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' is committing al the work so there is no need to put in a commit statement myself.

Anyone other some idea's?