Class Reference
EnsLib.SAP.Operation
Server:appadmin-00044-deployment-6bf4cbc86d-9f4xc
Instance:IRIS
User:SuperUser
 
-
  [USER] >  [EnsLib] >  [SAP] >  [Operation]
Private  Storage

class EnsLib.SAP.Operation extends Ens.BusinessOperation

SAP connectivity through SAPJCo. Supporting SAPJCo 3.07+

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 23 17


Summary

This is a Business Operation class.

RequestResponse
%Library.Persistent %Library.Persistent

Properties
%AlertStartTime %ConfigName %ConfigQueueName %LastActionTime
%LastHandledTime %LastReportedError %QuitTask %RequestHeader
%SessionId %SuperSession %WarnedLatest %isShadow
Adapter AlertGroups AlertOnError AlertRetryGracePeriod
ArchiveIO BusinessPartner DeferResponse FailureTimeout
IOLogEntry InactivityTimeout JavaGatewayAddress JavaGatewayConfigItemName
JavaGatewayPort NoFailWhileDisconnected QueueCountAlert QueueWaitAlert
ReplyCodeActions Retry RetryCount RetryInterval
SAPClient SAPCredentials SAPGWHost SAPGWServ
SAPGroup SAPHost SAPLanguage SAPMSHost
SAPPassword SAPR3Name SAPResponseHandler SAPSystemNumber
SAPTraceLevel SAPTracePath SAPTransactionAutoCommit SAPType
SAPUser SendSuperSession SuspendMessage ThrottleDelay
connJCoDestination connJCoRespository connJavaGateway

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnClose %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %SuperSessionSet %ValidateObject AdapterName
AssignOneSetting CloseIOLogEntry Connect DeferResponse
DisconnectJavaGateway EasyConnect EnumerateSettingsClose EnumerateSettingsExecute
EnumerateSettingsFetch GenerateSuperSession GetDeferredResponseToken GetMessageList
GetMsgHdrRequestKey GetProductionSettingValue GetProductionSettings GetPropertyConnections
GetSettings GetShadowInstance GetTableFieldCount HaveSapFieldNamed
IncludeSuperSession NewIOLogEntry OnError OnFailureTimeout
OnGenerateSuperSession OnGetConnections OnGetReplyAction OnInit
OnKeepalive OnMessage OnMonitor OnProductionStart
OnProductionStop OnTearDown ProcessError QueueName
SaveIOLogEntry SendAlert SendDeferredResponse SendRequestAsync
SendRequestSync StartTransactionIfNotAlready Transaction


Parameters

• parameter DOMAIN = "EnsSAP";
Domain for $$$Text()
• parameter INVOCATION = "Queue";
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

Properties

• 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 JavaGatewayConfigItemName as %String(MAXLEN=100);
This is the name of the (required) configuration item which hosts the JavaGateway.
• 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 SAPClient as %String(TRUNCATE=1);
SAP Client e.g 000
• property SAPCredentials as %String;
This is the ID name of the set of credentials values to be used to access the external system
• property SAPGWHost as %String(MAXLEN=1024);
MM 20130917 Used for loadbalanced Type "B" connect. Gateway Host (jco.client.gwhost).
• property SAPGWServ as %String(TRUNCATE=1);
MM 20130917 Used for loadbalanced Type "B" connect. Gateway Service (jco.client.gwserv).
• property SAPGroup as %String(TRUNCATE=1);
MM 20130917 Used for loadbalanced Type "B" connect. SAP Group (jco.client.group).
• property SAPHost as %String(MAXLEN=1024);
MM 20130917 SAPHost is the SAP server's network name or IP address (jco.client.ashost).
• property SAPLanguage as %String(TRUNCATE=1);
• property SAPMSHost as %String(MAXLEN=1024);
MM 20130917 Used for loadbalanced Type "B" connect. Message Server Host (jco.client.mshost).
• property SAPPassword as %String(TRUNCATE=1);
Derived during initialization from SAPCredentials (Not A Setting)
• property SAPR3Name as %String(TRUNCATE=1);
MM 20130917 Used for loadbalanced Type "B" connect. SAP Group (jco.client.r3name).
• property SAPResponseHandler as %String(MAXLEN=100);
Errorhandler, typically a BO or BP. The Errorhandler will get the SAP Response.
• property SAPSystemNumber as %String(TRUNCATE=1);
SAP SystemNumber e.g 00
• 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 SAPTracePath as %String [ InitialExpression = $system.Util.DataDirectory() ];
MM20171219 Directory path for output of SAPJCO trace.
• 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 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 SAPUser as %String(TRUNCATE=1);
Derived during initialization from SAPCredentials (Not A Setting)
• property connJCoDestination as %RegisteredObject;
MM20171201 Fix Session-Handling
• property connJCoRespository as %RegisteredObject;
MM20171201 Fix Session-Handling
• property connJavaGateway as %RegisteredObject;
MM20171201 Fix Session-Handling

Methods

• method %OnNew(pConfigName As %String) as %Status
initialize Business Host object
• method Connect(ByRef pGateway As EnsLib.JavaGateway.JavaGateway, ByRef pConnection As %ObjectHandle, ByRef pRepository As %ObjectHandle) as %Status
Create and initialize a Connection and Repositiory
• method DisconnectJavaGateway(pJavaGateway, tSC) as %Status
MM20171201 Fix Session-Handling
• method EasyConnect(ByRef tJavaGateway, ByRef tJCoDestination, ByRef tJCoRespository)
MM20171201 Fix Session-Handling
• classmethod GetMessageList() as %String
This list will appear in the testing wizard facility in the Management Portal
• classmethod GetTableFieldCount(pJCoFunction As %ObjectHandle, Output pCount As %Integer) as %Status
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
Search the supplied parameter list for a named field.
• method OnInit() as %Status
This user callback method is called just after %OnNew()
• method OnMessage(pRequest As %Library.Persistent, Output pResponse As %Library.Persistent) as %Status
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
Process Return Value From SAP and derive any error message
• method StartTransactionIfNotAlready()
MM20171201 Fix Session-Handling
• method Transaction(pCommitOrRollback="") as %Status
MM20171201 Fix Session-Handling


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.