标签:style blog class code java tar
ABAP 负号前置方法汇总 开发过程中有这样的一个需求,要求指定数字栏位负号前置: 方法一: PERFORM FRM_MOVE_DATA_MINUS CHANGING L_CHAR20. ” 负号前置 *&———————————————————————* *& Form FRM_MOVE_DATA_MINUS *&———————————————————————* * 负号前置 *———————————————————————-* FORM FRM_MOVE_DATA_MINUS CHANGING P_VALUE. DATA : L_NUM(31),L_TMP. DATA : L_LEN TYPE I. L_NUM = P_VALUE. L_LEN = STRLEN( L_NUM ). SEARCH L_NUM FOR ‘-’ STARTING AT L_LEN. IF SY-SUBRC = 0. SPLIT L_NUM AT ‘-’ INTO L_NUM L_TMP. SHIFT L_NUM LEFT DELETING LEADING SPACE. CONCATENATE ‘-’ L_NUM INTO P_VALUE. SHIFT P_VALUE RIGHT DELETING TRAILING SPACE. ENDIF. ENDFORM. ” FRM_MOVE_DATA_MINUS 方法二: IF wa_mbew_out-qty00 < 0. CALL FUNCTION ‘CLOI_PUT_SIGN_IN_FRONT’ CHANGING value = wa_mbew_out-qty00. ENDIF.
标签:style blog class code java tar
原文地址:http://www.cnblogs.com/caizjian/p/3709478.html