I've tried using the CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' (and INPUT) but I'm not sure how to properly utilize it in a select statement.IF MSEG-BWART = '101'. CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING INPUT = ZBJSTOCK-ZMAT10 IMPORTING OUTPUT = WA2-MATNR. SELECT MAX( BUDAT_MKPF ) FROM MSEG INTO GRDT WHERE MATNR = WA2-MATNR.ENDIF.目前,WA2-MATNR 似乎显示为空白,因此不会从 MSEG 中提取数据.Currently, WA2-MATNR seems to come out as blank and therefore is not pulling the data from MSEG.推荐答案你不应该在这里使用转换出口.SAP 表中的物料编号采用内部 (INPUT) 格式,您将其转换为可读格式 (OUTPUT) 以查询表.很明显你不会找到任何东西.You shouldn't use conversion exit here. Material number in SAP tables lays in internal (INPUT) format and you are converting it into readable format (OUTPUT) in order to query table. It is obvious you will not find anything.示例:MATNR 内部格式(用于 OUT 出口)MATNR internal format (for OUT exits)000000000000025567 000000000000025567MATNR 外部格式(用于 IN 出口)MATNR external format (for IN exits)25567转化案例:000000000000025567 -> CONVERSION_EXIT_MATN1_OUTPUT -> 25567 ✔️000000000000025567 -> CONVERSION_EXIT_MATN1_OUTPUT -> 25567 ✔️25567             ;  -> CONVERSION_EXIT_MATN1_OUTPUT -> 25567 ❌ 没有任何变化25567                           -> CONVERSION_EXIT_MATN1_OUTPUT -> 25567 ❌ nothing changes25567                 -> CONVERSION_EXIT_MATN1_INPUT -> 000000000000025567 ✔️25567                           -> CONVERSION_EXIT_MATN1_INPUT -> 000000000000025567 ✔️000000000000025567 -> CONVERSION_EXIT_MATN1_INPUT -> 000000000000025567 ❌ nng 变化最有可能的是,您的定制表包含错误的材料编号,因此退出不会返回任何内容.或退出不期望格式的材料编号,例如19 个字符而不是 18 个等等.000000000000025567 -> CONVERSION_EXIT_MATN1_INPUT -> 000000000000025567 ❌ nng changesMost likely, your bespoke table contains faulty material number so exit doesn't return anything. Or material number in format that exit doesn't expect, e.g. 19 characters instead of 18 and so on.附言仅供参考,您可以使用模板进行转换.与调用转换FM相同Just for you info, you can use templates for conversion. It is the same as calling conversion FMsSELECT SINGLE matnr FROM mara INTO @DATA(l_matnr) WHERE EXISTS ( SELECT * FROM mseg WHERE matnr = mara~matnr ).l_matnr = | { l_matnr ALPHA = OUT } |. <<-- templatingSELECT SINGLE matnr, budat_mkpf FROM mseg INTO @DATA(l_mkpf) WHERE matnr = @l_matnr.在上面的示例中,SELECT 不会返回任何内容,但如果您注释掉模板行,它会返回.In the above sample SELECT will not return anything, but if you comment out the template line it will. 这篇关于对于自定义表,通过转换出口转换 MATNR 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-30 00:01