Home > Class Reference > ENSLIB namespace > EnsLib.SAP.Operation


class EnsLib.SAP.Operation extends Ens.BusinessOperation

SAP connectivity through SAPJCo. Supporting SAPJCo 3.07+

Property Inventory

Method Inventory


parameter DOMAIN = EnsSAP;
Domain for $$$Text()
parameter INVOCATION = Queue;
Inherited description: 2 modes: Queue, InProc
parameter SETTINGS = SAPType:Connect,SAPHost:ConnectA,SAPClient:Connect,SAPSystemNumber:ConnectA,SAPCredentials:Connect,SAPLanguage:Connect,SAPTraceLevel:Connect,SAPTracePath:Connect,SAPMSHost:ConnectB,SAPGWHost:ConnectB,SAPGWServ:ConnectB,SAPGroup:ConnectB,SAPR3Name:ConnectB,JavaGatewayConfigItemName:Basic,SAPTransactionAutoCommit:Basic,SAPResponseHandler:Basic;
MM 20130917 added to allow Type B+D connection Settings


property JavaGatewayAddress as %String (TRUNCATE = 1);
Java gateway address is the server (name or IP address) where the java gateway runs on, derived during initialization from the JavaGateway named configuration item in the containing production
Property methods: JavaGatewayAddressDisplayToLogical(), JavaGatewayAddressGet(), JavaGatewayAddressIsValid(), JavaGatewayAddressLogicalToDisplay(), JavaGatewayAddressLogicalToOdbc(), JavaGatewayAddressNormalize(), JavaGatewayAddressSet()
property JavaGatewayConfigItemName as %String (MAXLEN = 100);
This is the name of the (required) configuration item which hosts the JavaGateway.
Property methods: JavaGatewayConfigItemNameDisplayToLogical(), JavaGatewayConfigItemNameGet(), JavaGatewayConfigItemNameIsValid(), JavaGatewayConfigItemNameLogicalToDisplay(), JavaGatewayConfigItemNameLogicalToOdbc(), JavaGatewayConfigItemNameNormalize(), JavaGatewayConfigItemNameSet()
property JavaGatewayPort as %String (TRUNCATE = 1);
The port on which the javagateway listens, derived during initialization from the JavaGateway named configuration item in the containing production
Property methods: JavaGatewayPortDisplayToLogical(), JavaGatewayPortGet(), JavaGatewayPortIsValid(), JavaGatewayPortLogicalToDisplay(), JavaGatewayPortLogicalToOdbc(), JavaGatewayPortNormalize(), JavaGatewayPortSet()
property SAPClient as %String (TRUNCATE = 1);
SAP Client e.g 000
Property methods: SAPClientDisplayToLogical(), SAPClientGet(), SAPClientIsValid(), SAPClientLogicalToDisplay(), SAPClientLogicalToOdbc(), SAPClientNormalize(), SAPClientSet()
property SAPCredentials as %String;
This is the ID name of the set of credentials values to be used to access the external system
Property methods: SAPCredentialsDisplayToLogical(), SAPCredentialsGet(), SAPCredentialsIsValid(), SAPCredentialsLogicalToDisplay(), SAPCredentialsLogicalToOdbc(), SAPCredentialsNormalize(), SAPCredentialsSet()
property SAPGWHost as %String (MAXLEN = 1024);
MM 20130917 Used for loadbalanced Type "B" connect. Gateway Host (jco.client.gwhost).
Property methods: SAPGWHostDisplayToLogical(), SAPGWHostGet(), SAPGWHostIsValid(), SAPGWHostLogicalToDisplay(), SAPGWHostLogicalToOdbc(), SAPGWHostNormalize(), SAPGWHostSet()
property SAPGWServ as %String (TRUNCATE = 1);
MM 20130917 Used for loadbalanced Type "B" connect. Gateway Service (jco.client.gwserv).
Property methods: SAPGWServDisplayToLogical(), SAPGWServGet(), SAPGWServIsValid(), SAPGWServLogicalToDisplay(), SAPGWServLogicalToOdbc(), SAPGWServNormalize(), SAPGWServSet()
property SAPGroup as %String (TRUNCATE = 1);
MM 20130917 Used for loadbalanced Type "B" connect. SAP Group (jco.client.group).
Property methods: SAPGroupDisplayToLogical(), SAPGroupGet(), SAPGroupIsValid(), SAPGroupLogicalToDisplay(), SAPGroupLogicalToOdbc(), SAPGroupNormalize(), SAPGroupSet()
property SAPHost as %String (MAXLEN = 1024);
MM 20130917 SAPHost is the SAP server's network name or IP address (jco.client.ashost).
Property methods: SAPHostDisplayToLogical(), SAPHostGet(), SAPHostIsValid(), SAPHostLogicalToDisplay(), SAPHostLogicalToOdbc(), SAPHostNormalize(), SAPHostSet()
property SAPLanguage as %String (TRUNCATE = 1);
Property methods: SAPLanguageDisplayToLogical(), SAPLanguageGet(), SAPLanguageIsValid(), SAPLanguageLogicalToDisplay(), SAPLanguageLogicalToOdbc(), SAPLanguageNormalize(), SAPLanguageSet()
property SAPMSHost as %String (MAXLEN = 1024);
MM 20130917 Used for loadbalanced Type "B" connect. Message Server Host (jco.client.mshost).
Property methods: SAPMSHostDisplayToLogical(), SAPMSHostGet(), SAPMSHostIsValid(), SAPMSHostLogicalToDisplay(), SAPMSHostLogicalToOdbc(), SAPMSHostNormalize(), SAPMSHostSet()
property SAPPassword as %String (TRUNCATE = 1);
Derived during initialization from SAPCredentials (Not A Setting)
Property methods: SAPPasswordDisplayToLogical(), SAPPasswordGet(), SAPPasswordIsValid(), SAPPasswordLogicalToDisplay(), SAPPasswordLogicalToOdbc(), SAPPasswordNormalize(), SAPPasswordSet()
property SAPR3Name as %String (TRUNCATE = 1);
MM 20130917 Used for loadbalanced Type "B" connect. SAP Group (jco.client.r3name).
Property methods: SAPR3NameDisplayToLogical(), SAPR3NameGet(), SAPR3NameIsValid(), SAPR3NameLogicalToDisplay(), SAPR3NameLogicalToOdbc(), SAPR3NameNormalize(), SAPR3NameSet()
property SAPResponseHandler as %String (MAXLEN = 100);
Errorhandler, typically a BO or BP. The Errorhandler will get the SAP Response.
Property methods: SAPResponseHandlerDisplayToLogical(), SAPResponseHandlerGet(), SAPResponseHandlerIsValid(), SAPResponseHandlerLogicalToDisplay(), SAPResponseHandlerLogicalToOdbc(), SAPResponseHandlerNormalize(), SAPResponseHandlerSet()
property SAPSystemNumber as %String (TRUNCATE = 1);
SAP SystemNumber e.g 00
Property methods: SAPSystemNumberDisplayToLogical(), SAPSystemNumberGet(), SAPSystemNumberIsValid(), SAPSystemNumberLogicalToDisplay(), SAPSystemNumberLogicalToOdbc(), SAPSystemNumberNormalize(), SAPSystemNumberSet()
property SAPTraceLevel as %String (VALUELIST = ",0,1,2,3,4,5,6,7,8,9,10") [ InitialExpression = 0 ];
MM20131001 Typical tracelevels for SAPJCO are:
  • 0 - nothing
  • 1 - errors and warnings
  • 2 - execution path, errors and warnings
  • 3 - full execution path, errors and warnings
  • 4 - execution path, info messages, errors and warnings
  • 6 - full execution path, info messages, errors and warnings
  • 7 - debug messages, full execution path, info messages, errors and warnings
  • 8 - verbose debug messages, full execution path, info messages, errors and warnings
