2009 Jun 16 12:07 PM
Hi All,
could you help me on this plaese,
i want to convert the text data into the internal table.
problem is in my notepad i having the field names and values
i want to upload that total data into my internal table.
i.e in notepad having like this
NAME NUMBER }------ field names
NARESH 222 }------ values
KUMAR 333
REDDY 444
this is tha data, now i want to upload field name s as well as values.
thanks,
naresh
2009 Jun 16 12:10 PM
Use Function Module GUI_UPLOAD to upload the file to an internal table.
Your field names will be there as the first record in the internal table.
regards,
Jinson
Hi All,
could you help me on this plaese,
i want to convert the text data into the internal table.
problem is in my notepad i having the field names and values
i want to upload that total data into my internal table.
i.e in notepad having like this
NAME NUMBER }------ field names
NARESH 222 }------ values
KUMAR 333
REDDY 444
this is tha data, now i want to upload field name s as well as values.
thanks,
naresh
2009 Jun 16 12:10 PM
Use Function Module GUI_UPLOAD to upload the file to an internal table.
Your field names will be there as the first record in the internal table.
regards,
Jinson
2009 Jun 16 12:17 PM
Hi
thanks for reply,
you said is correct but if i taken field names as string,and values taken as string & int.
then hoiw is it possible .
2009 Jun 16 12:21 PM
>
> Hi
> thanks for reply,
> you said is correct but if i taken field names as string,and values taken as string & int.
> then hoiw is it possible .
Upload to internal table where the fields are of char type.
Delete the first record.
Then move the data to a new internal table with filed type as char and int respectively.
regards,
Jinson
2009 Jun 16 12:15 PM
Hi ,
call following function module
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'PC_FILE' <----
File name
FILETYPE = u2018ASCu2019
HAS_FIELD_SEPARATOR = 'X'
DAT_MODE = 'X'
TABLES
DATA_TAB = 'Your internal Table' <-------Internal table name
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.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |