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

file content into a string

Former Member
0 Likes
694

Hi Experts,

I want the total records present in a file into a string.

I am using a logic as follows,

1. selecting a file with function module F4_FILENAME

2. get the records into a table using the WS_UPLOAD

3. processing the itab and passing into a string

I have two questions,

1.Is there a better way than which i am using?

2.How much content a string can hold?

Help in this regard is appreciated.

Regards,

Azaz Ali.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
648

What you are doing is the best way, to my knowlege, there is no limit to the length of the string.

Regards,

Rich Heilman

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
649

What you are doing is the best way, to my knowlege, there is no limit to the length of the string.

Regards,

Rich Heilman

Read only

0 Likes
648

Hi Rich,

Thanks a lot for your reply.

Let me wait for other replies....

Regards,

Azaz Ali.

Read only

0 Likes
648

Hi Ali,

The length of the string is not static and adjusts the length to the current field content at runtime.

So a string can have any length.

Also, try using GUI_UPLOAD instead of WS_UPLOAD.

In this function module you can also specify the field separator. Field separator would be helpful in distinguishing the fields of the table.

Hope this helps you.

Regards,

Manasee

Read only

0 Likes
648

I don't know of Max limit for data type string but for lengths beyond 65535 data type char cannot be used & string is the only option..

~Suresh