03-19-2008 8:23 AM
Hi ,
I have the following code .............
CALL FUNCTION 'L_REF_DELETE_DOC'
EXPORTING
i_lgnum = p_y_wa_t311_lgnum
i_refnr = p_y_wa_t311_refnr
i_rbtyp = p_y_k_rbtyp
TABLES
t_rbnum = p_y_li_rbnum[].
IF sy-subrc EQ y_k_zero.
*Success message for all TRs deleted at group level
MESSAGE s028(ydev) WITH p_y_wa_t311_refnr.
CLEAR y_gwa_rbnum.
LOOP AT p_y_li_rbnum INTO y_gwa_rbnum.
*Success message for all TR deleted at TR level
MESSAGE s029(ydev) WITH y_gwa_rbnum-rbnum.
CLEAR y_gwa_rbnum.
ENDLOOP.
ENDIF.
When I am doing an EPC check , am getting the following error :
No EXCEPTION to set SY_SUBRC Declared for CALL FUNCTION 'L_REF_DELETE_DOC'
Thus the value of SY-SUBRC is always 0
(The message can be hidden with "#EC *).
Let me know how to correct the same . I dont want to hide the message.
Regards,
Kalyan
03-19-2008 8:50 AM
Hi Kalyan,
In the function module call, you have not included the exceptions, and you are not handling those exceptions
the function module has the following exceptions
REFNR_BLOCKED
STATUS_BLOCKED
STATUS_ACTIV
STATUS_TO_CREATED
STATUS_RELEASED
REFNR_DOES_NOT_EXIST
that means if sy-subrc = 1. the reason is Reference number is blocked and like that you need to handle them in the calling program.
The error says that only. Hope this is helpful to you
Regards,
Ravi