All developments go through the process of developing. A process which eventually needs to cover everything, but also a process which is regarded as a "work in progress" for multiple days. Even weeks. Here's a little trick I use to capture thoughts while developing a program. Very simple. Equally effective. The * HAZARD>/code> comments.
Whenever I come across some bit of coding detail that I know I need to revisit, but I don't want to stop what I was doing, I simply add a comment line in the coding, starting with HAZARD. Like so:
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = ls_header
goodsmvt_code = lv_goodsmvt_code
TABLES
goodsmvt_item = lt_items
return = lt_return.
READ TABLE lt_return WITH KEY type = 'E'.
* HAZARD: Error handling to be added here
....
When the development is nearly finished, I tend to check the code inspector, remove errors, remove variables that are not used and also search for any HAZARD
comments I may have left in the coding - for myself to find. All coding should be delivered without hazards...
Did you know you could search the whole system for these "hazard" references ? See article Super search.
An example of some coding I have ongoing at the moment. This is what a report-wide search on the work HAZARD revealed...
162 select * from zparameter into table gt_zparameter where programm = 'Z_XDOC_SC05'. "HAZARD - nieuwe versie wellicht overhevelen 236 select * from ekpo into table gt_ekpo "Orderregels for all entries in gt_pakbon_regels where ebeln = gt_pakbon_regels-vgbel and ebelp = gt_pakbon_regels-vgpos+1(5). "< HAZARD - needs to be TESTED 351 * HAZARD: de gw_EKKO-UNSEZ wordt tegen domain ZZRET_REDEN_ID aangehouden en voorzien van een vertaalde waarde 644 * HAZARD: direct table update LIKP - zonder enqueue 651 *** CLEAR lw_lips-mfrgr. <= HAZARD: uitfaseren ?
Involving the code inspector
If you're familiair with the code inspector (and you better be), there is an article on adding a test for the use of HAZARD in coding - which I like to use myself to keep track of my notes.. Add test to code inspector.