Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with string

Former Member
0 Likes
800

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

4 REPLIES 4
Read only

Former Member
0 Likes
638

hi,

as you said u have evry thing in ur itab, then make use of 'RKD_WORD_WRAP' adn get the whole thing

Theja

Read only

naimesh_patel
Active Contributor
0 Likes
638

Hello Ravi,

Change like

<b>Report ztest_np line-size 1000.</b>

Today only we had long discussion on this thread. See this

regards,

Naimesh

Read only

Former Member
0 Likes
638

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.

Read only

Former Member
0 Likes
638

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