CRUD Operations in Odata – Part VIII – Delete operation

CRUD Operations in Odata – Part VIII – Delete operation

  • Redefine the Method ZEKKO12SET_DELETE_ENTITY and write the below code.
    DATA: wa_key LIKE LINE OF it_key_tab.
    DATA: lv_ebeln TYPE zekko12-ebeln.
    READ TABLE it_key_tab INTO wa_key WITH KEY name  = 'Ebeln'.
    IF sy-subrc EQ 0.
      lv_ebeln = wa_key-value.
      DELETE FROM zekko12 WHERE ebeln = lv_ebeln.
    ENDIF.
  • Select the DELETE HTTP Method and click on execute after running the GET HTTP method for single record.

Advertisement

Leave a Comment