This repository was archived by the owner on May 28, 2026. It is now read-only.
RFC_READ_TABLE query leads to Parser Error #358
Answered
by
bsrdjan
decide2022
asked this question in
Q&A
|
Dear all, I have been querying data for some years now, with a coding like this. with open("/users/____/OneDrive - BASF/desktop/dev/sap-cobalt/saplog/credentialsZ2L.json") as f:
credentials = json.load(f)
AUART = ['ZTE']
VKORG = ['D050']
VTWEG = ['53']
SPART = ['01']
VKGRP = ['300']
VKBUR = ['0300']
table = 'VBAK'
fields = [
'VBELN',
'ERDAT',
'ERNAM',
'KNUMV',
'BSTNK',
'KNKLI',
'VSBED'
]
wheres = ['MANDT = 100',
['ERDAT', 'in', ERDAT],
['AUART', 'in', AUART],
['VKORG', 'in', VKORG],
['VTWEG', 'in', VTWEG],
['SPART', 'in', SPART],
['VKGRP', 'in', VKGRP],
['VKBUR', 'in', VKBUR]
]
with cobalt.Connection(**credentials) as conn:
VBAK_data = conn.query(table, fields, wheres, max_rows = 0)
print(VBAK_data)This worked out until some weeks ago. File ___\cobalt\cobalt.py:253, in Connection._query(self, table, fields, wheres, max_rows, from_row, field_info, delimiter)
251 if options:
252 kwargs["OPTIONS"] = options
--> 253 result = self.call("RFC_READ_TABLE", **kwargs)
254 logger.info("Ran RFC_READ_TABLE")
256 # Parse query results
File src\pyrfc\_cyrfc.pyx:937, in pyrfc._cyrfc.Connection.call()
File src\pyrfc\_cyrfc.pyx:710, in pyrfc._cyrfc.Connection._error()
ABAPApplicationError: 5 (rc=5): key=OPTION_NOT_VALID, message=ID:SAIS Type:E Number:000 DB_Error onVBAK:Der Parser lieferte den Fehler: Das Mandantenfeld [MSG: class=SAIS, type=E, number=000, v1-4:=DB_Error on;VBAK;:;Der Parser lieferte den Fehler: Das Mandantenfeld]The connection is still working, I can still get table descriptions, but no data. Has anyone an idea, whether something was changed in parsing on SAP side? I would be happy to be able to use my queries in the future as well. best regards, Andreas |
Answered by
bsrdjan
Feb 19, 2024
Replies: 1 comment 1 reply
|
Hello Andreas, what is actually cobalt, it looks like some sort of PyRFC wrapper? I would suggest reaching out for support from cobalt package team because Kind regards, |
1 reply
Answer selected by
decide2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Andreas,
what is actually cobalt, it looks like some sort of PyRFC wrapper?
I would suggest reaching out for support from cobalt package team because
querymethod is cobalt specific, does not exist in PyRFCKind regards,
Srdjan