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

error in bdc

Former Member
0 Likes
585

wt if it is not data error........or can we correct it on the screens itself, then when do we use gui_download...for wt kind of error

6 REPLIES 6
Read only

Former Member
0 Likes
563

Hi

Gui_download is too download the data from a table...

regards:

Prabu

Read only

bpawanchand
Active Contributor
0 Likes
563

Hi

When ever we want to download the file to presentation server I mean to teh desk top then we use GUI_DOWNLOAD

GUI_DOWNLOAD Replaces WS_DOWNLOAD. Download table from the app server to presentation server

earlier we have WS_DOWNLOAD FM but now it is obselete and

sample code for GU_DOWNLAOD you can check it in the below link

Well if at any error occurs while running your BDC program if any error is triggered then you cannot run any more that means your BDC is stopped

Regards

Pavan

Read only

former_member761936
Active Participant
0 Likes
563

Hi,

I got your doubt,Generally in client requirments what is happens is when you upload some file and procees Bdc there may be some error records during BDC processing , so we will put that error message beside that record in the file, keeping uploaded record as it is .So after BDc processing completed we left with Reocrds with errors in file.We download that error file using GUI_DOWNLOAD and client will correct those erros manually and again process that file.

Hope you got the point

Read only

0 Likes
563

hello,

actually i wnt 2 rectify dat error which i got in format_message thru error msg....in bdc call transaction so do i hv 2 write some extra code like gui_download something.....or change flat file......plz tell me the code if u know or tell me solution in wt way to correct it..........

for session method we correct thru error log file on screen itself...is it d only way or any other way.

d same situation occurs in uploading data in std bapi eg while creating statistical key figure.......in this if i get any error msg in format_message func module, then how do i correct it and resend it in wt way.....

Read only

0 Likes
563

HI

As of what I know is that it is the only way to collect the errors in the BDC session method for further information on how to process errors in the BDC session method check the below link

Regards

Pavan

Read only

Former Member
0 Likes
563

hi,

check these ones.I will give the one example.This one is useful.

gui_Download:

REPORT ZSR_BDC_DOWNLOAD.

TABLES : LFA1.

SELECT-OPTIONS : S_LIFNR FOR LFA1-LIFNR.

DATA : BEGIN OF ITAB OCCURS 0,

LIFNR LIKE LFA1-LIFNR,

LAND1 LIKE LFA1-LAND1,

END OF ITAB.

SELECT LIFNR LAND1 FROM LFA1 INTO TABLE ITAB WHERE LIFNR IN S_LIFNR.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

BIN_FILESIZE =

FILENAME = 'c:\d.txt'

FILETYPE = 'ASC'

APPEND = ' '

WRITE_FIELD_SEPARATOR = ' '

HEADER = '00'

TRUNC_TRAILING_BLANKS = ' '

WRITE_LF = 'X'

COL_SELECT = ' '

COL_SELECT_MASK = ' '

DAT_MODE = ' '

CONFIRM_OVERWRITE = ' '

NO_AUTH_CHECK = ' '

CODEPAGE = ' '

IGNORE_CERR = ABAP_TRUE

REPLACEMENT = '#'

WRITE_BOM = ' '

TRUNC_TRAILING_BLANKS_EOL = 'X'

WK1_N_FORMAT = ' '

WK1_N_SIZE = ' '

WK1_T_FORMAT = ' '

WK1_T_SIZE = ' '

IMPORTING

FILELENGTH =

TABLES

DATA_TAB = ITAB

FIELDNAMES =

EXCEPTIONS

FILE_WRITE_ERROR = 1

NO_BATCH = 2

GUI_REFUSE_FILETRANSFER = 3

INVALID_TYPE = 4

NO_AUTHORITY = 5

UNKNOWN_ERROR = 6

HEADER_NOT_ALLOWED = 7

SEPARATOR_NOT_ALLOWED = 8

FILESIZE_NOT_ALLOWED = 9

HEADER_TOO_LONG = 10

DP_ERROR_CREATE = 11

DP_ERROR_SEND = 12

DP_ERROR_WRITE = 13

UNKNOWN_DP_ERROR = 14

ACCESS_DENIED = 15

DP_OUT_OF_MEMORY = 16

DISK_FULL = 17

DP_TIMEOUT = 18

FILE_NOT_FOUND = 19

DATAPROVIDER_EXCEPTION = 20

CONTROL_FLUSH_ERROR = 21

OTHERS = 22

.

IF SY-SUBRC 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

WRITE 😕 'not downloaded'.

ENDIF.

gui_uploade file types :

'ASC' :

ASCII format. The table is transferred as text. The conversion exits are carried out. The output format additionally depends on the parameters CODEPAGE, TRUNC_TRAILING_BLANKS, and TRUNC_TRAILING_BLANKS_EOL.

'IBM' :

ASCII format with IBM codepage conversion (DOS). This format corresponds to the 'ASC' format when using target codepage 1103. This codepage is often used for data exchange by disc.

'DAT' :

Column-by-column transfer. With this format, the data is transferred as with ASC text. However, no conversion exists are carried out and the columns are separated by tab characters. This format creates files that can be uploaded again with gui_upload or ws_upload.

'DBF' :

The data is downloaded in dBase format. Because in this format the file types of the individual columns are included, import problems, for example, into Microsoft Excel can be avoided, especially when interpreting numeric values.

This is helpful pls for u, Pls give the points.

Thanks.

Ashok.