2014 Jan 28 12:02 PM
Dear All,
We want to tick the delivery completed checkbox and give version for collection of Purchase Order. We cannot do this in BDC because we are going to do this change for last 60 days PO as per requirement. So we used BAPI_PO_CHANGE. But the change is not happening. When checking in debug mode, i can see following errors in Return Table:
Below is my code snippet:
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = P_EBELN
VERSIONS = I_VERSION
TABLES
RETURN = IT_RETURN
POITEM = I_POITEM
POITEMX = I_POITEMX
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
.
Please help me in solving this issue.
Regards,
Rithika.
2014 Jan 28 12:18 PM
Hi Rithika,
Your image is not visible properly. Please attach it again.
2014 Jan 28 12:24 PM
Dear Shailesh,
Below is the error which i get:
| 1 | W | ME | 887 | Error transferring ExtensionIn data for enhancement CI_EKKODB | 000000 | CI_EKKODB | |
| 2 | E | BAPI | 003 | Instance 4500000361 of object type PurchaseOrder could not be changed | 000000 | PurchaseOrder | |
| 3 | E | MEPO | 002 | PO header data still faulty | 000000 | ||
| 4 | I | 06 | 684 | Releases already effected are liable to be reset | 000000 | G | |
| 5 | E | SG | 105 | Enter rate INR / rate type M for 28.01.2014 in the system settings | 000000 | INR |
______________________________
Regards,
Rithika
2014 Jan 28 12:41 PM
Hi Rithika,
Some mandatory data is missing in your internal table. Consult with your MM consultant and check all mandatory fields.
2014 Jan 29 8:51 AM
Hi Rithika,
Use the FM 'BAPI_PO_GETDETAIL' to get the detail and then pass everything with your changes to 'BAPI_PO_CHANGE'.
This way you will not miss any mandatory parameters which needs to be passed.
Regards,
Munesh.
2014 Jan 28 12:31 PM
Hi Rithika,
you have commented
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
.
please use it as
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = w_wait
IMPORTING
RETURN = return.
.
2014 Jan 28 12:59 PM
Hi Rithika,
I think you need to pass the below parameters for the BAPI to be effective. Because in the error it says header data still faulty.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = LS_POHEADER-PO
POHEADER = LS_POHEADER
POHEADERX = LS_POHEADERX
TABLES
RETURN = LT_BAPIRETURN
POITEM = LT_BAPI_POITEM
POITEMX = LT_BAPI_POITEMX.
Best Regards,
K.Srikanth Reddy.
2014 Jan 29 9:02 AM
Hi,
The error is coming due to the extension in structure! Check the data before passing to the BAPI.
Once again verify the customizing tabs/fields in PO