# SAP Library

SAP Libraries aid in automating the flow of transactions using SAP GUI Client, pre-requisites are to ensure the SAP GUI Latest client is installed on the desktop where the RPA Agent in running. If we have no option to automate SAP in an native way using our SAP Automation Agent then developers can apply this approach.

# Method: LaunchSAPGui()

To launch SAP logon pad

# Method: LoginSAP(string client, string username, string password, string language, bool encrypted)

To login SAP system

Parameters:

Fields
client String -The ID of the client
username String - The username of the client
password String -The password of the client
language String -selection of language
encrypted Boolean -encrypt the password

# Method: PressEnter()

Specifies the press key event

# Method: TriggerOKCode(string okCode)

To Trigger a function code

Parameters:

Fields
okCode String - function code

# Method: LaunchTransaction(string tCode, bool newWindow)

To Open a new Transaction

Parameters:

Fields
tCode String - new transaction
newWindow bool* - opens in new window or existing window

# Method: SelectRadioButton(string radioButtonID)

To select Radio button using id

Parameters:

Fields
radioButtonID String - specifies the radio button to be selected

# Method: GetTextField(string fieldID)

To get the value of the text field

Parameters:

Fields
fieldID String - specifies the textfield

# Method: SetTextField(string fieldID, string fieldValue)

To set the value of textfield

Parameters:

Fields
fieldID String - specifies the textfield
fieldValue String - specifies the value entered in the textfield

# Method: PressButtonById(string buttonID)

To click a button using ID

Parameters:

Fields
buttonID String - specifies the button to be clicked

# Method: PressButtonByName(string buttonName)

To click a button using Name

Parameters:

Fields
buttonName String - specifies the button to be clicked

# Method: SelectMenu(string menu, string itemName)

To select the Menu

Parameters:

Fields
menu String - specifies the menu
itemName String - specifies the item in the menu

# Method: StopSAP()

To stop SAP sessions