on 09-13-2016 5:04 AM
Hi Experts!
We are using BAPI_POSRVAPS_DELMULTI to delete the orders created for 11/30 through /SAPAPO/PPT1:
But, only PReqRel order is being deleted, but not PlOrd.(F). When tried through BAPI_MOSRVAPS_DELEMULTI, we got the below error:
TYPE=031: In-house Production Order
STATUS=3: Sub-contracting
Can someone please help me in deleting both the orders that got created? Your help is highly appreciated.
The problem is resolved.
We have to consider PGIN_GUID and PGOUT_GUID of PEGGING_INPUT_NODES from FM BAPI_POSRVAPS_GETLIST3. These orders are to be converted to CHAR22 using /SAPAPO/CIF_GUID_CONVERT as the below code accepts only such orders.
The below code ia taken from program /SAPAPO/DELETE_PP_ORDER.
CALL FUNCTION '/SAPAPO/RRP_ORDER_DELETE'
EXPORTING
it_ordid = lt_order_key
iv_change_dependent_orders = abap_false
iv_application = space
iv_flush = abap_true.
CALL FUNCTION '/SAPAPO/RRP_FLUSH_ORDERS'
EXPORTING
iv_application = space
IMPORTING
et_order_method_success = lt_order_method_success
et_rc = lt_rc_pack
EXCEPTIONS
failed = 0
OTHERS = 0.
LOOP AT lt_order_method_success INTO ls_order_method_success.
ls_order_key_pack-orderid = ls_order_method_success-orderid.
APPEND ls_order_key_pack TO lt_order_key_pack.
CLEAR ls_order_key_pack.
ENDLOOP.
IF NOT lt_order_key_pack IS INITIAL.
SORT lt_order_key_pack.
DELETE ADJACENT DUPLICATES FROM lt_order_key_pack.
CALL FUNCTION '/SAPAPO/DMOPR_POST'
TABLES
i_order_to_delete_tab = lt_order_key_pack.
ENDIF.
CALL FUNCTION '/SAPAPO/RRP_COMMIT'
EXPORTING
iv_publish_events = space
iv_collect_events = space
iv_dbcommit = abap_true
iv_log_close = abap_true
iv_no_log_init = abap_false
EXCEPTIONS
error = 0
OTHERS = 0.
Message was edited by: Srinivas Kalluri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is still open. Can someone please provide some inputs?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Waiting for some inputs...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.