‎2006 Aug 22 3:10 PM
Hi Experts,
I am doing an Interface for Journal Upload. For Park document Trans. FB01, F-65. In this I want to print all the error messages. Like if the GL account does not have VAT, it must display that error message. If the GL Account required Fund Center it must display that message. If I runt that transaction it is displaying all valid Error messages.
In my Interface for Flat file (XLC) file upload, I am using Call Transaction method I am sending all error messages to MESSAGETAB.
CALL TRANSACTION lc_tcode USING BDCDATA
MODE 'N'
UPDATE 'S'
MESSAGES INTO MESSTAB.
And using LOOP .. ENDLOOP. I am displaying error messages. But It is not displaying. It is displaying the Table name & field name. But I want to display The GL Account no. that dont have Vat code in the file.
How can I solve this?
Regards
Rajendra
‎2006 Aug 22 3:13 PM
HI,
I want to display all the Error message like how the Transaction F-65 or FB01 display.
RAJ
‎2006 Aug 22 3:22 PM
Hello,
Use this FM: to get the error text.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = IT_BDCMSGCOLL-MSGID
LANG = SY-LANGU
NO = IT_BDCMSGCOLL-MSGNR
V1 = IT_BDCMSGCOLL-MSGV1
V2 = IT_BDCMSGCOLL-MSGV2
V3 = IT_BDCMSGCOLL-MSGV3
V4 = IT_BDCMSGCOLL-MSGV4
IMPORTING
MSG = F_MESSAGES
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
You will get the text in the F_messages variable.
Regards,
Naimesh
‎2006 Aug 22 3:22 PM
CALL TRANSACTION lc_tcode USING BDCDATA
MODE 'N'
UPDATE 'S'
MESSAGES INTO it_bdcmsgcoll.
loop at it_bdcmsgcoll.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = it_bdcmsgcoll-msgid
LANG = '-D'
no = it_bdcmsgcoll-msgnr
v1 = it_bdcmsgcoll-msgv1
v2 = it_bdcmsgcoll-msgv2
v3 = it_bdcmsgcoll-msgv3
v4 = it_bdcmsgcoll-msgv4
IMPORTING
msg = v_msg1
EXCEPTIONS
not_found = 1
OTHERS = 2
.
write:/ v_msg1 .
endloop.
Regards,
ravi