下面介绍一下需求分类的取得逻辑,
1,MARC中取得物料需求计划类型DISMM
2,tvepz中取得需求类型BEDAE
3,T459A中取得需求分类BEDAR
下面是列子代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
DATA:l_dismm TYPE marc-dismm, l_bedae TYPE tvepz-bedae. * Get requirement type SELECT SINGLE dismm INTO l_dismm FROM marc WHERE werks = cs_lips-werks "工厂 AND matnr = cs_lips-matnr. "物料 IF sy-subrc = 0. SELECT SINGLE bedae INTO l_bedae FROM tvepz WHERE dismm = l_dismm AND pstyv = cs_lips-pstyv. * Get requirement class IF sy-subrc = 0. * replace or fill T459A-BEDAE into LIPS-BEDAR_LF (requirement class) SELECT SINGLE bedar INTO cs_lips-bedar_lf FROM t459a WHERE bedae = l_bedae. ENDIF. ENDIF. |
以上。
发表评论