SAP Message W8198 - Value of type & is used for defining date (type &)

Diagnosis
You are trying to assign an element of data type &v1& to an element ofdata type &v2&.

System Response
In cases concerning assignments, a conversion is executed at runtimeinvolving &v1& in &v2&, under the following rules:

  • N -> D,,First the conversion N -> C takes place and then C -> D.

  • N -> C,,The numerical field is treated like a text field,

  • ,,,,,,leading zeros are retained.
    • C -> D,, the text field should contain an 8-digit date in the form

    • ,,,,,,YYYYMMDD.

      Procedure
      You should ensure that only data type &V2& can be included whencalculating difference days. The necessary type conversions (MOVE) areexecuted internally automatically before the arithmetic operation. Forreasons of efficiency, however, only operands of the same numeric datatype should occur within one arithmetic expression, if possible (up tothe operands for STRLEN): in such cases, no conversion is required andspecial internal optimization can be carried out.