Application Development and Automation 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: 
Read only

Capture Success message

Former Member
0 Likes
903

Hi All,

I have created a Call transaction for the T code F9B1.On pressing save button a new screen is displyed and success message getting displayed on the status bar of the screen . I have to send this message details to the user by mail.

Now my problem is that this success message is not captured in BDCMSGCOLL table. Please let me know the procedure to capture the message.

Regards,

Shiva

Hi All,

I have created a Call transaction for the T code F9B1.On pressing save button a new screen is displyed and success message getting displayed on the status bar of the screen . I have to send this message details to the user by mail.

Now my problem is that this success message is not captured in BDCMSGCOLL table. Please let me know the procedure to capture the message.

Regards,

Shiva

5 REPLIES 5
Read only

Former Member
0 Likes
716

perform background tables bdcerror2

using 'XD01' " s_tcode

'A' " s_mode

'A'. " s_update

form background tables xmessages structure bdcmsgcoll

using p_tcode

p_mode

p_update.

data: lin like sy-tfill.

refresh xmessages.

call transaction p_tcode using bdcdata mode p_mode

update p_update messages into xmessages.

clear lin.

describe table xmessages lines lin.

if lin > 0.

loop at xmessages.

if xmessages-msgtyp = 'S'.

move-corresponding xmessages to: bdcerror,msg_log.

msg_log-msgno = xmessages-msgnr.

msg_log-msgty = xmessages-msgtyp.

call function 'MESSAGE_TEXTS_READ'

exporting

msg_log_imp = msg_log

importing

msg_text_exp = msg_text

exceptions

others = 1.

bdcerror-msgtx = msg_text-msgtx.

append bdcerror.

endif.

endloop.

endif.

endform. " background

this will help u...

Regards

Anbu

Read only

0 Likes
716

HI,

Thanks for the early reply.

But my problem is that message is not getting stored in BDCMSGCOLL table.

Regards,

Shiva

Read only

0 Likes
716

check in debgg weather that message is raising r not.

and c that bdcmsg structure what it holds....

Regards

Anbu

Read only

Former Member
0 Likes
716

Hi,

To capture success messages in call transaction..method...

As u know that U need to create an internal table (IT_MESSAGE )like BDCMSGCOLL ... ..

while ur looping this IT_MESSAGE ...

if MSGTYP = ' '.

pass internal table to workarea..

endif..

for Error records 'E' for success reocrds ' ' (space).

\[removed by moderator\]

Edited by: Jan Stallkamp on Jul 29, 2008 5:29 PM

Read only

Former Member
0 Likes
716

hi use this..it is better to use this..MESSAGES INTO itab in the call transaction...then read the messages using the fm

format_message