Property methods: SAPTraceLevelDisplayToLogical(), SAPTraceLevelGet(), SAPTraceLevelIsValid(), SAPTraceLevelLogicalToDisplay(), SAPTraceLevelLogicalToOdbc(), SAPTraceLevelNormalize(), SAPTraceLevelSet()
property SAPTracePath as %String [ InitialExpression = $system.Util.DataDirectory() ];
MM20171219 Directory path for output of SAPJCO trace.
Property methods: SAPTracePathDisplayToLogical(), SAPTracePathGet(), SAPTracePathIsValid(), SAPTracePathLogicalToDisplay(), SAPTracePathLogicalToOdbc(), SAPTracePathNormalize(), SAPTracePathSet()
property SAPTransactionAutoCommit as %Boolean [ InitialExpression = 1 ];
After a successful BAPI/RFC-call this setting decides if automatically the BAPI "BAPI_TRANSACTION_COMMIT" will be executed.
Property methods: SAPTransactionAutoCommitDisplayToLogical(), SAPTransactionAutoCommitGet(), SAPTransactionAutoCommitIsValid(), SAPTransactionAutoCommitLogicalToDisplay(), SAPTransactionAutoCommitNormalize(), SAPTransactionAutoCommitSet()
property SAPType as %String (VALUELIST = ",A,B") [ InitialExpression = "A" , Required ];
MM 20130917 SAP Type for connect: "A" means direct connect, "B" means load balanced connect
Property methods: SAPTypeDisplayToLogical(), SAPTypeGet(), SAPTypeIsValid(), SAPTypeLogicalToDisplay(), SAPTypeLogicalToOdbc(), SAPTypeNormalize(), SAPTypeSet()
property SAPUser as %String (TRUNCATE = 1);
Derived during initialization from SAPCredentials (Not A Setting)
Property methods: SAPUserDisplayToLogical(), SAPUserGet(), SAPUserIsValid(), SAPUserLogicalToDisplay(), SAPUserLogicalToOdbc(), SAPUserNormalize(), SAPUserSet()
property connJCoDestination as %RegisteredObject;
MM20171201 Fix Session-Handling
Property methods: connJCoDestinationGet(), connJCoDestinationGetSwizzled(), connJCoDestinationIsValid(), connJCoDestinationNewObject(), connJCoDestinationSet()
property connJCoRespository as %RegisteredObject;
MM20171201 Fix Session-Handling
Property methods: connJCoRespositoryGet(), connJCoRespositoryGetSwizzled(), connJCoRespositoryIsValid(), connJCoRespositoryNewObject(), connJCoRespositorySet()
property connJavaGateway as %RegisteredObject;
MM20171201 Fix Session-Handling
Property methods: connJavaGatewayGet(), connJavaGatewayGetSwizzled(), connJavaGatewayIsValid(), connJavaGatewayNewObject(), connJavaGatewaySet()


