‎2006 Sep 26 5:14 AM
Hi All,
I want to capture the message Generated by Messae class M7060 i.e 'Document & Posted' , '&' will be replaced by a number during runtime and i want to capture this number to a variable.Please help!
Thanks in advance
Sandeep Shenoy
‎2006 Sep 26 5:16 AM
‎2006 Sep 26 5:24 AM
Chandra, thanks for the reply ,but sy-msgno gives 060 but i need the contents of it not msgno.
‎2006 Sep 26 5:27 AM
ok use FM TG_MESSAGE_BUILD
i am not sure abt the name of FM as i dont have sap now , search in se37 for messagebuild , u will get one FM use that FM and pass sy-msgno , it will give u the message
‎2006 Sep 26 5:30 AM
goto debugging mode and set the watchpoint on SY-MSGNO = 060. It takes u to the message statement, where you can find the variable name which will replace the & in Message class. Hope this will be helpfull.
Regards:-
Santosh.D
‎2006 Sep 26 5:43 AM
chk this
CALL FUNCTION 'TB_MESSAGE_BUILD_TEXT'
EXPORTING
LANGU = SY-LANGU
MSGID = P_SY_MSGID
MSGNO = P_SY_MSGNO
MSGV1 = P_SY_MSGV1
MSGV2 = P_SY_MSGV2
MSGV3 = P_SY_MSGV3
MSGV4 = P_SY_MSGV4
IMPORTING
TEXT = P_L_ERR_MSG.
‎2006 Sep 26 5:46 AM
hi sandeep,
try using the FM MESSAGE_PREPARE.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
LANGUAGE = EN
MSG_ID = ZZ
MSG_NO = w_no
MSG_VAR1 = w_var1
MSG_VAR2 = w_var2
MSG_VAR3 = w_var3
IMPORTING
MSG_TEXT = W_MSGTEXT
EXCEPTIONS
FUNCTION_NOT_COMPLETED = 1
MESSAGE_NOT_FOUND = 2
OTHERS = 3.
hope this helps,
do reward if it helps,
priya.
‎2006 Sep 26 5:48 AM
hi,
In the program says,
data: v_test(3) tyep c value '123'.
message e060(m7) with v_test.
data: v_temp like v_test.
v_temp = v_test.You haev to modify the program for this.
If it is a Standard program, as you can not modify the program, you can not hte value captured.
Regards,
Sailaja.
‎2006 Sep 26 5:53 AM
Hi,
iN CALL TRANSACTION for MB1B tcode you r trying to create MBLNR if you want to capture them
Call transaction 'MB1B' using bdcdata messages into MTAB.
IF sy-subrc = 0.
read table MTAB WITH KEY MSGid = 'M7'
msgtyp = 'S'
MSGNUMBER = '060'.
if sy-subrc = 0.
w_mblnr = mtab-msgv1.
endif.
hope this will help you.
‎2006 Sep 26 6:02 AM
hello ,
did u get the solution with my suggestion or still you want me to elaborate the answer..
thaks