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

reporting

Former Member
0 Likes
449

i have records starting with id = 206 and also id = 0000206 in my table

i have used parameters in my report program, so user enters 206 on selection screen field parameter id fields.

can any one help me in fetching records starting with id = 206 and 0000206 from database and display

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
421

HI Krishna,

ranges : r_id type i.
data : l_id(7) type c.

r_id-sign = 'I'.
r_id-option = 'EQ'.
r_id-low = p_id.
append r_id.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = p_id
 IMPORTING
   OUTPUT        = l_id.

r_id-low = l_id.
append r_id.


select * from ZTABLE
        into itab
      where id in r_id.

2 REPLIES 2
Read only

Former Member
0 Likes
422

HI Krishna,

ranges : r_id type i.
data : l_id(7) type c.

r_id-sign = 'I'.
r_id-option = 'EQ'.
r_id-low = p_id.
append r_id.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = p_id
 IMPORTING
   OUTPUT        = l_id.

r_id-low = l_id.
append r_id.


select * from ZTABLE
        into itab
      where id in r_id.

Read only

Former Member
0 Likes
421

hi krishna,

u can create your own FM:

data: STRL TYPE I VALUE 0.

STRL = STRLEN( input ).

data: in(7) type c.

in = input.

strl = 7 - strl.

Do strl TIMES.

CALL FUNCTION 'STRING_CONCATENATE'

EXPORTING

STRING1 = '0'

STRING2 = in

IMPORTING

STRING = in.

ENDDO.

output = in.

select * from table name where id = output.

u can now use the output of this function in u'r query to retrieve data.

reward if useful.

regards,

sohi