一、生产订单客户屏幕新增字段
二、生产订单抬头AUFK表的CI_AUFK中新增屏幕字段
三、CMOD 增强分配PPCO0012
修改0100屏幕,新增对应字段,其中生产订单类型设置为下拉框
EXIT_SAPLCOKO1_001——>ZXCO1U11
首先在ZXCO1TOP中引入增强结构COCI_AUFK(其中是上述增强到表中的字段)
将前台输入的数据放入增强结构中,本例还通过工厂限制增强字段是否启用,根据事务代码限制增强字段是否可编辑
EXIT_SAPLCOKO1_002——>ZXCO1U12
回到0100屏幕
status_0100代码如下
IF gv_activity = 'X'. DATA:lt_list TYPE vrm_values, ls_list TYPE vrm_value. SELECT werks,"工厂 zlxbs,"订单类型 zlxbsms"订单类型文本 (30 个字符) FROM zXX INTO TABLE @DATA(lt_ddlx) WHERE werks = @gv_werks. REFRESH:lt_list. LOOP AT lt_ddlx INTO DATA(ls_ddlx). CLEAR:ls_list. ls_list-key = ls_ddlx-zlxbs. ls_list-text = ls_ddlx-zlxbsms. APPEND ls_list TO lt_list. ENDLOOP. CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = 'COCI_AUFK-ZLXBS' values = lt_list EXCEPTIONS id_illegal_name = 1 OTHERS = 2. "设置字段不可编辑 IF gv_edit <> 'X'. LOOP AT SCREEN. IF screen-name+(9) = 'COCI_AUFK'. screen-input = '0'. MODIFY SCREEN. ENDIF. ENDLOOP. ENDIF. ELSE. LOOP AT SCREEN. IF screen-name+(9) = 'COCI_AUFK'. screen-active = '0'. MODIFY SCREEN. ENDIF. ENDLOOP. ENDIF.
屏幕类型需要设置为子屏幕,否则会DUMP
激活以上所有组件即可