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

How to capture ERRORs in BDC

Former Member
0 Likes
701

Hi,

I am executing BDC for CJ20N for uploading Settlement Rules for WBS and Network. During Call Transaction, errors in rules are poping up in one popup box from MESSAGE_SHOW function. Those errors anr not captures in bdcmsgcoll table.

How to capture those errors during CALL TRANSACTION ??

Thanks,

Chetan Shah

Hi,

I am executing BDC for CJ20N for uploading Settlement Rules for WBS and Network. During Call Transaction, errors in rules are poping up in one popup box from MESSAGE_SHOW function. Those errors anr not captures in bdcmsgcoll table.

How to capture those errors during CALL TRANSACTION ??

Thanks,

Chetan Shah

4 REPLIES 4
Read only

Former Member
0 Likes
665

first declare like this. messtab contains error messages



 

DATA BEGIN OF MESSTAB OCCURS 10.

       INCLUDE STRUCTURE BDCMSGCOLL.

DATA END OF MESSTAB.

.......


CALL TRANSACTION 'SE38'  USING BDCDATA  MODE 'N'

                         MESSAGES INTO MESSTAB.

Read only

Former Member
0 Likes
665

Are you using ALL "A" screen mode or No-Screen mode "N". if you are using mode "A" , switch to "N" mode and try..

Read only

Former Member
0 Likes
665

Hi .. you can use CALL TRANSACTION sentence and use

CALL TRANSACTION is messages about BDC, to see errors use MODE A to see where are errors and see messages

Thanks and Regards

David Carballido

Read only

shadow
Participant
0 Likes
665

Hi,

look this program u can get .....

TABLES:LFA1.

DATA:BEGIN OF ITAB OCCURS 0,

LIFNR TYPE LIFNR,

NAME1 TYPE LFA1-NAME1,

ORT01 TYPE LFA1-ORT01,

LAND1 TYPE LFA1-LAND1,

END OF ITAB.

DATA:JTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

DATA:KTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

DATA:LTAB LIKE ITAB OCCURS 0 WITH HEADER LINE.

DATA:MTAB LIKE ITAB OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'E:/HYE/HI.TXT'

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = ITAB.

LOOP AT ITAB.

REFRESH JTAB.

PERFORM SUB USING 'ZBDC_YVTRANS' '100'.

PERFORM SUB1 USING:'LFA1-LIFNR' ITAB-LIFNR,

'LFA1-NAME1' ITAB-NAME1,

'LFA1-ORT01' ITAB-ORT01,

'LFA1-LAND1' ITAB-LAND1.

PERFORM SUB1 USING 'BDC_OKCODE' 'INSERT'.

PERFORM SUB USING 'ZBDC_YVTRANS' '100'.

PERFORM SUB1 USING 'BDC_OKCODE' 'EXIT'.

CALL TRANSACTION 'YVTRANS' USING JTAB MODE 'A' MESSAGES INTO KTAB.

LOOP AT KTAB.

IF KTAB-MSGTYP = 'I' OR KTAB-MSGNR = '000'.

MOVE-CORRESPONDING ITAB TO LTAB.

APPEND LTAB.

ELSEIF KTAB-MSGTYP = 'E' OR KTAB-MSGNR = '001'.

MOVE-CORRESPONDING ITAB TO MTAB.

APPEND MTAB.

ENDIF.

Regard's

Shaik.