Application Development 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: 

Creating a file on application server that exceeds 10 Million charecters

Former Member
0 Kudos

Hello All,

We have custom IDocs which carry Strings of 1062 characters in each of their segments.

Now the requirement is to create a single string file out of these idocs data.

It is expected that each of these IDocs can go up to having more than 70,000 segments.

So, now when this is concatenated into one single string it can go upto 7 Million charecters.

My questions are:

1. Can we create a text file with so many charecters in a single line or is there any limitation for this ?

2. I have found a datatype CHAR30000, using which i'm currently concatnating around 30 segment data and then writing onto the file. Now once I wrote a single line, how can I set the pointer to End of line ?

3. Is there any limitation in ABAP to create such a long string text file using method mentioned above ?

Thanks for responding back!!

-Sri

4 REPLIES 4

marcin_cholewczuk
Active Contributor
0 Kudos

Hi,

1. End of line is just a character(or two) so there is no limitation

2. I'm not sure if I understand. After writing something pointer is set in metioned by you position (if file was opened in text mode)

3. I don't think there is any

I would rather say that you should open file in binary mode. No end of line will be added after write operation and it will be possible for you to process all data in simple loop. If this is not an option, then maybe it is possible to use variable with string type? With it you could use strings which have up to 2GB of data.

Best regards

Marcin Cholewczuk

0 Kudos

Thank you, That was really helpful.

Can you please tell me how can i pick up a part of string using pointers from text file on application server ?

0 Kudos

You welcome

About your question, I'm a little bit confused. Do you mean something like below?


DATA lv_str TYPE string.

lv_str = 'Some string'.
WRITE lv_str(4). "writing only first 4 characters

If not then which string you're refering to and what you understand under 'pointer'?

Best regards

Marcin Cholewczuk

0 Kudos

No, It should be something like below.. for writing the file onto application server , which aint working though...

*Writing output data into the file.
  lw_endofline = 30000.
  OPEN DATASET p_fileop FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
  LOOP AT int_output INTO wa_output.
    TRANSFER wa_output-sdata TO p_fileop.
    "SET DATASET p_fileop POSITION lw_endofline.
    SET DATASET p_fileop POSITION lw_endofline.
    lw_endofline = lw_endofline + 30000.
  ENDLOOP.
  CLOSE  DATASET p_fileop.