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: 

How to get a string if I know message id, message type and number?

Former Member
0 Kudos
932

For example , if I want to get a string from the following code, how can I do?

MESSAGE ID 'COM_PARTNER' TYPE 'I' NUMBER 116.

Best regards,

1 ACCEPTED SOLUTION

Former Member
0 Kudos
536

Programmatically:

CALL FUNCTION 'BALW_BAPIRETURN_GET2'

EXPORTING

type = sy-msgty

cl = sy-msgid

number = sy-msgno

par1 = sy-msgv1

par2 = sy-msgv2

par3 = sy-msgv3

par4 = sy-msgv4

IMPORTING

return = it_ret1.

OR use se91

2 REPLIES 2

Former Member
0 Kudos
537

Programmatically:

CALL FUNCTION 'BALW_BAPIRETURN_GET2'

EXPORTING

type = sy-msgty

cl = sy-msgid

number = sy-msgno

par1 = sy-msgv1

par2 = sy-msgv2

par3 = sy-msgv3

par4 = sy-msgv4

IMPORTING

return = it_ret1.

OR use se91

Former Member
0 Kudos
536

Hi,

Try this -

DATA mtext TYPE string.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

INTO mtext

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

OR

call function BAPI_MESSAGE_GETDETAIL.

Cheers.

...Reward if useful