Skip to Content
0
Feb 29, 2008 at 07:46 AM

Regarding GUI_UPLOAD

47 Views

Hi Friends

I am getting some error while downloading the data from my presentation server.

TYPES: BEGIN OF type_compensationawards,

pernr TYPE pspar-personid_ext,

subtype TYPE p0759-citem,

carea TYPE p0759-carea,

amount TYPE p0759-cpamt,

currency TYPE p0759-curre,

  • timeunit TYPE q0759-prfre,

effectivedate TYPE q0759-effdt,

END OF type_compensationawards.

DATA: it_compawards TYPE STANDARD TABLE OF type_compensationawards,

wa_compawards TYPE type_compensationawards.

DATA: lv_file TYPE string.

lv_file = p_file.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = lv_file

filetype = 'ASC'

  • has_field_separator = 'X'

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • VIRUS_SCAN_PROFILE =

  • NO_AUTH_CHECK = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

data_tab = it_compawards

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17

.

IF sy-subrc <> 0.

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

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

ENDIF.

Here I am getting Sy-subrc = 8.

I tried with the file:

899910 07ls 10 3000 usd 010162007

What’s the wrong in my code?

Please correct me. If possible send me some sample files also.

Regards,

Sree