2008 Feb 29 7:46 AM
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
Whats the wrong in my code?
Please correct me. If possible send me some sample files also.
Regards,
Sree
2014 Jan 08 11:53 AM
Hi.
You have define the lv_file as a string.
And you are trying to upload fileds defined as currency.
All your fields should be defined as char fields.
Bye
Hi
Issue is with the file format.Not with the program logic.
It's working now.
2008 Feb 29 7:49 AM
Hi,
Is your file data separated by a tab-delimiter? is the data in the same order of internal table declaration? Also do the size of the field and data match?
Regards,
Ramya
2008 Feb 29 8:14 AM
hi sree ram,
use the data in the notepad using tab.
like this....
899910 07ls 10 3000 usd 0101 62007.
regards,
venkat.
2014 Jan 08 11:53 AM
Hi.
You have define the lv_file as a string.
And you are trying to upload fileds defined as currency.
All your fields should be defined as char fields.
Bye
2014 Jan 21 3:54 PM
Hi
Issue is with the file format.Not with the program logic.
It's working now.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |