In transaction CS03 I added a new pushbutton that calls up transaction ZS13 (function code "/OZS13), and starts an InputScript. In my InputScript I use the the variable &[::Material] (the most recently entered material number), but it is always empty. Why?

With function code "/O..." you open up a new mode, which has a completely new set of variables. In order to transfer the material number from the first mode to the new one, you have to use parameters in your InputScript. The parameter values are automatically carried over.