Package com.sap.conn.jco
Interface JCoBackgroundUnitAttributes
public interface JCoBackgroundUnitAttributes
Unit Attributes describing some properties of a processed bgRFC unit in the backend.
To get an empty instance of unit attributes use JCo.createFunctionUnitAttributes()
-
Method Summary
Modifier and TypeMethodDescriptionReturns the SAP client associated with the unit.Returns the sending application server instance (host name).Returns the program name associated with the unit.Returns the sendingTime the time when the associated unit is transmitted.Returns the ABAP transaction associated with the unit.Returns the user ID associated with the unit.boolean
Returns whether a commit check is done in the backend for the associated unit.boolean
Returns whether the backend shall write kernel traces for this unit.boolean
Returns whether the backend shall keep a history of the associated unit.boolean
Returns whether the associated unit will be locked.void
Allows setting the SAP client attribute.void
setCommitCheckOn
(boolean checkOn) Allows adjusting the commit check attribute.void
setKernelTrace
(boolean traceOn) Allows setting the kernel trace attribute.void
setLock
(boolean lock) Allows setting the lock attribute.void
setProgramName
(String programName) Allows setting the program name attribute.void
setTransactionCode
(String transactionCode) Allows setting the ABAP transaction code.void
setUnitHistory
(boolean historyOn) Allows setting the unit history attribute.void
Allows setting the user attribute.
-
Method Details
-
setKernelTrace
void setKernelTrace(boolean traceOn) Allows setting the kernel trace attribute. The backend will write kernel traces, while executing this unit. By default, no traces will be written.- Parameters:
traceOn
- Turns on kernel trace if set to true, turns it off otherwise
-
isKernelTraceOn
boolean isKernelTraceOn()Returns whether the backend shall write kernel traces for this unit.- Returns:
- whether the backend shall write kernel traces for this unit.
-
setUnitHistory
void setUnitHistory(boolean historyOn) Allows setting the unit history attribute. The backend will keep a history for this unit. By default no history is kept by the backend.- Parameters:
historyOn
- Turns on the unit history if set to true, turns it off otherwise
-
isUnitHistoryOn
boolean isUnitHistoryOn()Returns whether the backend shall keep a history of the associated unit.- Returns:
- whether the backend shall keep a history of the associated unit.
-
setLock
void setLock(boolean lock) Allows setting the lock attribute. It can be used only for units of type 'Q': The unit will be written to the queue, but not processed. The unit can then be started manually in the ABAP debugger. By default, a unit is simply processed.- Parameters:
lock
- Locks the unit if set to true, otherwise nothing special happens.
-
isUnitLocked
boolean isUnitLocked()Returns whether the associated unit will be locked.- Returns:
- whether the associated unit will be locked.
-
setCommitCheckOn
void setCommitCheckOn(boolean checkOn) Allows adjusting the commit check attribute. When turning the commit check on, the backend will check during the execution of a unit, whether one of the unit's function modules triggers an explicit or implicitCOMMIT WORK
. In this case the unit is aborted with an error, because the transactional integrity of this unit cannot be guaranteed. By default, the commit check is turned off. Hence, the behavior mentioned above is suppressed, meaning the unit will be executed anyway, even if one of its function modules misbehaves and triggers aCOMMIT WORK
.- Parameters:
checkOn
- turns on commit if set to true, turns it off, if set to false
-
isCommitCheckOn
boolean isCommitCheckOn()Returns whether a commit check is done in the backend for the associated unit.- Returns:
- whether a commit check is done in the backend for the associated unit.
-
setUser
Allows setting the user attribute. The user will be associated with the unit in the backend. This is useful, if the environment in which JCo is used has its own user management. By default, the user of the backend connection will be passed.- Parameters:
userID
- The user to associate with the unit.
-
getUserID
String getUserID()Returns the user ID associated with the unit.- Returns:
- the user ID associated with the unit.
-
setClient
Allows setting the SAP client attribute. The SAP client will be associated with the unit in the backend. This is useful, if the environment in which JCo is used has a tenant concept. By default, the client of the backend connection will be passed.- Parameters:
client
- The SAP client to associate with the unit.
-
getClient
String getClient()Returns the SAP client associated with the unit.- Returns:
- the SAP client associated with the unit.
-
setProgramName
Allows setting the program name attribute. The program name will be associated with the unit in the backend. This is useful for identifying the logical application that triggered the unit. By default, the first class in the stack trace that does not belong to JCo will be passed.- Parameters:
programName
- The program name to associate with the unit.
-
getProgramName
String getProgramName()Returns the program name associated with the unit.- Returns:
- the program name associated with the unit.
-
setTransactionCode
Allows setting the ABAP transaction code. The default value is an empty string. Usually there is no useful meaning for this in external programs, nevertheless the sent transaction code might be useful.- Parameters:
transactionCode
- the ABAP transaction code.
-
getTransactionCode
String getTransactionCode()Returns the ABAP transaction associated with the unit.- Returns:
- the ABAP transaction associated with the unit.
- Since:
- JCo 3.1.0
-
getSendingTime
String getSendingTime()Returns the sendingTime the time when the associated unit is transmitted.- Returns:
- sendingTime the time when the associated unit is transmitted.
- Since:
- JCo 3.1.0
-
getHostName
String getHostName()Returns the sending application server instance (host name).- Returns:
- the sending application server instance (host name).
- Since:
- JCo 3.1.0
-