07-22-2008 12:22 PM
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?
07-22-2008 12:27 PM
Hi checked the bapi in se37. But it is not available. Is the bapi name is right?
07-22-2008 12:32 PM
Put 'X' for both
wa_pritemx-preq_item = 'X'
wa_pritemx-req_blocked = 'X'.
APPEND wa_pritemx TO it_pritemx.
07-22-2008 12:38 PM
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
07-22-2008 1:04 PM
I am asking you to put 'X' in wa_pritemx not in wa_pritem
wa_pritemx-preq_item = 'X'
07-22-2008 1:14 PM
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,
08-12-2008 7:44 AM
07-22-2008 12:36 PM
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
07-22-2008 1:03 PM
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...
07-22-2008 12:37 PM
Hi,
problem may be due to test data...
so test the bapi in se37..with the test data & check...
07-22-2008 12:44 PM
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.
07-22-2008 12:57 PM
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?