Hi,
I have a requirement where I need to delete Contact Person's relationship - BUR001 with the Account he is associated with. This should be done in a BADI implementation when the user changes the status of the Contact Person and clicks on SAVE on WebUI.
Initially I tried to delete the Contact Person relationship using the FM:BAPI_BUPR_RELATIONSHIP_DELETE which actually resulted in a DUMP error on WebUI in runtime because that FM was trying to interrupt a COMMIT. So I tried to find few MAINTAIN FMs which can solve this issue , as COMMIT anyways happens later internally.
I found this FM: BUB_BUPA_RELATION_MODIFY which takes BUT050 structure and the action as input. Below is the Code snippet of the FM i used:
CALL FUNCTION 'BUB_BUPA_RELATION_MODIFY'
EXPORTING
is_but050 = ls_but050
iv_aktyp = '06'. " 06 means delete action
Now the Contact has been successfully saved but the Contact Relationship is not deleted.
Please let me know if anyone has got a solution for this.
Thanks,
San