Detecting an icon on the toolbar: I am writing an Input Script for transaction IW32 (Change Work Order) Screen SAPLCOIH.3000. I need to determine if the order is in process. The only way I can do this is to look at the icons in the toolbar. They differ according to the status of the order. How can I detect if a certain icon is present on the toolbar?

You can use

if P[xxx]
...
endif

where xxx is the toolbar text (if any).

Alternatively you may use the icon in format

if P[@xy@]

or the tooltip in format

if P[tooltip].