Skip to Content
author's profile photo Former Member
Former Member

BAPI_PR_CHANGE

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 11:27 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 11:32 AM

    Put 'X' for both

    wa_pritemx-preq_item = 'X'

    wa_pritemx-req_blocked = 'X'.

    APPEND wa_pritemx TO it_pritemx.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 11:36 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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...

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 11:37 AM

    Hi,

    problem may be due to test data...

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 22, 2008 at 11:44 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.