Hello,
I try to import a file from server (for test purposes downloaded on the server directory with transaction CG3Z in ASC) with an unknown length of lines.
Here is my coding for the import into ABAP:
OPEN DATASET p_pa_snam FOR INPUT IN TEXT MODE .
IF sy-subrc NE 0.
ELSE.
DO.
READ DATASET p_pa_snam INTO g_file.
IF sy-subrc NE 0.
EXIT.
ENDIF.
IF NOT g_file IS INITIAL.
SPLIT g_file AT p_pa_sep INTO
wa_textfile_a-textid
wa_textfile_a-langu
wa_textfile_a-textname
wa_textfile_a-textobj
wa_textfile_a-text.
APPEND wa_textfile_a TO zs_textfile_a.
CLEAR wa_textfile_a.
ENDIF.
ENDDO.
So you see that I move the lines from the file to g_file which is of type STRING.
In the import wa_textfile_a the field text is of type STRING too to receive the rest after splitting at the separator into the other fields.
I would expect that this element g_file is a long one which could store my lines from the loaded file,
which could have possibly a length of 5000 digits and more.
Currently I stuck in this step with a length of 217 (!!!) digits in g_file, when importing longer lines (in test I had a line of more than 600 digits.
Is there any idea, what is wrong here or can anyone from you tell me about limitations?
Your help is really appreciated!
Best regards
Dirk