2023 Mar 07 6:09 AM
Dear All,
I am supposed to delete the Partner function in XD02 in my code.
Sap has provided the std CUSTOMER_UPDATE_SALES_AREA for deletion of part function.
The code snippet I have written is as below:
CALL FUNCTION 'CUSTOMER_UPDATE_SALES_AREA' in update task<br> TABLES<br>* T_XKNVV =<br>* T_XKNVD =<br>* t_xknvp = it_knvp<br>* T_YKNVD =<br> T_YKNVP = it_YKNVP<br> .<br> commit work.
Code inside the function module is as below, WIll it lead to data inconsistency in system? as the direct deletion on KNVP being done inside func. module.Can anybody kindly guide how safe is this function module is as
LOOP AT T_YKNVP.<br> YKNVP = T_YKNVP.<br> KNVP = T_YKNVP.<br> IF YKNVP-KZ = SPACE.<br> DELETE KNVP.<br> IF SY-SUBRC NE 0.<br> MESSAGE A801(F2) WITH 'KNVP' KNVP-KUNNR.<br> ENDIF.<br> ENDIF.<br> ENDLOOP.
2023 Mar 07 6:54 AM
Basically this is an update task FM, those FM are called at end of transaction and usually only contain the statements to update database, and no check for data consistencies, only check defined in database will be executed (unique key)