‎2008 Oct 29 7:15 AM
Hi
What is the difference between
Write /'Hello'.and
Write : / , 'hello'.Why is the second statement leaving a line gap.
/ is used to leave a line gap.
I am confused because
write : 'hello'.
prints on the same line. But having a slash in front leaves a line gap instead of going to next line.
Thanks in advance,
Bala
‎2008 Oct 29 8:02 AM
Hi
write: / means SKIP 1 line. that means after leaving one line the data will be printed....
so
Write : / , 'hello'. is equivalent to...
write: /.
write: 'hello'.
but Write /'Hello'. means only "go to new line and print the data...
Arunima
‎2008 Oct 29 7:21 AM
Hi,
In ABAP '/' represent breaking a line and write the entries in the next line.
/ break the line or terminates the current processing line and starts with the next line.
see for example
Tables: makt.
Data itab like makt occurs 0 with header line.
select * from makt into table itab.
append itab.
loop at itab.
Translate itab to LOWER CASE.
write:/ itab-MAKTX.
endloop. Here all the entries will be line by line
Tables: makt.
Data itab like makt occurs 0 with header line.
select * from makt into table itab.
append itab.
loop at itab.
Translate itab to LOWER CASE.
write itab-MAKTX. "Here records will be continuous
endloop.
Cheers!!
VEnk@
Edited by: Venkat Reddy on Oct 29, 2008 12:51 PM
‎2008 Oct 29 7:46 AM
+Missing first item+
if you are not specify the position for first item it will take the whole line length and from the next line it will print all other itmes.
Example --> 1.
write 😕 ,
'hello',
'ABAP'.
Example --> 2.
write : / ,
10 'hello',
30 'ABAP'.
If you specify the position for the first item it will start with first line and specified position
Example --> 1.
write : /2 'first' ,
'hello'.
Example --> 2.
write : /2 'first' ,
10 'hello'.
I think it will help.
Regards,
Florian
‎2008 Oct 29 8:02 AM
Hi
write: / means SKIP 1 line. that means after leaving one line the data will be printed....
so
Write : / , 'hello'. is equivalent to...
write: /.
write: 'hello'.
but Write /'Hello'. means only "go to new line and print the data...
Arunima