‎2007 Aug 31 3:22 PM
Hello Experts,
What does a 'WRITE' statement do? Does it put data into spool or buffer or somewhere elser? Which one? And how to see this spool/buffer before the list is displayed on the screen? Also is there a way to clear this spool/buffer?
I have a requirement where I need to use 'Write' statement to create a list and then somewhere down in the program I need to clear this list before it is displayed on the screen.
Any suggestion?
Thanks
Bhupendra
‎2007 Aug 31 3:31 PM
Hi,
write statement just writes the data to the output.NO SPOOL IS GENERATED when you display a report through write.
if you want to generate a spool then press the print button on the menu bar.
i dont think you can clear the thingh you have written.
Instead you can again write ' ' repetedly on the same column row positions so that it will over write the data and write ' '.i.e space
please explain your question more clearly if you want some more help.
why do you want to write then clear before it get displayed???
thanks
vivekanand
‎2007 Aug 31 3:39 PM
hi
good
The basic ABAP statement for displaying data on the screen is WRITE.
Syntax
WRITE can be
· any data object (see Data Objects)
· a field symbol or formal parameter (see Working with Field Symbols).
· a text symbol (see Maintaining Text Elements)
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e2335c111d1829f0000e829fbfe/content.htm
thanks
mrutyun^
‎2007 Aug 31 3:40 PM
It is stored in a sort of "Buffer", you can write it and get the results in an internal table without having to either write to a spool, or write it to the screen. Here is an example program. internal table IASCII will have the output in readable format.
report zrich_0001.
data: ilist type table of abaplist with header line.
data: iacii type table of string with header line.
do 100 times.
write:/ sy-index.
enddo.
call function 'SAVE_LIST'
tables
listobject = ilist
exceptions
list_index_invalid = 1
others = 2.
call function 'LIST_TO_ASCI'
tables
listasci = iacii
listobject = ilist
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
call function 'LIST_FREE_MEMORY'
tables
listobject = ilist.
* You have the list in the IACII internal table, now you can
* avoid the output to the screen using this statement.
leave list-processing.
Regards,
RIch Heilman
‎2007 Aug 31 3:42 PM
Hi,
I need to export the list (created by 'WRITE' statements) to memory and then read the memory to pass it to workflow. Then I need to create a different list and then export it again to memory so I need to clear (or delete) the previous list.
Thanks
Bhupendra Singhal