Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Find number from input data

0 Likes
804

Purpose : Find number from input data

Input parameter : From No ( 10 )

To No (20)

Input parameter : Check No (Single Char) “2”

Generate Numbers from 10 to 20.

( Use Character String operations )

Output

12

20

Purpose : Find number from input data

Input parameter : From No ( 10 )

To No (20)

Input parameter : Check No (Single Char) “2”

Generate Numbers from 10 to 20.

( Use Character String operations )

Output

12

20

2 REPLIES 2
Read only

Sandra_Rossi
Active Contributor
0 Likes
759

Try by yourself first, and revert back with questions.

Read only

0 Likes
759
REPORT Z46R027_CHECK_NO.

parameters: First_No TYPE char2 ,
Last_No Type char2 .

Start-OF-SELECTION.


End-of-selection.

Data : p_no TYPE i.

p_no = 1 + Last_No - First_No.

do p_no times.
*if First_No <= Last_No.
if First_No+0(1) = 2 or First_No+1(1) = 2.
write: /01 First_No.
endif.

First_no = First_no + 1.
enddo.

exit.

I have tried without string operations and it's working