Safeguard your ABAP code

I have learned this lesson in a hard way, but would like to share the grief with everybody.  While working with one of our clients, I developed a COBRA interface that sends out an automatic email to employees when their dependents turn 19 or 21 of age to inquire about COBRA forms. We tested the COBRA interface and pushed it to production and guess what? The SAP Basis resource forgot to run the job with variants, so the interface run for everybody with end date ‘12/31/9999,’ which sent out 30,000 emails. Yes, 30,000 emails that morning.

Instead of pointing out to the SAP Basis resource that he forgot to give the variant name in production, I held myself responsible as well for not creating a safeguard in the code.

I have included the following code below!!

IF SY-BATCH = ‘X’.
IF SY-SLSET IS INITIAL. ” Used Selection Screen Variant
WRITE : ‘No Variant Selected check SM36 & SM37’ COLOR COL_NEGATIVE.
MESSAGE e016(RP) with ‘No Variant Selected’ space space space.

ENDIF.

ENDIF.

Lesson learned
1. Safeguard your code
2. Don’t point fingers because “pointing is contagious” 🙂

This entry was posted in Talk Techie to Me. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s