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: 

How to capture the system messages ?

Former Member
0 Kudos

Hi !

Can any body help me to capture the system messages ,

The requirement is that here i need to map those messages to the structure TRLOMESG , in the function module 'Loan_Messages_Give '.

Pl lemme know the solution for this.

Regards

Anil

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Anil,

You can find these in the SY (or SYST) structure, the fields are:

MSGID

MSGTY

MSGNO

MSGV1

MSGV2

MSGV3

MSGV4

So you can move SY-MSGID to TRLOMESG-MSGID and so on...

Brad

5 REPLIES 5

Former Member
0 Kudos

Hi Anil,

You can find these in the SY (or SYST) structure, the fields are:

MSGID

MSGTY

MSGNO

MSGV1

MSGV2

MSGV3

MSGV4

So you can move SY-MSGID to TRLOMESG-MSGID and so on...

Brad

0 Kudos

Hi Brad ,

This is how i have passed as per the requirement but altimately the structure ls_trlomesg does not hold any message at the end, is there any other solution to capture the messages other than this . Pl suggest me also look into the below code.

DATA :

lt_trlomesg TYPE TABLE OF trlomesg,

ls_trlomesg TYPE trlomesg.

ls_trlomesg-msgty = sy-msgty.

ls_trlomesg-msgno = sy-msgno.

ls_trlomesg-msgid = sy-msgid.

ls_trlomesg-msgv1 = sy-msgv1.

ls_trlomesg-msgv2 = sy-msgv2.

ls_trlomesg-msgv3 = sy-msgv3.

ls_trlomesg-msgv4 = sy-msgv4.

APPEND ls_trlomesg TO lt_trlomesg.

CALL FUNCTION 'LOAN_MESSAGES_GIVE'

TABLES

et_mesg = lt_trlomesg.

Warm regards

Anil

0 Kudos

Hi Anil,

What system message do you want to capture?

Your code looks fine if you are wanting to capture a system message that SAP has just called. For example, if you are coding in a userexit.

If you are trying to do something else then please explain what exactly.

Thanks,

Brad

0 Kudos

Brad ,

Thanks for your reply , but the requirement is that way , pl look into the below requirement , also suggest me any alternate solution if you have from your experience after looking into this..

***************

Use the function module LOAN_MESSAGES_GIVE to extract the message in to the internal table of type TRLOMESG. Then move the TRLOMESG message structure to the ET_RETURN. Move BAPIRET2 fields to the below structure.

Structure: TRLOMESG

Fieldname Data type Size Description

MSGTY SYMSGTY 1 Message type

MSGNO SYMSGNO 3 Message number

MSGID SYMSGID 20 Message id

TEXT TRLOMSGTXT 255 message text

MSGV1 SYMSGV 50

MSGV2 SYMSGV 50

MSGV3 SYMSGV 50

MSGV4 SYMSGV 50

************

That was the requirement , pl suggest me if you have any other idea other than this ,

warm regards

Anil

Former Member
0 Kudos

T100 is the system messsages table.

Thanks,

Rehan.