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

Park Document

Former Member
0 Likes
471

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 don’t have Vat code in the file.

How can I solve this?

Regards

Rajendra

3 REPLIES 3
Read only

Former Member
0 Likes
444

HI,

I want to display all the Error message like how the Transaction F-65 or FB01 display.

RAJ

Read only

naimesh_patel
Active Contributor
0 Likes
444

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

Read only

Former Member
0 Likes
444

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