Closed Tset-Noitamotua closed 8 years ago
PyRFC is just a wrapper of the standard SAP NetWeaver RFC Library and the detailed documentation of SAP NW RFC Lib is fully applicable and available on SAP Service Marketplace.
Following the link at the bottom of PyRFC README, http://service.sap.com/rfc-library, in the Download and Documentation section you will find the SAP NetWeaver RFC SDK Guide, with detail description of all Connection parameters.
How to use sapnwrfc.ini
is described in pyrfc documentation
Hope this helps.
Thanks for the hint.
As Page 15 of SAP NetWeaver RFC SDK Guide states:
Using the sapnwrfc.ini file
" ... . The destination parameter of this function must point to an entry in the sapnwrfc.ini file."
# Example of a sapnwrfc.ini file # SAP System using a specific application server DEST=BIN_HS0011 ASHOST=hs0011 SYSNR=53 RFC_TRACE=0
To answer my own questions:
1) DEST stands for destination and refers to possible DEST=
definition(s) in sapnwrfc.ini (e.g. DEST=BIN_HS0011
in example above)
2) To open a connection (again refering above example) call my_sap = Connection(DEST='BIN_HS0011')
NOTE: pass value of DEST as string - thus in quotes.
NOTE: you can define multiple destination ins sapnwrfc.ini e.g.
# destination 1
DEST=SYSTEM_001
ASHOST=hostname_of_sys001
SYSNR=001
USER=user_001
PASSW= ...
# destination 2
DEST=SYSTEM_002
ASHOST=hostname_of_sys002
SYSNR=002
USER=user_002
PASSW= ...
# destination n
...
I hope I have summed up correctly and close this issue.
Just can't figure it out from documentation how to do it. The docs say pyrfc by default looks for
sapnwrfc.ini
in current folder. Let's asume I have this content in mysapnwrfc.ini
1) What is DEST? 2) How to call
Connection()
?