‎2006 Aug 10 3:24 PM
Hi Experts.
I have a strange issue.
i have a variable str which is of type string.
In my program when data paased to string which comes a file from PC
it is not displaying compledata.If actual data is of 10 lines,it is diaplayin only 2 lines.
When i create a itab with one field of string..
i have done like this:
split string at space into table itab.
then data in itab having complete data what i wanted but it was line by line
How can i display complete data in that string itself.Because i can't use my itab for furthur requirement.
can any body give me some suggessions on this?
Regards
‎2006 Aug 10 3:27 PM
hi,
as you said u have evry thing in ur itab, then make use of 'RKD_WORD_WRAP' adn get the whole thing
Theja
‎2006 Aug 10 3:27 PM
‎2006 Aug 10 3:29 PM
Hi Ravi,
After the complete data is coming into the table ITAB , you can try this code .
Data : str type string.
loop at itab.
concatenate <itab-field>,str into str.
endloop.
Then you can use this string str for your purpose.
Regards,
Kunal.
‎2006 Aug 10 3:36 PM
have you used APPEND itab ? or not ?
here is the small code to work out.
DATA : BEGIN OF ITAB OCCURS 0,
LINE TYPE STRING,
END OF ITAB.
DATA : V_STRING TYPE STRING.
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\TEST.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = ITAB
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.
EXIT.
ENDIF.
LOOP AT ITAB.
CONCATENATE V_STRING
ITAB-LINE
INTO V_STRING.
ENDLOOP.
WRITE 😕 V_STRING.
NOW v_string will have total itab data
regards
srikanth