‎2007 Oct 23 8:56 AM
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
‎2007 Oct 23 9:00 AM
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.
‎2007 Oct 23 9:00 AM
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.
‎2007 Oct 23 9:06 AM
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