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: 

FUNCTION 'MESSAGE_STORE'

Former Member
0 Kudos

hi,

i'm using this function module, it's working fine :

CALL FUNCTION 'MESSAGES_INITIALIZE'.

LOOP AT gt_return.

CALL FUNCTION 'MESSAGE_STORE'

EXPORTING

arbgb = gt_return-id

exception_if_not_active = ' '

msgty = gt_return-type

msgv1 = gt_return-message_v1

msgv2 = gt_return-message_v2

msgv3 = gt_return-message_v3

msgv4 = gt_return-message_v4

txtnr = gt_return-number

zeile = ' '

EXCEPTIONS

message_type_not_valid = 1

not_active = 2

OTHERS = 3.

ENDLOOP.

however, can u please explain me how can i use this FM with the following requirement :

i want to show the message, but displaying the material number. for example with this instruction it's possíble :

message e003(Z_DOCEX_MM) with wa_material-matnr

how can i do that using this function module ?

Mário.

Edited by: Julius Bussche on Jun 23, 2008 8:34 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Just put the value in the parameters msgv1, msgv2, msgv3 and msgv4.


CALL FUNCTION 'MESSAGE_STORE'
EXPORTING
arbgb = Z_DOCEX_MM
msgty = 'E'
msgv1 = wa_material-matnr
txtnr = '003'
zeile = ' '
EXCEPTIONS
message_type_not_valid = 1
not_active = 2
OTHERS = 3.

Regards.

4 REPLIES 4

Former Member
0 Kudos

Hello,

Just put the value in the parameters msgv1, msgv2, msgv3 and msgv4.


CALL FUNCTION 'MESSAGE_STORE'
EXPORTING
arbgb = Z_DOCEX_MM
msgty = 'E'
msgv1 = wa_material-matnr
txtnr = '003'
zeile = ' '
EXCEPTIONS
message_type_not_valid = 1
not_active = 2
OTHERS = 3.

Regards.

former_member156446
Active Contributor
0 Kudos

Hi there.. after the FM call and inside the loop do like this..

read table gt_return index 1.
if sy-subrc eq 0.
concatenate gt_return-message_v1 matnr into gt_return-message_v1.

"<<do what you want to do with the message..
end if.

Former Member
0 Kudos

Hi,

if i am wrong please correct me.

Is it you want to show the error messages after using this above FM? is that your question?



If  msgty = 'E' (ie error)
concatenate msgv1 msgv2 msgv3 msgv4 into wa_material-matnr.
endif.

Finally all your error message will be in wa_material-matnr

Thanks

Virkanth

Edited by: Khimavath Vikranth on Jun 23, 2008 7:43 PM

Former Member
0 Kudos

hi,

Thanks a lot for the quick answers. I found out that i can put it directly in the following parameter:

CALL FUNCTION 'MESSAGE_STORE'

EXPORTING

ARBGB = 'Z_DOCEX_MM'

EXCEPTION_IF_NOT_ACTIVE = ' '

MSGTY = 'E'

TXTNR = '001'

ZEILE = here i put the material. <<<<<<<<<<<<<<<<<<<<

  • IMPORTING

  • ACT_SEVERITY =

  • MAX_SEVERITY =

  • EXCEPTIONS

  • MESSAGE_TYPE_NOT_VALID = 1

  • NOT_ACTIVE = 2

  • OTHERS = 3

Thanks a lot, points 4 the answers !

Best regards,

Mário.