SAP Knowledge Base Article - Public

3282808 - Deletion of entry in Custom Business Object with Action Logic is not possible

Symptom

  • You have created a Custom Business Object using Custom Business Objects app.
  • You have created an Action Logic (CustomDelete) to select and delete an entry in the generated UI.
  • When you trigger the action logic, you are getting the following error: "Runtime Error: 'RAISE_SHORTDUMP'".

Environment

S/4HANA Cloud

Reproducing the Issue

1. Create a Custom Business Object YY1_CBO

2. Create an Action Logic (CustomDelete) with code similar to:

SELECT sap_uuid FROM YY1_CBO
INTO TABLE @DATA(lt_keys)
WHERE field = @CBO-field.

TRY.
     write->delete_root(
       EXPORTING
         business_object_id = 'YY1_CBO'
         keys               = lt_keys
     ).

  CATCH cx_root.
    RETURN.
  ENDTRY.

3. Go to the generated UI and click on "Custom Delete" button

--> Error: Runtime Error: 'RAISE_SHORTDUMP'

Resolution

Keep in mind that the write-API can't be used to delete the instance of the action or determination on which it is performed.

This would lead to a runtime error.

See Also

SAP Help - Code Samples to Write Data from Determinations or Actions to Custom Business Objects

SAP Help - Custom Business Objects

Keywords

cbo, delete, custom delete, runtime error, RAISE_SHORTDUMP , KBA , BC-SRV-APS-EXT-BO , Custom Tables and Nodes , Problem

Product

SAP S/4HANA Cloud all versions