05-31-2005 8:28 AM
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
05-31-2005 8:32 AM
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
05-31-2005 8:32 AM
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
05-31-2005 10:05 AM
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
05-31-2005 10:48 AM
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
05-31-2005 11:16 AM
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
05-31-2005 9:57 AM