cancel
Showing results for 
Search instead for 
Did you mean: 

Code for sending records to error stack

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

put

raise exception type CX_RSROUT_SKIP_RECORD.

into your code (after APPEND)

Regards,

Balazs Kohalmi

Former Member
0 Kudos

Hi ,

Even after raising the exception the error stack is not filled.

Regards,

Ramesh

former_member222556
Contributor
0 Kudos

Hi Dear,

Go To the following Link that could help you ..

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20ebeb43-9e8a-2d10-b28e-825c0142a...

Best Regards

Obaid

Former Member
0 Kudos

Hi Ramesh,

To me it seems that the code you have written is incorrect. In the 5th line of code you have written:

monitor_rec-recno = <SOURCE_FIELDS>-FINISHDATE.

Here you should remember that RECNO & FINISHDATE are of different data types, so may be you can try changing this line of your code to : monitor_rec-recno = <SOURCE_FIELDS>-Record

U can try this & let me know its working or not, coz i think rest of the code is pretty fine,

Hope it helps.

Ragerds,

Raj

Former Member
0 Kudos

Hi Raj,

ok.Ill try this step .

Regards,

ramesh

Former Member
0 Kudos

Hi Raj,

It is working fine now.

Thanks a lot for your help.

Regards,

Ramesh

Answers (2)

Answers (2)

Former Member
0 Kudos

One more point is for the DTP which you are running,

go to update tab and change the error handling option to Valid records update, Reporting possible, this

will enable your error stack.

Former Member
0 Kudos

Hi Priyadarshini,

I had created error dtp. Type of dtp is similar to what you had mentioned.

Regards,

Ramesh

Former Member
0 Kudos

Ramesh,

Check if you have created Error DTP for the DTP you are running currently.

Edited by: Priyadarshini K A on Mar 3, 2011 5:44 AM