1

如何定义表结构来调用 BAPI?我想打电话给“BAPI_PRODORD_GET_LIST”

connection = Connection(user='user', passwd='password', ashost='IP', sysnr='00', client='100')

function_name = "BAPI_PRODORD_GET_LIST"

func_desc = connection.call(function_name)

value = {u'SIGN':'I',u'OPTION':'EQ',u'LOW':'MatNumber',u'HIGH':'',u'HIGH_EXTERNAL':'',u'HIGH_GUID':'',u'HIGH_VERSION':'',u'LOW_EXTERNAL':'',u'LOW_GUID':'',u'LOW_VERSION':''}

func_desc['MATERIAL_RANGE'].append(value)

func_desc1 = connection.call(function_name, **func_desc)
4

1 回答 1

2

我找到了使用 RFC_TABLE 调用 BAPI 的正确语法。

connection = Connection(user='user', passwd='password', ashost='IP', sysnr='00', client='100')

function_name = "BAPI_PRODORD_GET_LIST"    

value = {u'SIGN':'I',u'OPTION':'EQ',u'LOW':'4711'}

result = connection.call(function_name, MATERIAL_RANGE=[value])

print result
于 2014-12-16T08:22:11.777 回答