Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

v1 , v2,v3,v4 messages in format message function module

Former Member
0 Likes
6,697

dear all,

what are the v1 , v2,v3,v4 error messages in format message function module.

what is the difference between these.

dear all,

what are the v1 , v2,v3,v4 error messages in format message function module.

what is the difference between these.

2 REPLIES 2
Read only

Former Member
0 Likes
2,591

Addition 1

... WITH f1 ... f4

Effect

Inserts the contents of a field fi in the message instead of in the placeholder &i. If unnumbered variables (&) are used in a message text, these are replaced consecutively by the fields f1 to f4.

To aid compilation, only numbered variables (&1 to &4) are to be used in future if several fields are involved.

If a "&" is supposed to appear in the message at runtime, you must enter &&.

In the long text of a message, the symbol &Vi& is replaced by the field contents of fi.

After WITH, you can specify 1 to 4 fields.

v1 -v4 is variable which replace symbol & in message text.

try FM with this parameters

ID 38

LANG sEN

NO 001

V1 THIS

V2 IS

V3 SIMPLE

V4 MESSAGE

Edited by: Andrey Ryazanov on Apr 29, 2008 8:43 AM

Read only

Former Member
0 Likes
2,591

Hi,

This is how it works..

*   Get the message returned by Call transaction
    call function 'FORMAT_MESSAGE'
      exporting
        id        = l_is_message-msgid
        lang      = sy-langu
        no        = l_is_message-msgnr
        v1        = l_is_message-msgv1
        v2        = l_is_message-msgv2
        v3        = l_is_message-msgv3
        v4        = l_is_message-msgv4
      importing
        msg       = l_message
      exceptions
        not_found = 1
        others    = 2.

Each of these V1-V4 are 100 character fields which splits the messages returned by transactions. We use this FM to get the meaningful message out of V1-V4.

Reward points if useful,

Thanks,

Rahul