02-16-2010 8:46 AM
Dear All,
I am updating T'code ME23N using BAPI " BAPI_PO_CHANGE". First i m tried in SE37 there its not updating it giving error like " PO could not be changed using the Enjoy-BAPI" for this i m trying in 4.6c.
Here i have to update only two check boxes those are NO_MORE_GR(ELIKZ) and FINAL_INV(EREKZ).
Please tell me any one there are any other BAPI's are avialable or how to slove this porblem.
Best Regards,
Srinivas.
02-16-2010 8:59 AM
Hello
I just have run this code in 4.6C. It working fine.
DATA: xreturn like BAPIRET2 occurs 0 with header line,
xpoitem like BAPIMEPOITEM occurs 0 with header line,
xpoitemx like BAPIMEPOITEMX occurs 0 with header line.
xpoitem-po_item = p_ebelp. " set position here
xpoitem-no_more_gr = 'X'.
xpoitem-final_inv = 'X'.
append xpoitem.
xpoitemx-po_item = p_ebelp. " set position here
xpoitemx-no_more_gr = 'X'.
xpoitemx-final_inv = 'X'.
append xpoitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln "set ebeln here
TABLES
return = xreturn
poitem = xpoitem
poitemx = xpoitemx.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING WAIT = 'X'.
endif.
02-16-2010 8:59 AM
Hello
I just have run this code in 4.6C. It working fine.
DATA: xreturn like BAPIRET2 occurs 0 with header line,
xpoitem like BAPIMEPOITEM occurs 0 with header line,
xpoitemx like BAPIMEPOITEMX occurs 0 with header line.
xpoitem-po_item = p_ebelp. " set position here
xpoitem-no_more_gr = 'X'.
xpoitem-final_inv = 'X'.
append xpoitem.
xpoitemx-po_item = p_ebelp. " set position here
xpoitemx-no_more_gr = 'X'.
xpoitemx-final_inv = 'X'.
append xpoitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln "set ebeln here
TABLES
return = xreturn
poitem = xpoitem
poitemx = xpoitemx.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING WAIT = 'X'.
endif.
02-16-2010 9:31 AM
Dear Dzed,
Thanks for your replay.
I have tried with your code still it giving same error "PO could not be changed using the Enjoy-BAPI"
Please tell what shall I do.
Regards,
Srinivas.
02-16-2010 9:31 AM
Dear Dzed,
Thanks for your replay.
I have tried with your code still it giving same error "PO could not be changed using the Enjoy-BAPI"
Please tell what shall I do.
Regards,
Srinivas.
02-16-2010 9:31 AM
Dear Dzed,
Thanks for your replay.
I have tried with your code still it giving same error "PO could not be changed using the Enjoy-BAPI"
Please tell what shall I do.
Regards,
Srinivas.
02-16-2010 9:32 AM
Dear Dzed,
Thanks for your replay.
I have tried with your code still it giving same error "PO could not be changed using the Enjoy-BAPI"
Please tell what shall I do.
Regards,
Srinivas.
02-16-2010 10:01 AM
Hello
Are you trying to change this PO within ME22N ?
It may be problem in PO.
02-16-2010 9:01 AM
HI,
If you are you going to update the data using enjoy transaction you must to use BAPI. Oetherwise it should not update the PO data.
Try the BAPI FM - BAPI_PO_CHANGE. I hope it will change the PO data.
Regards
Thiru