2007 Jul 19 10:24 AM
hi experts,
like in 'C' language we have a command called 'CLRSCR' to the clear screen.
do we have in abap also .
or any another way.
please send me.
regards,
aejaz
2007 Jul 19 10:27 AM
To reset a variable <f> to the appropriate initial value for its type, use the statement
CLEAR <f>.
This statement has different effects for different data types:
Elementary ABAP types
The CLEAR statement sets the value of an elementary variable to the initial value specified for its type (see the table in Predefined ABAP Types), and not to the starting value that you specified in the VALUE addition to the DATA statement.
References
The CLEAR statement resets a reference variable to its initial value, that is, so that it does not point to an object.
Structures
The CLEAR statement resets the individual components of a structure to their respective initial values.
Internal tables
The CLEAR statement deletes the entire contents of an internal table (see also Initializing Internal Tables).
You cannot use the CLEAR statement to reset a constant.
DATA NUMBER TYPE I VALUE '10'.
WRITE NUMBER.
CLEAR NUMBER.
WRITE / NUMBER.
The output appears as follows:
10
0
The CLEAR statement resets the contents of the field NUMBER from 10 to its initial value 0.
2007 Jul 19 10:30 AM
hi,
i need a command to clear the entire screen.
i think u got me now
2007 Jul 19 10:31 AM
hi,
u can clear statement in abap.
or initial keyword also.
ex: clear a. // value will be erased.
clear itab. /// work area is cleaerd.
clear itab[] /// body of internal table is cleared.
if helpful reward some points.
with regards,
Suresh.A
2007 Jul 19 10:35 AM
Hi,
There is no such command.
One way you can do it like HIDE screen elements.
Use AT SELECTION SCREEN OUTPUT in that modify screen and make elements invisible.
Reward if useful!
2007 Jul 19 10:36 AM
Hi Aejaj,
CLEAR
Resets a variable to its initial value.
Syntax
CLEAR <f>.
Resets the variable <f>, which may be of any data type, to the initial value defined for that type.
the clear statement for clear the moemory space.
If useful rewrd points.
Thanks.
Sanket.
2007 Jul 19 10:37 AM
i don't think there is any particular syntax for clearing a screen.
u can definitely clear a filed and work area and body of internal tables as told by our friends.
regards,
srinivas
<b>*reward for useful answers*</b>
2007 Jul 19 10:45 AM
Well,
You cannot actually clear the screen in ABAP.
However, we can create the illusion that the screen is clear.
if we use the statement 'write : /' around 100 times,
the cursor goes 100 rows below.
This gives an impression that the screen is clear.
However a scrollbar is there.
Regards,
Ravi
2007 Jul 19 10:48 AM
Hi ,
I dont think there is a command like CLRSCR in ABAP :
If you could tell what is your exact requirement may be we could suggest you some alternatives.
Regards
Arun