标签:fun class and write cpu 时间 other udt UNC
*&---------------------------------------------------------------------* INCLUDE <icon>. TYPES:BEGIN OF ty_out, seq TYPE char6, "序号 werks TYPE marc-werks, "工厂 matnr TYPE marc-matnr, "物料号 maktx TYPE makt-maktx, "物料描述 ersda TYPE mara-ersda, "创建时间 mtart TYPE mara-mtart, "物料类型 beskz TYPE marc-beskz, "采购类型 sobsl TYPE marc-sobsl, "特殊采购类型 flag1 TYPE char1, "外购件计划价 flag2 TYPE char1, "自制件BOM andat TYPE mast-andat, "BOM创建时间 flag3 TYPE char1, "自制件工艺路线 andat_p TYPE plko-andat, "工艺路线创建时间 flag4 TYPE char1, "自制件工时 flag5 TYPE char1, "自制件成本核算状态 cpudt TYPE keko-cpudt, "自制件成本核算时间 status TYPE char1, "状态 light TYPE icons-text, " 红绿灯 descr TYPE char40, "状态说明 END OF ty_out. DATA:gt_out TYPE TABLE OF ty_out, gs_out TYPE ty_out. *&---------------------------------------------------------------------* *& FRM_CREATE_ICON *&---------------------------------------------------------------------* FORM frm_create_icon USING i_coname TYPE string CHANGING c_out TYPE icons-text. *WRITE: ICON_GREEN_LIGHT AS ICON. *WRITE: ICON_YELLOW_LIGHT AS ICON. *WRITE: ICON_RED_LIGHT AS ICON. CALL FUNCTION ‘ICON_CREATE‘ EXPORTING name = i_coname add_stdinf = ‘X‘ IMPORTING result = c_out EXCEPTIONS icon_not_found = 1 outputfield_too_short = 2 OTHERS = 3. ENDFORM. loop at gt_out ASSIGNING FIELD-SYMBOL(<lfs_out>). IF <lfs_out>-status = ‘R‘. PERFORM frm_create_icon USING ‘ICON_RED_LIGHT‘ CHANGING <lfs_out>-light. ELSE. PERFORM frm_create_icon USING ‘ICON_GREEN_LIGHT‘ CHANGING <lfs_out>-light. ENDIF. ENDLOOP.
标签:fun class and write cpu 时间 other udt UNC
原文地址:https://www.cnblogs.com/JackeyLove/p/13069279.html