Powered by Acorel, experts on SAP Hybris, SAP Hybris Cloud for Customer, SAP CRM and Mobility.
Wednesday, February 9, 2011
Testing SWO1 objects and conditions
When working with actions, you may need complex schedule- and startconditions. When customizing these conditions, it can be very handy to use the different test / simulate options. Both the SWO1 as well as the conditions maintenance transaction have the possibility to test with an existing business object. This way, you can test (and analyze and even debug) with different situations quickly directly while maintaining.
Testing an object in SWO1
In SWO1, when you have created a new attribute or a new method, you can test this with an existing object by clicking the test button. In the popup, you should enter the key of an existing object (for instance the GUID of a transaction, or a partnernumber). The system will now show the data in the structure of the BUSObject. You will also be able to test (and debug) the methods.
In the conditions maintenance, you can also use the test button, and use an existing instance to simulate the condition.
When in the action condition editor (CRMC_ACTION_CONF), you can choose between Full screen and Popup mode. In both modes, you will be able to test the condition, but the test buttons will be in a different place...
Find the 'Enter Test Data' button.
In the popup, select the line of the business object, and below, enter or select an object.
When occupied properly, you will be able to see the details of the object if you expand the tree.
Now close the popup and click on the 'Evaluate condition with test data' button. The condition test will now tell you whether the condition returns true or false. This is a good place to debug as well if you really can't figure it out :-).