需求:DEC数据在维护的时候显示0
1,设置数据元素对于的域带转换历程、
2,写转换历程函数(注意两个历程的输入和输出类型,这个需要修改)
FUNCTION CONVERSION_EXIT_ZDAYS_INPUT. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(INPUT) TYPE CLIKE *" EXPORTING *" VALUE(OUTPUT) TYPE ZECRM_DEC *"---------------------------------------------------------------------- * CALL 'CONVERSION_EXIT_ALPHA_INPUT' ID 'INPUT' FIELD INPUT * ID 'OUTPUT' FIELD OUTPUT. IF INPUT = '0' OR INPUT = ''. OUTPUT = '0'. ENDIF. ENDFUNCTION.
FUNCTION CONVERSION_EXIT_ZDAYS_OUTPUT. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(INPUT) TYPE ZECRM_DEC *" EXPORTING *" VALUE(OUTPUT) TYPE CLIKE *"---------------------------------------------------------------------- * CALL 'CONVERSION_EXIT_ALPHA_INPUT' ID 'INPUT' FIELD INPUT * ID 'OUTPUT' FIELD OUTPUT. IF INPUT = '' OR INPUT = '0'. OUTPUT = '0'. ENDIF. ENDFUNCTION.
效果:
标签:VALUE,OUTPUT,------------------------------------------------------------------- From: https://www.cnblogs.com/sapSB/p/17973084