2007 Aug 07 7:40 AM
Hi,
I want to write a program to get the numbers in the following sequence.
Plz let me know how to do?
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5.
2007 Aug 07 7:42 AM
Hi..
This is the Code.
PARAMETERS: p_num type i default 5.
data : v_index type sy-index.
DO P_NUM TYPES.
V_INDEX = SY-INDEX.
DO V_INDEX TIMES.
Write: sy-index.
ENDDO.
SKIP.
ENDDO.
<b>Reward if Helpful.</b>
Hi,
I want to write a program to get the numbers in the following sequence.
Plz let me know how to do?
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5.
2007 Aug 07 7:42 AM
Hi..
This is the Code.
PARAMETERS: p_num type i default 5.
data : v_index type sy-index.
DO P_NUM TYPES.
V_INDEX = SY-INDEX.
DO V_INDEX TIMES.
Write: sy-index.
ENDDO.
SKIP.
ENDDO.
<b>Reward if Helpful.</b>
2007 Aug 07 7:43 AM
Hi Ram,
DO 5 TIMES.
V_INDEX = SY-INDEX.
DO V_INDEX TIMES.
WRITE: SY-INDEX, ' '.
ENDDO.
SKIP.
ENDDO.
Thanks,
Vinay
2007 Aug 07 7:43 AM
Hi,
see this code.
do 5 times.
write:/.
do sy-index times.
write:sy-index.
enddo.
enddo.
if u don't want the spaces do like this
data:n.
do 5 times.
write:/.
n = sy-index.
do sy-index times.
n = sy-index.
write:n.
enddo.
enddo.
rgds,
bharat.
2007 Aug 07 7:51 AM
PARAMETERS: p_input TYPE i DEFAULT 5.
DATA : w_index TYPE sy-index.
DO p_input TIMES.
w_index = sy-index.
DO w_index TIMES.
WRITE: sy-index.
ENDDO.
SKIP.
ENDDO.
Regards,
Pavan
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |