‎2006 Aug 01 12:12 PM
Hello,
i have used a 'select-options' in my report. I want to display the low and high option of it as a text on the top of my page, sumthing like.
write: 'ABCDEFG' + s_bldat-low + 'to' + s_bldat-high.
how do that ?
Thanks..
‎2006 Aug 01 12:14 PM
c'ABCDEFG' + s_bldat-low + 'to' + s_bldat-high.
concanate into string.
and write string.
‎2006 Aug 01 12:14 PM
c'ABCDEFG' + s_bldat-low + 'to' + s_bldat-high.
concanate into string.
and write string.
‎2006 Aug 01 12:15 PM
hi,
use
read table s_date index 1.
write 😕 'ABCDEFG',
s_date-low,
'to',
s_date-high.
but this will works fine only if user enters only 1 range.
if he gives more than 1 range of dates, this would not work .
so what you can do is, send this date select-option to the table where you match the dates and fetch all the dates into the internal table .
example :
if your date is for material creation date & you would like to know the dates ,
data : begin of it_ersda occurs 0,
date type sy-datum,
end of i_ersda.
select ersda
into table it_ersda
from mara
where ersda in s_date.
sort it_ersda by ersda.
*--now IT_ERSDA table will have the valid material creation dates in ascending order.
read table it_ersda index 1.
v_startdate = it_ersda-ersda.
describe table it_ersda lines v_lines.
read table it_ersda index v_lines.
v_enddate = it_ersda-ersda.
now you can use write, to print the start date and end date.
write 😕 'ABCDEFG',
v_startdate,
'to',
v_enddate.
use this statement in TOP-OF-PAGE.
regards
srikanth
Message was edited by: Srikanth Kidambi
‎2006 Aug 01 12:16 PM
Hello Shehryar,
as a select-option may contain several values, the idea to display 'THE' value might not be possible at all.
If there is definitely only one value and you use list processing then you may write a header info in the at top of page list event.
Regards
Klaus
‎2006 Aug 01 12:26 PM
Select-options will have multiple value but if you are sure its going to be only one. Then try following:
data: v_string(50) type c.
read table s_bldat index 1.
concatenate 'ABCDE' s_bldat-low 'to' s_bldat-high into v_string separated by space.
write: v_string.
Regards
Damasus
‎2006 Aug 01 1:04 PM
Shehyar,
Try and use the below function module to print the description.
CALL FUNCTION 'SELOPT_PRINT'
EXPORTING
TEXT = TEXT-T07
TABLES
SELOPT = SO_VSTEL.