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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getClient()` Returns the SAP client associated with the unit.
    `String` | `getProgramName()` Returns the program name associated with the unit.
    `String` | `getUserID()` Returns the user ID associated with the unit.
    `boolean` | `isCommitCheckOn()` Returns whether a commit check is done in the backend for the associated unit.
    `boolean` | `isKernelTraceOn()` Returns whether the backend shall write kernel traces for this unit.
    `boolean` | `isUnitHistoryOn()` Returns whether the backend shall keep a history of the associated unit.
    `boolean` | `isUnitLocked()` Returns whether the associated unit will be locked.
    `void` | `setClient(String client)` 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` | `setUnitHistory(boolean historyOn)` Allows setting the unit history attribute.
    `void` | `setUser(String userID)` Allows setting the user attribute.

- - ### Method Detail

    - #### 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 implicit `COMMIT 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 a `COMMIT 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

          void setUser(String userID)

      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

          void setClient(String client)

      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

          void setProgramName(String programName)

      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.

Copyright © 2018 SAP. All Rights Reserved.