2007 Jun 19 9:22 AM
Hi All,
I have a issue with material number conversion.
Issue: I am uploading flatfile data into my program using GUI_UPLOAD F.M.
I will get data into I_MAT internal table.
Now in this from every record first 18 characters are Material numbers.
So then i will push all records first 18 characters to I_MATNR internal table
Now i will have I_MATNR with all material fields.
But now if i see these material for some materials it is displaying # symbol at the end of material, this is happening for most of the fields.
I have used F.M CONVERSION_EXIT_MATN1_INPUT to convert material no to actual but still it is not working.
Can anybody suggest solution for this issue!
Thanks,
Deep.
2007 Jun 19 9:27 AM
Hello,
Deep this is because the file has the delimiter with hex value 09.
While using the GUI_UPLOAD make this change.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_va_file
* FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X' " Check here
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
data_tab = it_import
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.
If useful reward.
Vasanth
Hi All,
I have a issue with material number conversion.
Issue: I am uploading flatfile data into my program using GUI_UPLOAD F.M.
I will get data into I_MAT internal table.
Now in this from every record first 18 characters are Material numbers.
So then i will push all records first 18 characters to I_MATNR internal table
Now i will have I_MATNR with all material fields.
But now if i see these material for some materials it is displaying # symbol at the end of material, this is happening for most of the fields.
I have used F.M CONVERSION_EXIT_MATN1_INPUT to convert material no to actual but still it is not working.
Can anybody suggest solution for this issue!
Thanks,
Deep.
2007 Jun 19 9:27 AM
Hello,
Deep this is because the file has the delimiter with hex value 09.
While using the GUI_UPLOAD make this change.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_va_file
* FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X' " Check here
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
data_tab = it_import
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.
If useful reward.
Vasanth
2007 Jun 19 9:27 AM
2007 Jun 19 9:28 AM
Hi,
The Blank spaces are filling with # symbol, so delete these symbosl frist from the Material number then use the Converstion exit function module
Regards
Sudheer
2007 Jun 19 9:29 AM
whether while uploading form the flat file to ur I_MAT internal table u get that problem, then check the FILETYPE.
please paste ur code.
regards
prabhu
2007 Jun 19 9:29 AM
Hi Deep,
In the FM 'GUI_UPLOAD', there is one option...
HAS_FIELD_SEPARATOR = 'X'
If ur text file is having seperators..u will get '#' s.
so with the above stmt. in that FM, passing 'X' will tell that file is havin separators.
.
Your file is tab dilimited. If you still have problem go through the code below:
CONSTANTS: c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
filetype = 'ASC'
has_field_separator = c_tab
TABLES
data_tab = itab_upload
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.
Do reward points if this helps.
Regard:
Sapna
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |