Hi All,
I am using the fuinction module RH_STRUC_GET in a custom function module.
When i enter an object id which does not exist it should raise an exception. But when i execute the FM it does not raise the exception , but gives an error
'Structure 01 k 234536 B011: No agent found' (Here 234536 is the ID which does not exist)
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = w_otype
act_objid = w_obj_id
act_wegid = c_b011
act_plvar = c_01
act_begda = w_curr_dt
act_endda = w_curr_dt
TABLES
result_tab = w_result_tab
result_objec = w_result_objec
result_struc = w_result_struc.
IF sy-subrc <> 0.
RAISE no_entry_found.
ENDIF.
I also tried using like this
MESSAGE e170(5w) WITH c_01 w_otype
w_obj_id c_b011
RAISING no_entry_found.
But i still get it as an error. I want to get the exception instead
Thanks in advance.