Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP HANA Python Interface Datatype VARBINARY wrong converted

Former Member
0 Likes
1,015

Dear SAP community,

here are the things that went well:

1. Connect from Python Pycharm to HANA DB with the Python driver hdbcli

2. Make first SQL querys at the table /SCWM/D_DSAPP of the Dock-Appointment Scheduling (See the code at the end)

Here is my problem:

The DB_KEY and the SLOT_ROOT_KEY, both SQL Data Type Varbinary are shown in the Python Pycharm console like this:

Python output:



For comparison in Eclipse it looks like this:

So my question:

Why can't I see the KEY_ID in the correct format? And what do i need to do in order to get the KEY_ID in the right format in Python Pycharm?

Here is my Code:

print('connected')
cursor = conn.cursor()

sql='SELECT Top 3 * FROM SAPABAP1."/SCWM/D_DSAPP" '
cursor.execute(sql)
rows= cursor.fetchall()
for row in rows:
for col in row:
print ("%s" % col, end=" ")
print (" ")

cursor.close()
print(row)
1 REPLY 1
Read only

former_member30
Product and Topic Expert
Product and Topic Expert
0 Likes
774

Hi and welcome to the SAP Community!

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members. For example, you can outline what steps you took to find answers (and why they weren't helpful) and share screenshots of what you've seen/done. The more details you provide, the more likely it is that members will be able to assist you.

Should you wish, you can revise your question by selecting Actions, then Edit (although once someone answers your question, you'll lose the ability to edit the question -- but if that happens, you can leave more details in a comment).

Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS. By personalizing your profile with a photo of you, you encourage readers to respond.

Cheers,

Julia SAP Community Moderator