Session & Transaction Management
sapExecuteTransaction
Since: 3.0
Description: Execute an SAP transaction code (e.g., VA01, ME23N).
Input Format: Transaction code (e.g., VA01)
| ObjectName | Action | Input | Condition | Reference | |
|---|---|---|---|---|---|
| Browser | sapExecuteTransaction |
@value | |||
| Browser | sapExecuteTransaction |
Sheet:Column | |||
| Browser | sapExecuteTransaction |
%dynamicVar% |
@Action(object = ObjectType.BROWSER, desc = "Execute SAP transaction [<Data>]", input = InputType.YES)
public void sapExecuteTransaction() {
try {
Dispatch.call(SAPsession, "startTransaction", Data);
Report.updateTestLog(Action, "Executed transaction [" + Data + "]", Status.DONE);
} catch (Exception e) {
Report.updateTestLog(Action, "Failed to execute transaction. Error: " + e.getMessage(), Status.FAILNS);
}
}
sapEndTransaction
Since: 3.0
Description: End the current SAP transaction.
Input Format: None
| ObjectName | Action | Input | Condition | Reference | |
|---|---|---|---|---|---|
| Browser | sapEndTransaction |
@Action(object = ObjectType.BROWSER, desc = "End current SAP transaction", input = InputType.NO)
public void sapEndTransaction() {
try {
Dispatch.call(SAPsession, "endTransaction");
Report.updateTestLog(Action, "Ended current transaction successfully", Status.DONE);
} catch (Exception e) {
Report.updateTestLog(Action, "Failed to end transaction. Error: " + e.getMessage(), Status.FAILNS);
}
}
sapRefreshSession
Since: 3.0
Description: Refresh the SAP session.
Input Format: None
| ObjectName | Action | Input | Condition | Reference | |
|---|---|---|---|---|---|
| Browser | sapRefreshSession |
@Action(object = ObjectType.BROWSER, desc = "Refresh SAP session", input = InputType.NO)
public void sapRefreshSession() {
try {
Dispatch.call(SAPsession, "Refresh");
Report.updateTestLog(Action, "SAP session refreshed", Status.DONE);
} catch (Exception e) {
Report.updateTestLog(Action, "Failed to refresh session. Error: " + e.getMessage(), Status.FAILNS);
}
}