2.2.11

SAP Note 21560 - Using system fields SY-MSGV1-4 with MESSAGE

Symptom:

Even though system field SY-MSGV1 is set to "A" before a MESSAGE statement, the statement MESSAGE E001 WITH "B" SY-MSGV1 (with message 001: "Var1=&1 Var2=&2") causes the message Var1=B Var2=B to be issued.

Reason and Prerequisites

The MESSAGE statement itself uses the system fields SY-MSGV1 ... SY-MSGV4.

This symptom seems to be restricted to release 46C.

Solution
Before you use a MESSAGE statement, save the variables SY-MSGV1 ... SY-MSGV4 in separate variables:
DATA V1 LIKE SY-MSGV1.
...
V1 = SY-MSGV1.
MESSAGE E001 WITH "B" V1.

No comments:

Post a Comment