Hard-coding has been very much an integral part of ABAP coding. Many a times lot of text is hard coded in programs right from select statements to selection screen parameters to more complicated case statements and other conditional statements. The more deadlier hard coding is found in user exits or BTE’s.
Typically during roll-outs the existing programs may have to be modified to include the new company code etc. However it might take lot of debugging to figure out what went wrong if we missed a small exit where very important code was written.
Program Initial Screen
The below mentioned program can be run before roll-outs to determine if any hard coding is present. The hard coding can be from company code to plant to form names or report names. The output of this report will help you to estimate roughly in which programs or exits changes might have to be done. This report will be also useful for production support issues arising after go-live.
Program Source
REPORT ZTST_TRACK NO STANDARD PAGE HEADING
LINE-SIZE 180
LINE-COUNT 45.
*———————————————————————*
* DATA DECLARATION *
*———————————————————————*
TYPES: BEGIN OF ty_ztab,
prog TYPE programm,
END OF ty_ztab.
TYPES: BEGIN OF ty_zprog,
line TYPE char200,
END OF ty_zprog.
TYPES: BEGIN OF ty_zprogdet,
prog TYPE programm,
linenr TYPE i,
line TYPE char200,
END OF ty_zprogdet.
DATA: i_prog TYPE STANDARD TABLE OF ty_ztab,
wa_prog TYPE ty_ztab.
DATA: i_zprog TYPE STANDARD TABLE OF ty_zprog,
wa_zprog TYPE ty_zprog.
DATA: i_zprogdet TYPE STANDARD TABLE OF ty_zprogdet,
wa_zprogdet TYPE ty_zprogdet.
PARAMETERS: p_hard TYPE char25 OBLIGATORY.
PARAMETERS: p_chk TYPE char25 OBLIGATORY DEFAULT ‘Z*’.