Skip to content
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

Issue with TIMS data type conversion #336

Closed
dbaranasic opened this issue Sep 18, 2023 · 3 comments
Closed

Issue with TIMS data type conversion #336

dbaranasic opened this issue Sep 18, 2023 · 3 comments
Assignees
Labels

Comments

@dbaranasic
Copy link

Describe the bug
I am running RFC server with PyRFC. Sometimes, when registered function is triggered I get parse error. From SAP, we are sending the data with structure BAPI_ORDER_HEADER1 to RFC Server.

To Reproduce
The error occurs as soon as any of TIMS (time) data type value (for example SCHED_START_TIME) is set to 240000 (24:00:00).
If I change the value to 000000, then there is no error.

Screenshots
mRemoteNG_ZfaNfUuR0n

Environment

  • OS: Windows 10 VM
  • Python 3.11.2
  • PyRFC 2.7.1
  • SAP 2019 on premise

Additional context
Tested also with PyRFC 3.1 (in this case there was no error, but also registered function was not called at all)

@bsrdjan bsrdjan self-assigned this Sep 28, 2023
@bsrdjan bsrdjan added the bug label Sep 29, 2023
@bsrdjan
Copy link
Contributor

bsrdjan commented Sep 29, 2023

It is a bug, caused by not passing the date/time handling configuration to server. The standard configuration returns DATE and TIMS ABAP fields as strings. Here the server tries to create the Python datetime object from "240000" and fails. It should just pass the ABAP string as-is, without interpretation. The fix should be available early next week.

@bsrdjan
Copy link
Contributor

bsrdjan commented Oct 2, 2023

Hello @dbaranasic,

new server configuration options are added in release 3.2, so that strict TIMS value check can be disabled.
When set to False, like in this example, the Python server will not complain about ABAP TIMS values out of standard range:

server = Server(
    {"dest": "MME_GATEWAY"},
    {"dest": "MME"},
    {"check_time": False, "server_log": True}
)

Could you please test and re-open, if any issues.

@dbaranasic
Copy link
Author

@bsrdjan thanks, I will test it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants