-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'name' (string) should be from 1-30 chars. #115
Comments
It looks like the field name empty or longer than 30 chars is detected in function module metadata, triggering the exception. Could you please try to find the suspicious field in function module parameters ? Is it a big function module, could you eventually somehow post/dump the structure here? |
Thank you for your fast reply. Is there an equivalent to Here is the head of the function module:
Details of /MLK/TT_TABNAME Please tell me, if you need more info. |
if the length of the name would get checked earlier, it would be possible to provide a better error message. It would be nice to see Lines around line number 1904
|
Yes, the error message can be improved. I reproduced with EXPORTING TABLE TYPE parameter and need to investigate. SAP internal alternatives are two function modules: RFC_METADATA_GET, for reading RFC parameters metadata (add /MLK/TABLES_OF_CURRENT_USER to FUNCTIONNAMES) and: DDIF_FIELDINFO_GET (/MLK/TT_TABNAME goes into TABNAME) Both are strictly internal and undocumented, requiring considerable amount of try & error for any bigger use. Another alternative is using corresponding functionality of Java JCo or NET NCo. |
Fortunately I am not under pressure. If you are able to provide a fix in roughly one week, I can develop other stuff until next week. Since you can reproduce it, I guess you are not far away from a fix? |
BTW: The example code of this project works. But, they code does not look like Python. It looks like someone translated code from a different language line-by-line to python. I would suggest that SAP makes a contract with a python freelancer (not me) to clean up. The code could be simplified a lot. Python developers care for beauty/simple code. |
BTW3: I wrote down some thoughts while learning SAP+ABAP. I like the SAP platform. But I like the new development environments, too: https://github.com/guettli/why-i-like-django-and-sap/blob/master/README.md Feedback is welcome. |
Fixed in 387e946, by removing zero length field name check: https://github.com/SAP/PyRFC/blob/master/src/pyrfc/_pyrfc.pyx#L1025. Will be added to next release. |
Examples are not a part of PyRFC maintained codebase, only the RFC Client functionality. Agree that the code in |
@bsrdjan do you know when there will be a new release which contains this bug fix? |
Hopefully next week, together with DECF types added. |
I use clientPrintDescription.py for introspection a RFC function module.
But I get this result:
The script works fine for several other RFC function modules.
What could be wrong here?
I guess the client code is all right, but there is something broken with this rfc function module.
The text was updated successfully, but these errors were encountered: