ABAP coding tips

1) 减少使用select.....endselect,   but when you want to order data, still use this form.
要习惯使用以下这种写法:
select data  from table into it_tab.
loop at it_tab.
   select data.
    modify it_tab.
endloop.
2)在LOOP.....ENDLOOP中要记得clear local variable and local internal table.
otherwise the value will be modified into the next data.
  Loop at it_tab.
    Clear l_text  <---  注意!!!
    Select single maktx into l_text from makt where  matnr = it_tab-matnr.
    move l_text to it_tab-text.
    Modify it_tab index sy-tabix.
  Endloop.
3) 注意币别的convert : via function "currency_convert_factor "
4) select table 时,where condition must be the index or key,  if not, the program will have performance issue!
5) table relation is 1:1 or 1:n?
6) select table 时, 注意前置零的问题, via funciton "convert_exit_alpha_input" & "convert_exit_alpha_output"
 ex: 畫面輸入 PO: 9517
     select CAUFV where aufnr eq '000000009517'  (使用 9157 會找不到資料) 
7)相同的table不要在程序中反复select,尽量使用internal table

8)不断修改增加.....