Quantity fields or currency fields do not appear in the proper format in messages or list headers. The "Extended program check" (transaction SLIN) indicates missing UNIT specifications in a MESSAGE statement.
Cause and prerequisitesParameters in list headers have the form "&n....." (n = 0, 1, ..., 9) and are replaced at runtime with the contents of the SY-TVARn fields. SY-TVARn was not provided with data in the correct manner.
Most frequent cause: use of MOVE instead of WRITE TO. Parameters of a MESSAGE statement are formatted internally by means of WRITE TO. Because quantity and currency fields are only rarely specified after WITH, there is no special syntax for doing so. On the other hand, quantity and currency fields are not automatically formatted for a quantity or currency unit in WRITE [TO]; the unit must be explicitly specified using an additional UNIT or CURRENCY specification.
Values that appear in a list or on screen should always be formatted with WRITE [TO]. Assignment using MOVE (or COMPUTE) is only intended for program-internal field transport. Therefore, use WRITE TO to provide the SY-TVARn fields with data. The UNIT specification is used for quantity fields; CURRENCY for currency fields. Example:
WRITE LFC1-UMSAV CURRENCY T001-WAERS LEFT-JUSTIFIED TO SY-TVAR1.
If quantity or currency information is to appear in a message, then use an auxilliary field in the MESSAGE statement that is provided with data by WRITE TO as indicated above.
The same applies when the BREAK-POINT statement is assigned a parameter for test purpose, since the SysLog records this when the program does not run online.
No comments:
Post a Comment