on 02-09-2012 10:46 AM
how to cancel process order confirmed in z program
i mean details for cqancellation of process order phase wise and operation wise like tables, bapi
Get the confirmation number (RUECK) and confirmation counter (RMZHL) by plugging in order number in AUNFR in the table AFRU. Use the following BAPI to cancel confirmation.
CALL FUNCTION 'BAPI_PRODORDCONF_CANCEL' "Cancel production order confirmation
EXPORTING
confirmation = " bapi_pp_conf_key-conf_no Confirmation
confirmationcounter = " bapi_pp_conf_key-conf_cnt Confirmation Counter
postg_date = " bapi_pp_confirm-postg_date Posting Date
conf_text = " bapi_pp_confirm-conf_text Confirmation Text
IMPORTING
return = " bapiret1 Return Parameter
locked = " bapi_coru_param-locked Indicator: Order is locked
created_conf_no = " bapi_pp_conf_key-conf_no Confirmation of Cancellation Record
created_conf_count = " bapi_pp_conf_key-conf_cnt Confirmation Counter for Cancellation Record
.
BAPI format courtesy:
http://www.se80.co.uk/sapfms/b/bapi/bapi_prodordconf_cancel.htm
Edited by: Jeevan Sagar on Feb 9, 2012 12:03 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to look up in table AFRU if phases have different confirmation number or something else different. You need to do that research. My system don't have PP-PI so I cannot look it up for you. But i can give you most of the logic though.
First you need to check if the order is confirmed and also it's not cancelled
You will see the entry in AFRU where AFRU-STOKZ u2260 'X' and AFRU-STZHL = ' '
For cancellation use the BAPI ( you need to get your values from AFRU to fill the entires in the input of this BAPI)
BAPI_PROCORDCONF_CANCEL <<< Test this function module for a few phases in SE37
and you need to commit this bapi using (in the abap program)
BAPI_TRANSACTION_COMMIT
Hi,
You can cancel it thorough CO13.
Find the tables order and operation wise AFRU, AFVC.
Please check and revert.
Thanks
Hrishi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.