in your example code, you do:
if 'tabfields' in kwargs.keys(): tabfields=kwargs['tabfields'] # parameters['FIELDS']=tabfields for field in kwargs['tabfields']: parameters['FIELDS'].append([field]) else: tabfields=''
This results in a keyerror because parameters['FIELDS'] has not been initialized before calling append([field]).
If I do intialize it, then pyrfc will fail when specifying a list of fields: tabfields = ['MANDT']:
AttributeError: 'str' object has no attribute 'iteritems'.
For example:
parameters['QUERY_TABLE'] = 'T001'
parameters['FIELDS'] = ['MANDT','BUKRS']
connection.call('RFC_READ_TABLE', NO_DATA='X', **parameters)
will fail with
AttributeError: 'str' object has no attribute 'iteritems'
(same thing with:
foo = conn.call('RFC_READ_TABLE',NO_DATA='X',QUERY_TABLE='T001',FIELDS=['MANDT','BUKRS'])