Closed li2575250 closed 4 years ago
SyntaxError: keyword can't be an expression
indicates a syntax error in your python script -> quotes around T_BUKRS
I tried many times... Adding quotes is still an error
>>> from pyrfc import Connection
>>> conn = Connection(ashost='xxxxx', sysnr='00', client='290', user='xxxxx', passwd='xxxxx')
>>> d = [{'BUKRS':'1270'}]
>>> result = conn.call('ZFI_ACCOUNT_STATEMENT_RFC', 'I_FDATE'='20190101', 'I_TDATE'='20190701', 'I_RFC'='RFC','T_BUKRS'=d)
File "<stdin>", line 1
SyntaxError: keyword can't be an expression
pyrfc version (1.9.93)
Connection call arguments are keyword arguments, quotes not needed. Please check the documentation: http://sap.github.io/PyRFC/client.html
I use the following code is no problem, it is very annoying
imp = dict(I_GJAHR='2019',I_F_MONAT='01', I_T_MONAT='12', I_RFC='RFC')
result = conn.call('ZFI_ZFI159_RFC', **imp,T_BUKRS=[{'BUKRS':'1030'}],T_LIFNR=[{'LIFNR':'1030'}])
Thank you very much for your answer Thanks♪(・ω・)ノ
Error after adding tables T_BUKRS type is table
Ask everybody elder brother to help have a look. tks...