Hi All,
Requirement: Record satisfying the condition should be sent to error stack and rest should be proceeded further.
Following is the code written by me to send data to error stack.
Data gets appended to Monitor but it is not reaching the error stack.
IF <SOURCE_FIELDS>-FINISHDATE LT wa_cal-VJAHR OR
<SOURCE_FIELDS>-FINISHDATE GT wa_cal-BJAHR.
monitor_rec-msgid = 'ZBW'.
monitor_rec-msgty = 'E'.
monitor_rec-recno = <SOURCE_FIELDS>-FINISHDATE.
monitor_rec-skipped = 'X'.
Append monitor_rec TO MONITOR.
DELETE TABLE SOURCE_PACKAGE FROM <SOURCE_FIELDS>.
ENDIF.
Can you please tell me if the above procedure is fine or needs to be changed?