method %OnNew(pConfigName As %String) as %Status [ Language = objectscript ]
initialize Business Host object
method Connect(ByRef pGateway As EnsLib.JavaGateway.JavaGateway, ByRef pConnection As %ObjectHandle, ByRef pRepository As %ObjectHandle) as %Status [ Language = objectscript ]
Create and initialize a Connection and Repositiory
method DisconnectJavaGateway(pJavaGateway, tSC) as %Status [ Language = objectscript ]
MM20171201 Fix Session-Handling
method EasyConnect(ByRef tJavaGateway, ByRef tJCoDestination, ByRef tJCoRespository) [ Language = objectscript ]
MM20171201 Fix Session-Handling
classmethod GetMessageList() as %String [ Language = objectscript ]
This list will appear in the testing wizard facility in the Management Portal
classmethod GetTableFieldCount(pJCoFunction As %ObjectHandle, Output pCount As %Integer) as %Status [ Language = objectscript ]
Determine the number of fields in a SAP Table
classmethod HaveSapFieldNamed(pJCoParameterList As %ObjectHandle, pSapFieldName As %String, Output pFound As %Boolean, pSapFieldType As %String) as %Status [ Language = objectscript ]
Search the supplied parameter list for a named field.
method OnInit() as %Status [ Language = objectscript ]
This user callback method is called just after %OnNew()
method OnMessage(pRequest As %Library.Persistent, Output pResponse As %Library.Persistent) as %Status [ Language = objectscript ]
This is the default message handler. All request types not declared in the message map are delivered here
classmethod ProcessError(pJCoFunction As %ObjectHandle, pResponse As Ens.Response) as %Status [ Language = objectscript ]
Process Return Value From SAP and derive any error message
method StartTransactionIfNotAlready() [ Language = objectscript ]
MM20171201 Fix Session-Handling
method Transaction(pCommitOrRollback="") as %Status [ Language = objectscript ]
MM20171201 Fix Session-Handling

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new window