2014 Mar 21 7:02 AM
Hi All,
We are using the CO_XT_COMPONENTS_DELETE for deletion of Production order components in CO02.
We are not getting any error when the FM is executed. but the components are deleted from the production order.
'CO_XT_COMPONENTS_DELETE'
CO_XT_ORDER_PREPARE_COMMIT
BAPI_TRANSACTION_COMMIT'
Executed the FM is the above Sequence.
Any help how we can delete the Components and let me know which parameters we need to pass.
best regards,
Sandeep
2014 Mar 21 7:54 AM
Execute COMMIT WORK AND WAIT instead of BAPI_TRANSACTION_COMMIT.
CALL FUNCTION 'CO_XT_ORDER_PREPARE_COMMIT'.
COMMIT WORK AND WAIT.
2014 Mar 21 8:17 AM
hey Arun,
I Tried this option as well and it is not working gone through the Link which is already in the SCN,
Thought of reach you by E mail..but not able to get any media to reach you.
best regards,
Sandeep
2014 Mar 21 8:23 AM
Sandeep,
It is working for me. Sample code of mine:
iresb-rsnum = rsnum.
iresb-rspos = rspos.
APPEND iresb.
CALL FUNCTION 'CO_XT_COMPONENTS_DELETE'
EXPORTING
IT_RESBKEYS_TO_DELETE = iresb[]
TABLES
CT_BAPIRETURN = bapiret1
EXCEPTIONS
DELETE_FAILED = 1
OTHERS = 2.
if bapiret1-message is initial.
CALL FUNCTION 'CO_XT_ORDER_PREPARE_COMMIT'.
COMMIT WORK AND WAIT.
else.
MESSAGE bapiret1-message TYPE 'S' DISPLAY LIKE 'E'.
leave to screen 9003.
endif.
2014 Mar 21 8:54 AM
Hi Arun,
Thanks for your prompt response.
I have tried the same way.. but no Luck ..it is not deleting the components. any system settings needs for deletion.
But the Change function module is working fine. i can able to change the components.
BEst regards
Sandeep
2014 Mar 21 8:59 AM
Check if you are able to delete that component directly via CO02 tcode.
2014 Mar 21 9:18 AM
yes ,I can able to delete the components and Add the Components ,,
2014 Mar 21 9:55 AM
Sandeep,
How do you say the component is not deleted in production order?
If the production order is in CRTD status, that component line will be completely removed from that production order and if it is REL status, that component line will be there in production order but set with deletion flag.
Regards.
2014 Mar 21 10:35 AM
Hi Arun, the Status of the Production order is created status only.
Even though the component is not deleted. it is Appearing in RESB table .
2014 Mar 27 6:47 AM
Hi Arun,
When the PRoduction order is in Relese status the Componet is getting deleted using the CO_XT_COMPONENTS_DELETE FM. But the Dletion Flag is not updating. But we tried to delete using CO02 the system throwing Error the component is already deleted.
For Adding the component we used the CO_XT_COMPONENT_ADD the component is added in the Order , But the Item number ( ex: 0010, 0020 ) is blank for the orders crated by the Function module.
any idea how we can get the item number.??
Best reagrds,
Sandeep
2014 Mar 27 8:07 AM
Sandeep,
How do you say the deletion flag is not set?
Did you check the table control column "Deleted" in component overview?
I don't know about the FM CO_XT_COMPONENT_ADD.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |