Skip to Content
Jan 16, 2020 at 04:07 AM

Call BAPI from Non SAP to S4 HANA on Premise


Hi Friends,

We are calling BAPI from Non SAP, and referring below link, but the connectivity is not happened.

I have a doubt here, in the below code which is written in Non SAP, the connectinfo is 3 for RfcMode R3, but in out case it is S4 HANA on premise, do we need to change any thing here ?

//Connection information:

aConnectInfo = new ConnectInfo (

3, // int aRfcMode 3=R/3 or 2=R/2

null, // String aDestination

"", // String aHostName YOUR HOSTNAME (e.g. IP-

0, // int aSystemNo YOUR SYSTEM-NUMBER

null, // String aGatewayHost

null, // String aGatewayService

null, // String aSystemName

null, // String aGroupName

null, // String aMsgServer

false, // Boolean isLoadBalancing

true); // Boolean isCheckAuthorization

//User information:

aUserInfo = new UserInfo (

"MUSTER", // String aUserName, YOUR USERID

"IDES", // String aPassword, YOUR PASSWORD

"800", // String aClient, YOUR CLIENT NUMBER

"e", // String aLanguage, YOUR PREFERRED

1103); // int aCodePage YOUR REQUIRED CODEPAGE


Nitin Garg