-
I am using PyRFC / RFC_READ_TABLE and have encountered a challenge when trying to pass multiple conditions. I have created options as a list of dicts
But i then receive
Does anyone have a hint :) ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
# instead of this:
options = [{'TEXT': "MATNR LIKE 'xxx%'"}, {'TEXT': "WEKRS LIKE 'yyy%'"}]
# do this:
options = [{'TEXT': "MATNR LIKE 'xxx%'"}, {'TEXT': "AND WEKRS LIKE 'yyy%'"}] In your way, Note that import textwrap
desired_string = "MATNR LIKE 'xxx%' AND WEKRS LIKE 'yyy%' AND (MATNR = 000000... OR MATNR = ...) AND ..."
options = [
{"TEXT": substring }
for substring in textwrap.wrap(desired_string , 72)
] |
Beta Was this translation helpful? Give feedback.
-
I just want to access the prod data with ABAP on the QA test system, that is, I don't want to pull a table, I just want to provide a connection, how do I do this? |
Beta Was this translation helpful? Give feedback.
RFC_READ_TABLE
accepts a list of dict, as you defined, but then it concatenates them together. So you need to be sure they combine correctly. Try something like:In your way,
RFC_READ_TABLE
will think that your desired options string isMATNR LIKE 'xxx%'WEKRS LIKE 'yyy%'
.Note that
RFC_READ_TABLE
limits eachTEXT
value in options to max 72-characters, so I normally construct my desired options as a stingle long string and then split it into 72-character chunks like: