Skip to Content
author's profile photo Former Member
Former Member

how to display a message in an audit report?

hello all,

i would like to ask how do display a message in an audit report. here is my code...

CALL TRANSACTION tcode USING i_bdcdata

MODE c_n

MESSAGES INTO i_error2.

IF sy-subrc EQ 0.

ENDIF.

CLEAR i_error2.

LOOP AT i_error2.

IF i_error2-msgtyp EQ c_e.

MOVE v_pernr TO i_bdcerror2-pernr.

MOVE c_infotype TO i_bdcerror2-infty.

MOVE 'Error' TO i_bdcerror2-msgtype.

<b> SELECT SINGLE text

INTO v_msgtxt

FROM t100

WHERE sprsl = i_error2-msgspra

AND arbgb = i_error2-msgid

AND msgnr = i_error2-msgnr.

MOVE v_msgtxt TO i_bdcerror2-msgtxt.</b>

APPEND i_bdcerror2.

ENDIF.

ENDLOOP.

DESCRIBE TABLE i_bdcerror LINES v_bdcerrors.

IF v_bdcerrors <> 0.

SKIP 1.

WRITE: 'BDC Error Report'.

SKIP 1.

WRITE: 'PERNR',

'INFOTYPE',

'MESSAGE TYPE',

'MESSAGE TEXT'.

ULINE.

LOOP AT i_bdcerror.

WRITE: / i_bdcerror-pernr,

13 i_bdcerror-infty,

22 i_bdcerror-msgtype,

35 <b>i_bdcerror-msgtxt</b>.

ENDLOOP.

ENDIF.

the message text that i was getting contains &1, &2 and so on. how would i be able to replace it with the original value?

thanks!

-ann

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 09, 2005 at 04:00 AM

    After calling the transaction, this is what I do.

    a) Call the function module, <b>MESSAGE_TEXT_BUILD</b> and pass the following values from <b>BDCMSGCOLL</b> or the internal table where you collect the messages.

       i) MSGID
      ii) MSGNR
     iii) MSGV1
      iv) MSGV2
       v) MSGV3
      vi) MSGV4

    There is no need to fetch data using select from table t100.

    It builds the message and returns in MESSAGE_TEXT_OUTPUT which can be then displayed to user.

    Regards,

    Subramanian V.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.