I want to use a function module to read certain data from the material master record. But the Call statement doesn't return any values. In the SAP test environment SE37 the function works correctly. What could be the reason?

In many cases the reason is that the internal format of the material number is not identical to the external format. The external format might contain leading zeros or special editing characters. Please either use a function module that converts the material number from external to internal format:


                 exporting INPUT = material

                 importing OUTPUT = material.

Or, if you are sure that no special editing characters are used, only leading zeros, you can simply add them via the ABAP statements

if material co '0123456789 '.

  Unpack material to material.