1. Alois Schindecker
  2. PowerBuilder
  3. Friday, 16 February 2024 10:40 AM UTC

Hi!

I've some problems with SAP functions call in 64 Bit SAP Gui. I must make a 32 Bit Application, because we have other interfaces in this application and they are only available in 32 Bit. 

Now the problem is our company has rollout the 64 bit SAP and have a SAP functions call. How can I call this with a 64 Bit SAP GUI client?

 

/* my code */

private oleobject sapconnection;
oleobject sapobject;

ole_sap = CREATE OLEObject
ole_sap.ConnectToNewObject("sap.functions");
sapobject = ole_sap;
sapconnection = sapobject.connection;
sapconnection.Client = this.is_sapclient;
sapconnection.User = ls_sapuser;
sapconnection.password = "xxxxxxx
sapconnection.Language = this.is_sapsprache;
sapconnection.ApplicationServer = "xxxx
sapconnection.SystemNumber = xx
sapconnection.System = "Q10";


sapconnection.logon(0,True);

John Fauss Accepted Answer Pending Moderation
  1. Sunday, 18 February 2024 17:28 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Alois -

Does your app produce errors or are you concerned that it might produce errors? This important distinction is not entirely clear from your question/post. If you are getting errors, can you please provide more details so that we may gain a better understanding?

Can you provide a link to SAP documentation regarding SAP's OLE interface? I estimate only a small percentage of the PB developers that are active in the Community are doing anything similar to this. If there is no OLE interface for SAP, then yes, your attempts to use it will not be successful. More information is needed.

Since OLE uses Windows "under the covers" as the conduit between the two applications, my (limited) understanding is that any difference in bitness is irrelevant... The OLE mechanism is completely different than what is used by PB to interface with an external DLL. For example, the use of OLE permits 32-bit PB applications to interact with 64-bit installs of Office products. However, Microsoft had to first provide the OLE Server protocols in Office which makes this possible. SAP must provide the same capability for this to work.

Best regards, John

Comment
  1. Alois Schindecker
  2. Thursday, 22 February 2024 10:53 AM UTC
I have an error if i do the connect to the ole Object. The Powerbuilder can't find the oleobject because the 32 Bit registration is not available.



ole_sap.ConnectToNewObject("sap.functions"); --> Error

  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 16 February 2024 21:06 PM UTC
  2. PowerBuilder
  3. # 2

SAP doesn't have a REST API you can call to do integration instead of calling the client app?  Then you avoid OLE integration issues.

Comment
  1. Alois Schindecker
  2. Thursday, 22 February 2024 10:49 AM UTC
I don't have a REST API in this case. This is my problem. Which files from SAP GUI installation do I need for the OLE access?
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.