Closed ZhipingWen closed 8 months ago
Hello @ZhipingWen,
the RFC_INVALID_HANDLE should not happen in this case and I will investigate it. Are you sure the example code is copied correctly because the function dict("C:\Users\pk3100\Downloads\logo.gif")
fails in my Python 3 interpreter:
dict("C:\Users\pk3100\Downloads\logo.gif")
Cell In[12], line 1
dict("C:\Users\pk3100\Downloads\logo.gif")
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
dict requires minimum minimum two parameters, as per documentation, but FILES are anyway not dictionary parameter. When no columns, the table is passed as array and you can try this instead. Note the escaped backslash character:
FILES = ["C:\\Users\\pk3100\\Downloads\\logo.gif"]
Hi bsrdjan, Many thanks for your support!
Yes, you are right that my post for parameter FILES is wrong, it should be ["C:\Users\pk3100\Downloads\logo.gif"] or [r"C:\Users\pk3100\Downloads\logo.gif"]. Sorry for the confusing and inconvenience.
At that moment, I guess the issue is caused from FILES parameter so I tried different ways to transfer this parameter. But now I suppose it should be caused by the called RFC/BAPI. This BAPI is not callable remotely. But I can't do the testing since I am not granted to modify SAP standard BAPI.
Thanks!
This BAPI is not callable remotely. But I can't do the testing since I am not granted to modify SAP standard BAPI.
Standard BAPI should not be modified but you can create custom ("Z") function module, RFC enabled, with exactly the same signature as non RFC-enabled function module. Then inside your RFC-enabled function module, call the non RFC enabled function. Some call it BAPI "wrapper"
Describe the bug A clear and concise description of what the bug is. Once call SAP BAPI "SO_DOCUMENT_REPOSITORY_MANAGER", response with ExternalRuntimeError: 13 (rc=13): key=RFC_INVALID_HANDLE
To Reproduce Describe the steps to reproduce the behavior, including test script.
Screenshots If applicable, add screenshots to help explain your problem. 1) Code:
2) Issue:
Environment
Additional context Add any other context about the problem here. For this BAPI "SO_DOCUMENT_REPOSITORY_MANAGER", there is a table parameter named FILES which has no any column name. I guess this issue is related to this parameter. In general, I transferred this parameter like [dict(filename with path)] with different ways, but always got same issue.