How to test the Change methodThis topic describes how you can test a Business Object's public Change method. XML schema file request This diagram shows the XML schema file of the request argument of the change method of the Order (tlbct790) Business Object. tl bct bl790bcgrq0000.xsd tlbct790-Change-Request Enter request The main difference between the Create method and the Change method is that the Change method runs on an existing object in LN As you can see by the red markings in the Graphical Browser, specifying the object ID is mandatory: You are free to specify the attributes that must be changed. In the previous example, the installAt attribute must be changed from COR to TOM on the header, and the orderedQuantityValue attribute must be changed from 100 to 8. Hinweis: Remove the attributes that must not be modified from the Graphical Browser. Action type For the Change method, some additional functionality is available. On the component level, you must enter the action type. You can find these menu options in the Menu Browser's Zusatzoptionen menu:
You can also select these options on the shortcut menu when you right-click a component. In this way, you can also delete lines by means of the Change method. The next request is an example in which the installAt attribute is changed and lineNumber 10 is deleted. Save the Request argument and close the graphical browser to return to the BOL Test Tool - Public Layer (tlbct3250m000) session. Execute test After the Request argument is created, you can run the test. Click Execute Test. See Execute test For a successful execution, the Response Graphical Browser does not contain information. View result Assume that the application logic is as follows. You cannot modify the installAtBP attribute if the order is Approved: The DAL script contains this code: function extern domain tcbool tlbct700.bpsh.is.readonly() { if tlbct700.stat = tlbct.stat.approved then dal.set.error.message("@Order is approved") return(true) endif return(false) } In that case, an error is presented in the Result Graphical Browser format.
| |||