Hello experts,
.. I got the following problem when using standard gateway builder and remote function modules for the functionality on the backend:
there is a create operation for a time card and caused by wrong frontend data the create operation in the backend fails (which means the fucntion module doesn't create anything).
How can I trap this case ?
Is there a possibility to raise an error for this or to stop execution at this point?
I'm asking this, because the read after create, which is usually done automatically by the framework after the create operation causes a short dump.
METHOD XXX_CREATE _ENTITY.
..
create part, doesn't create anything ...
...
.. at the end the read after create:
CREATE OBJECT lo_tech_read_request_context.
...
bla bla (fill key table)..
...
* Call read after create
/iwbep/if_mgw_appl_srv_runtime~get_entity(
EXPORTING
iv_entity_name = iv_entity_name
iv_entity_set_name = iv_entity_set_name
iv_source_name = iv_source_name
it_key_tab = lt_key_tab
io_tech_request_context = lo_tech_read_request_context
it_navigation_path = it_navigation_path
IMPORTING
er_entity = ls_entity
).
* Send the read response to the caller interface
ASSIGN ls_entity->* TO <ls_data>.
er_entity = <ls_data>.
I'm sending back all data of the entity in my read operation, thus the entity is empty in case it does not exist which means ls_entity points to nothing and the last operation then leads to the short dump.
Thx a lot in advance,
Robert