How to test the Delete method

This topic describes how you can test the public Delete method of a Business Object.

XML schema file request

The following figure shows the XML schema file of the Request argument of the Delete method of the Order (tlbct790) Business Object.

tl bct bl790bdlrq0000.xsd
		  tlbct790-Delete-Request

tl bct bl790bdlrq0000.xsd tlbct790-Delete-Request

Enter the request

In this example order six, one line, is deleted. To do so, fill in the orderNumber attribute. All lines must be deleted.

[...]

You cannot delete lines separately with the delete method. To delete these lines separately, you can use the Delete action type in the Change method. Refer to Action type for details.

Save the Request argument and close the graphical browser to return to the BOL Test Tool - Public Layer (tlbct3250m000) session.

Execute Test

When the Request argument is created, you can run the test. Click Execute Test. Refer to Execute test for details.

View response

If the request is successful, the Response Graphical Browser looks as follows:

[...]

As you can see, the Graphical Browser does not contain information.

View Result

Assume the application logic as follows: approved orders cannot be deleted.

The DAL script contains the following code:

function domain tcbool destroy.method.is.allowed()
{
 if tlbct700.stat = gaadv.stat.approved then
     dal.set.error.message("@Not allowed to delete Order")
     dal.set.error.message("@Order Life Cycle is Approved")
     return(false)
 endif

 return(true)
}

The Result message looks like the following:

[...]