【IT168 技术文章】
-----------------------------------------------------
获取生产定单状态
-----------------------------------------------------
call function 'STATUS_TEXT_EDIT'
EXPORTING
flg_user_stat = 'X'
objnr = LO_OBJNR
only_active = 'X'
spras = sy-langu
IMPORTING
line = ls_statu
EXCEPTIONS
object_not_found = 01.
使用:objnr 状态对象号,only_active 激活的 ,
-----------------------------------------------------
--------------------------------------------------
获取每个月的最后一天
---------------------------------------------------
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
day_in = date
IMPORTING
last_day_of_month = date1.
-------------------------------------------------------
--------------------------------------------------------------
去掉前面0
*&--------------------------------------------------------------------*
*& Form frm_alpha_output 去零
*&--------------------------------------------------------------------*
DEFINE alpha_minus.
call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
exporting
input = &1
importing
output = &1.
END-OF-DEFINITION.
---------------------------------------------------
前面加0
---------------------------------------------------
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = &1
importing
output = &1.
------------------------------------------------
踢用户
TH_DELETE_USER
---------------------------------------
CALL FUNCTION 'CUT_2BYTES_STRINGS'
EXPORTING
I_STR = T_STR
I_LEN = 4
IMPORTING
O_STR = T_TXT04
T_STR 输入字符 I_LEN 长度 T_TXT04输出字符
-------------------------------------------
金额转换成大写
---------------------------------------------
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = T_AMOUNT10
CURRENCY = 'RMB'
LANGUAGE = '1'
IMPORTING
IN_WORDS = S_AMWORD2
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
--------------------------------------------------------
用于比较新内表和原内表内容,key_length指原表'record'中所有字段的长度,
-------------------------------------------------------------------
*CALL FUNCTION 'CTVB_COMPARE_TABLES'
* EXPORTING
* TABLE_OLD = RECORD[] "原内表
* TABLE_NEW = RECORD2[] "新内表
* KEY_LENGTH = 91
* IMPORTING
* TABLE_DEL = RECORD3[]
** TABLE_ADD = RECORD4[]
** TABLE_MOD = RECORD5[]