ABAP空格和零的问题

空格 

concatenate wa_detail-zz_mark1 '' '' '' wa_detail-kdmat1 into wa_detail-zz_mark1 separated by space.

每个间隔处都添加了空格。

 

CONCATENATE ' ' l_adrc-street ','   INTO it_file-col_23 RESPECTING BLANKS

在字符前添加空格

select single knumh
          from a004
          into g_knumh
          where blablabla
        if sy-subrc = 0.
          select single kbetr konwa kpein
          from konp
          into (g_kbetr,m_output-waerk,g_kpein)
          where blablabla
          if sy-subrc = 0.
            if g_kpein <> 0.
               m_output-netpri = g_kbetr / g_kpein.
            endif.
          endif.
        endif.

除法运算要注意是否会有零作除数的问题,防止报dump,,对于数值型,不管小数点有多少位,initial就相当于"0"。

转载于:https://www.cnblogs.com/aurora-cj/p/9288967.html

你可能感兴趣的:(ABAP空格和零的问题)