2009 Nov 25 7:39 AM
Hi,
Is it possible to block the abap instruction : write.
Example :
write 'My name is Marc Frenay'.
if xxx = 1.
set log off (this is a example)
else.
set log on (this is a example)
endif.
I need an other instruction that set log on/off.
Thanks
Hi,
Is it possible to block the abap instruction : write.
Example :
write 'My name is Marc Frenay'.
if xxx = 1.
set log off (this is a example)
else.
set log on (this is a example)
endif.
I need an other instruction that set log on/off.
Thanks
2009 Nov 25 8:29 AM
2009 Nov 25 8:32 AM
You know that when you but a 'write' a line is displayed in the ouput. ok?
I want nothing in my output whithout erase the "write" instruction.
Is it clear?
Thanks
2009 Nov 25 8:37 AM
Try
END-OF-SELECTION.
LEAVE LIST-PROCESSING.
Regards
Markus
Edited by: Markus Stange on Nov 25, 2009 9:38 AM
2009 Nov 25 8:30 AM
Hi Marc,
your question is not quite clear. What do you realy want to do?
What kind of log do you mean?
Regards
Markus
2009 Nov 25 8:36 AM
Hi Marc,
Could you explaing with respect to the functionality probabaly with a piece of code what is the output you want?
For writing to the spool execute the program in background or pass it to an FM that writes in spool.
Regards,
Anand.
2009 Nov 25 8:41 AM
Sorry my english is not perfect but i already put a piece of code.
All i need if is exists is a instruction whitch remplace my fake instruction set log for the "write" does nothing.
Sorry but i can't be more clear.
2009 Nov 25 8:41 AM
Hello,
Is this what you are looking for:
DATA:
v_log TYPE flag.
if xxx = 1.
CLEAR v_log .
else.
v_log = 'X'.
endif.
IF v_log = 'X'.
write 'My name is Marc Frenay'.
ENDIF.or
IF xxx NE 1.
write 'My name is Marc Frenay'.
ENDIF.BR,
Suhas
2009 Nov 25 8:45 AM
It's a good solution but i have a lot of "write" and i posted this thread to avoid put a test in front of each "write"
2009 Nov 25 8:48 AM
Hello Marc,
I am confused like others are. What exactly do you want to achieve?
May be you can try this way:
IF xxx = 1.
LEAVE LIST-PROCESSING.
ENDIF.BR,
Suhas
2009 Nov 25 9:37 AM
Hello Marc,
What I understood from the discussions and the comments above is you do not wish to erase the write statements and at the same time you do not want to have the statements that get written in the output using the WRITE statement.
If I have understood the requirement correctly then probably you can simply comment all the WRITE statements that are used.
Example :
if the write statement you are using is
WRITE 'My name is Marc Frenay'.Then you can comment it by simply putting a '*' at the begining.
* WRITE 'My name is Marc Frenay'.Try this. You will not have to erase the write statements and also the output of the write statement will not appear in the output.
Regards,
Bhanu
2009 Nov 25 9:49 AM
it's exactly this but for me put on commentary or erase the instruction is the same but you have understood my problem
2009 Nov 25 9:51 AM
2009 Nov 25 9:58 AM
new-page print on no dialog .
write : / 'text'.
new-page print offJust put new-page print on in the beginning of ur code , and page off at the end . Itwill send output to spool . Get spool number and using FM delete that spool.
But why bother doing all this . some1 has alread suggested to use Leave list processing after end-of-selection. did you try that?
2009 Nov 25 10:24 AM
Thanks Rajesh!
I'm getting a little bit confused of this thread...
Regards
Markus
2009 Nov 25 11:48 AM
>
> But why bother doing all this . some1 has alread suggested to use Leave list processing after end-of-selection. did you try that?
I'd imagine the code he's working on hasn't separated out data selection/processing from data display. You know:
WRITE: / 'This is my header'.
SELECT ...
WRITE: / 'Some more data'...
ENDSELECT
2009 Nov 25 11:52 AM
I put a test in front of each "write" its was the simplest solution in a court term
Thanks for your help.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |