MODIFY_OBJECT

Use the MODIFY_OBJECT script function to modify an existing Calendar, Login or static VARA object.

Notes:

Tips:

Calendar Object

Use the MODIFY_OBJECT script function to modify the following settings of a Calendar object:

For more information, see Calendars (CALE).

Tips:

Syntax

MODIFY_OBJECT (Object name, [Title], [Calendar Event] [,[Date format:]Date1] [,[Date format:]Date2]])

Parameters

Notes:

Return Codes

The script function has the following return codes when you modify a Calendar object:

Example

A Calendar object called FIRM.CALENDAR contains a Calendar Event called WORKDAYS. The following script changes the start and end date of the Calendar Event. The script omits the title parameter, so the calendar title remains unchanged.

:SET &RET# = MODIFY_OBJECT("FIRM.CALENDAR",,"WORKDAYS","DD.MM.YYYY:01.05.2011","DD.MM.YYYY:01.05.2012")

Login Object

Use the MODIFY_OBJECT script function to modify the following settings of a Login object:

For more information, see Login (LOGIN).

MODIFY_OBJECT lets you automate the administration of users, such changing Automation Engine passwords externally.

To change an existing entry, specify an Agent (and the Agent type) which is already available in the Login object. If the Agent and Agent type that you specify do not match each other, the script line has no effect.

Syntax

MODIFY_OBJECT (Object name, [Title], Agent, Agent type, Login info, [Password], [Action])

Parameters

Return Codes

The script function has the following return codes when you modify a Login object:

Examples

A Login object called LOGIN.SMITH contains login information of a user called Smith. The following script sets two passwords for a UNIX Agent for this user. If the Login object already includes these entries, the passwords are updated to apple and ninja, respectively.

:SET &RET# = MODIFY_OBJECT("LOGIN.SMITH",,"UNIX01","UNIX","apple","uc4","ADD1")
:SET &RET# = MODIFY_OBJECT("LOGIN.SMITH",,"UNIX01","UNIX","ninja","uc4","ADD2")

The following example deletes the login data for Smith in Client 012 of an SAP system called SAP01. If this is the last password in the credential, the whole credential entry is deleted.

:SET &RET# = MODIFY_OBJECT("LOGIN.SMITH",,"SAP01","R3","012,smith","","DEL1")

Static VARA Object

Use the MODIFY_OBJECT script function to change the following settings of a static VARA object:

For more information, see User-Defined VARA Objects.

Important!

Syntax

MODIFY_OBJECT (Object name, [Title], [Error handling], [Data type])

Parameters

Return Codes

The script function has the following return codes when you modify a static VARA object:

Example

The following script reads the error number after the execution of an XML VARA object, and prints the error in the activation report:

:SET &HND# = MODIFY_OBJECT(VARA.XML.NEW.1, "TEST TITLE", E, C)
:SET &ERRNR# = SYS_LAST_ERR_NR()
:PRINT ">&ERRNR#<"
:IF &ERRNR# <> "0"
: SET &ERRINS# = SYS_LAST_ERR_INS()
: SET &MESSAGE# = GET_MSG_TXT (&ERRNR# ,&ERRINS#)
: PRINT &MESSAGE#
:ENDIF

See also: