Unable to write to error stack
My requirement is to take good recs to DSO and write bad recs to error stack. I am unable to write the bad record to error stack with following code. If I put raise exception the entire request is turning red.
I have following code in the start routine.
LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS>.
IF <SOURCE_FIELDS>-/BIC/ZMF_PATNO ='BAD-REC'.
MONITOR_REC-MSGID = 'ZRSM'.
MONITOR_REC-MSGTY = 'W'.
MONITOR_REC-MSGNO = '000'.
MONITOR_REC-MSGV1 = 'Master Data not'.
MONITOR_REC-MSGV2 = 'available for material'.
MONITOR_REC-MSGV3 = <SOURCE_FIELDS>-/BIC/ZMF_PATNO.
MONITOR_REC-SKIPPED = 'X'.
APPEND MONITOR_REC TO MONITOR.
raise exception type CX_RSROUT_SKIP_RECORD.
In my DTP I have a setting "Valid REcords Update, Reporting possible(request Green)"