How to specify a table structure for BAPI call?

1k views Asked by At

How can I define a Table structure to call a BAPI? I would like call "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)
1

There are 1 answers

0
ente On

I found the correct syntax to call a BAPI with a RFC_TABLE.

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