Application Development 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: 

Structure BDCMSGCOLL

Former Member
0 Kudos

Hi all,

In the structure BDCMSGCOLL, what does MSGV1, MSGV2, MSGV3, MSGV4 denote. would u please clarify about the same.

Regards,

John

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

MSGV1, MSGV2, MSGV3, MSGV4 are the field which contain parts of the message.

The structure BDCMSGCOLL also consists of msgid and msgnr -the message id and number..

You can use the FM <b>FORMAT_MESSAGE</b> to combine all these fields together to get the complete message

e.g

call function 'FORMAT_MESSAGE'

exporting

id = wa_messages-msgid

lang = sy-langu

no = wa_messages-msgnr

v1 = wa_messages-msgv1

v2 = wa_messages-msgv2

v3 = wa_messages-msgv3

v4 = wa_messages-msgv4

importing

msg = lv_msg

exceptions

not_found = 1

others = 2.

Using the components of structure BDCMSGCOLL you can combine them to get the complete message

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Those fields are the variable fields. For example if a mesage is return which has the object number in it, like sales document number, then this value would be in one those fields, probably the first.

<i>Sales Document 12345 was created.</i>

Here the value 12345 will be in the MSGV1 field.

So there is a possibility that all four fields could be filled with values.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi John,

You can store the values of variable in message.

msgno55 - & & & &

so you can pass values of MSGV1,V2,V3,V4 values and you can construct total message like 'No record found ZTABLE'.

Regards

Bhupal Reddy

Former Member
0 Kudos

the below ones are used for storing the messages generated during the execution of the BDC...Say ur creating material...Material no &soandso& created gets stored in MSGVnn.

1 is used for message id

1 is used to store message number

1 is used to store actual message.....

Former Member
0 Kudos

Hi

MSGV1, MSGV2, MSGV3, MSGV4 are the field which contain parts of the message.

The structure BDCMSGCOLL also consists of msgid and msgnr -the message id and number..

You can use the FM <b>FORMAT_MESSAGE</b> to combine all these fields together to get the complete message

e.g

call function 'FORMAT_MESSAGE'

exporting

id = wa_messages-msgid

lang = sy-langu

no = wa_messages-msgnr

v1 = wa_messages-msgv1

v2 = wa_messages-msgv2

v3 = wa_messages-msgv3

v4 = wa_messages-msgv4

importing

msg = lv_msg

exceptions

not_found = 1

others = 2.

Using the components of structure BDCMSGCOLL you can combine them to get the complete message