我很好
分类: WINDOWS
2008-04-19 09:59:13
知不知道反查BOM的函数?就是输入项为IDNRK,得出MATNR。反查BOM的函数我这有一个,CALL FUNCTION 'CS_WHERE_USED_MAT' 大概是反查激活的,不知未激活的可不可以查?
写个原型: CALL FUNCTION 'CS_WHERE_USED_MAT'
EXPORTING
DATUB = PM_DATUB
DATUV = PM_DATUV
MATNR = ITAB1-MATNR
* POSTP = pm_postp
* RETCODE_ONLY = ' '
STLAN = PM_STLAN
WERKS = ITAB1-WERKS
MCLMT = '00000000'
MNSTL = ''
MXSTL = ''
STLTP = ''
NEWSI = ''
IMPORTING
TOPMAT = SELPOOL
TABLES
WULTB = LTB
EQUICAT = EQUICAT "YHG110068
KNDCAT = KNDCAT "YHG110068
MATCAT = MATCAT "YHG110068
STDCAT = STDCAT "YHG110068
TPLCAT = TPLCAT "YHG110068
EXCEPTIONS
CALL_INVALID = 1
MATERIAL_NOT_FOUND = 2
NO_WHERE_USED_REC_FOUND = 3
NO_WHERE_USED_REC_SELECTED = 4
NO_WHERE_USED_REC_VALID = 5
CX_SY_DYN_CALL_ILLEGAL_TYPE = 6
OTHERS = 7.
反查激活的BOM.反查未激活的怎么处理?