‎2008 Jun 23 6:31 PM
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
‎2008 Jun 23 6:36 PM
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.
‎2008 Jun 23 6:36 PM
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.
‎2008 Jun 23 6:36 PM
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.
‎2008 Jun 23 6:42 PM
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
‎2008 Jun 23 6:56 PM
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.