2013 Sep 23 12:14 PM
Hello experts
I want to change the plant in some requisitions.
With ME52n it is possible. But with the bapi it don't work
Is there another BAPI to chnege the plant?
Is there another way to solve this problem?
Thank you for answer
A. Bruy
2013 Sep 24 7:17 AM
Hello Annette,
Please Refer to BAPI_PR_CHANGE Suggested by Raymond & Smruti.
Here is an example:
wa_pritemx-plant = 'ABC' " Your Plant Data..
append wa_pritemx to it_pritemx.
wa_pritem-plant = 'Plant'
append wa_pritem to it_pritem.
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = lv_banfn
* PRHEADER =
* PRHEADERX =
* TESTRUN =
* IMPORTING
* PRHEADEREXP =
TABLES
return = it_change_return
pritem = it_pritem
pritemx = it_pritemx
* PRITEMEXP =
* PRITEMSOURCE =
* PRACCOUNT =
* PRACCOUNTPROITSEGMENT =
* PRACCOUNTX =
* PRADDRDELIVERY =
* PRITEMTEXT =
* PRHEADERTEXT =
* EXTENSIONIN =
* EXTENSIONOUT =
* PRVERSION =
* PRVERSIONX =
* ALLVERSIONS =
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
Hello experts
I want to change the plant in some requisitions.
With ME52n it is possible. But with the bapi it don't work
Is there another BAPI to chnege the plant?
Is there another way to solve this problem?
Thank you for answer
A. Bruy
2013 Sep 24 6:46 AM
2013 Sep 24 7:02 AM
BAPI_REQUISITION_CHANGE "Change Purchase Requisition" is related to ME52 now "outdated", BAPI_PR_CHANGE "Change Enjoy Purchase Requisition" is ME52N, use this one. (Also check notes like Note 582221 - FAQ: BAPIs for purchase orders)
Regards,
Raymond
2013 Sep 24 7:17 AM
Hello Annette,
Please Refer to BAPI_PR_CHANGE Suggested by Raymond & Smruti.
Here is an example:
wa_pritemx-plant = 'ABC' " Your Plant Data..
append wa_pritemx to it_pritemx.
wa_pritem-plant = 'Plant'
append wa_pritem to it_pritem.
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = lv_banfn
* PRHEADER =
* PRHEADERX =
* TESTRUN =
* IMPORTING
* PRHEADEREXP =
TABLES
return = it_change_return
pritem = it_pritem
pritemx = it_pritemx
* PRITEMEXP =
* PRITEMSOURCE =
* PRACCOUNT =
* PRACCOUNTPROITSEGMENT =
* PRACCOUNTX =
* PRADDRDELIVERY =
* PRITEMTEXT =
* PRHEADERTEXT =
* EXTENSIONIN =
* EXTENSIONOUT =
* PRVERSION =
* PRVERSIONX =
* ALLVERSIONS =
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
2013 Sep 24 7:39 AM
2013 Sep 24 10:28 AM
Hello
I just have some Problems of the used Table definitions:
'BAPI_PR_GETDETAIL'
PRITEM = BAPIMEREQITEM
'BAPI_PR_CHANGE'
PRITEM = BAPIMEREQITEMIMP ???
PRITEMX = BAPIMEREQITEMX ???
I wanted to cast it but i failed.
What should i do?
Please help.
Thank for help
Annette
2013 Sep 24 10:37 AM
Hi,
Go to these BAPI and read the Long Text for these two tables.. hope it will help you to understand the purpose.
Regards,
Sujeet
2013 Sep 24 10:43 AM
Those are not the same structure than in the old BAPI
As with most current/standardized BAPI you have to fill only required fields in the first structure and pass value 'X' for field with same name in the second structure.
(Read Change Parameters in Programming Standardized Parameters of BAPI Programming Guide Reference (CA-BFA) online documentation.)
Regards,
Raymond
2013 Sep 24 12:21 PM
Hello Raymond
Do i need BAPI_PR_GETDETAIL before using 'BAPI_PR_CHANGE'
When i used BAPI_REQUISITION_CHANGE i have first to use
BAPI_REQUISITION_GETDETAIL to fill the tables.
Thank you
Greets
Annette
2013 Sep 24 1:13 PM
2013 Sep 24 3:06 PM
Thank you
Thank you!
You are right!
I marked plant with x and filled the field with the new value.
Regards
Annette
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |