点击此处---> 群内免费提供SAP练习系统(在群公告中)
加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)
您好,我正在尝试为此BAPI_MATERIAL_SAVEDATA创建物料主记录。 我使用了Personas 3中的RFC工具来生成代码以传递参数并读取返回结构。 尝试传递表" MATERIALDESCRIPTION"下的完整代码
时,出现运行时错误
oRFC.setParameter(" MATERIALDESCRIPTION",[{" LANGU":" EN"," LANGU_ISO":" E"," MATL_DESC":" TEST"," DEL_FLAG":""}])); oRFC.setParameter(" UNITSOFMEASURE",[{" ALT_UNIT":" EA"," ALT_UNIT_ISO":" EA"," NUMERATOR":1," DENOMINATR":1," EAN_UPC":""," EAN_CAT":" "," LENGTH":0," WIDTH":0," HEIGHT":0," UNIT_DIM":""," UNIT_DIM_ISO":""," VOLUME":0," VOLUMEUNIT":""," VOLUMEUNIT_ISO" :""," GROSS_WT":0," UNIT_OF_WT":""," UNIT_OF_WT_ISO":""," DEL_FLAG":""," SUB_UOM":""," SUB_UOM_ISO":""," GTIN_VARIANT":" "," NESTING_FACTOR":0," MAXIMUM_STACKING":0," CAPACITY_USAGE":0," EWM_CW_UOM_TYPE":""}])); oRFC.setParameter(" UNITSOFMEASUREX",[{" ALT_UNIT":" EA"," ALT_UNIT_ISO":" EA"," NUMERATOR":" X"," DENOMINATR":" X"," EAN_UPC":""," EAN_CAT":""," LENGTH":""," WIDTH":""," HEIGHT":""," UNIT_DIM":""," UNIT_DIM_ISO":""," VOLUME":""," VOLUMEUNIT ":""," VOLUMEUNIT_ISO":""," GROSS_WT":""," UNIT_OF_WT":""," UNIT_OF_WT_ISO":""," SUB_UOM":""," SUB_UOM_ISO":""," GTIN_VARIANT" :""," NESTING_FACTOR":""," MAXIMUM_STACKING":""," CAPACITY_USAGE":""," EWM_CW_UOM_TYPE":""}])); oRFC.requestResults([" RETURN"]); oRFC.send(); var _RETURN = oRFC.getResultObject(" RETURN");
运行时错误
脚本执行期间发生错误:
GuiRFC.getResult():RFC调用以以下异常结束:在处理参数MATERIALDESCRIPTION期间,功能模块BAPI_MATERIAL_SAVEDATA执行失败,因此,无法返回参数'RETURN'。
我看不到上面的代码有什么问题,有人可以帮我解决这个问题,请注意,由于字符数限制,我无法粘贴整个代码
您好Dwarak,
我建议您先试用SE37上的FM。
您能否获得所需的值?
还请检查此Wiki 中有关调用RFC的语法。
如果您仍然遇到问题,请告诉我们。
致谢,
Cris
您似乎错误地使用了" LANGU"和" LANGU_ISO"字段的值。 " LANGU"是1个字符的字段,因此它应具有值" E",而" LANGU_ISO"应为" EN"。 这有道理吗?
其余的对我来说还可以。
一周热门 更多>