2010 Mar 03 4:24 PM
Hi Sapall.
here i have got a requirement to chage the existing program to write all the contents of ITAB into spool.
the present program is writing all teh data of itab into a local file,as the data is huge it tooks a long time to write into a local file.
so now i want to write the itab data into spool so that it will be a better performance when we talk about teh long data.
so can any body help me in solving this issue.
regards.
Varma
2010 Mar 03 5:41 PM
I am not sure if that is a good Idea. As far as time is concerned I don't think there will be any significant Improvement by writing it to spool instead of file. Also displaying a big spool through the GUI will cause memory issues.
Is your program writing to the file in small packets?? Most of the perfromance issue could be because you have huge amount of data in internal memory at one point of time.
Hi Sapall.
here i have got a requirement to chage the existing program to write all the contents of ITAB into spool.
the present program is writing all teh data of itab into a local file,as the data is huge it tooks a long time to write into a local file.
so now i want to write the itab data into spool so that it will be a better performance when we talk about teh long data.
so can any body help me in solving this issue.
regards.
Varma
2010 Mar 03 4:31 PM
Hi Varma,
hope this helps.
Source ABAPer blogspot
REPORT ztest_program.
DATA: BEGIN OF it_t001 OCCURS 0,
bukrs TYPE t001-bukrs,
butxt TYPE t001-butxt,
ort01 TYPE t001-ort01,
land1 TYPE t001-land1,
END OF it_t001.
DATA: it_data TYPE TABLE OF lvc_s_1022,
wa_data LIKE LINE OF it_data.
DATA:spoolid TYPE rspoid.
DATA:file_length TYPE int4.
START-OF-SELECTION.
SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_t001.
LOOP AT it_t001.
CONCATENATE it_t001-bukrs
it_t001-butxt
it_t001-ort01
it_t001-land1
INTO wa_data SEPARATED BY space.
APPEND wa_data TO it_data.
CLEAR wa_data.
ENDLOOP.
DESCRIBE TABLE it_data.
file_length = sy-tfill * 1022.
CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
EXPORTING
i_file_length = file_length
IMPORTING
e_spoolid = spoolid
TABLES
it_textdata = it_data.
IF sy-subrc EQ 0.
WRITE spoolid.
ENDIF.Regards,
SuryaD.
2010 Mar 03 5:41 PM
I am not sure if that is a good Idea. As far as time is concerned I don't think there will be any significant Improvement by writing it to spool instead of file. Also displaying a big spool through the GUI will cause memory issues.
Is your program writing to the file in small packets?? Most of the perfromance issue could be because you have huge amount of data in internal memory at one point of time.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |