I have implemented the get_entity
of the parent and it works for me but when I want to implement the get_entity
of the child it doesn't work and I don't know why?
It gives me error
404
but what I want to consult is in the data table.
This is the parent's get_entity
method (it works):
method ORGANIZADOREVENT_GET_ENTITY.
CHECK line_exists( it_key_tab[ name = 'IdOrgevento' ] ).
DATA(lv_id) = it_key_tab[ name = 'IdOrgevento' ]-value.
SELECT SINGLE *
FROM ZGAVAZ_ORGEVENTO
WHERE ID_ORGEVENTO EQ @lv_id
INTO CORRESPONDING FIELDS OF @er_entity.
endmethod.
This is the get_entity method of the child (it doesn't work, it gives me a 404 error)
method EVENTOSET_GET_ENTITY.
CHECK line_exists( it_key_tab[ name = 'IdEvento' ] ).
CHECK line_exists( it_key_tab[ name = 'IdOrgevento' ] ).
DATA(lv_id) = it_key_tab[ name = 'IdEvento' ]-value.
DATA(lv_id_eve) = it_key_tab[ name = 'IdOrgevento' ]-value.
SELECT SINGLE *
FROM ZGAVAZ_EVENTO
WHERE ID_EVENTO EQ @lv_id AND
ID_ORGEVENTO EQ @lv_id_eve
INTO CORRESPONDING FIELDS OF @er_entity.
endmethod.
Table columns:
OData entity:
Table contents: