03-23-2010 7:05 AM
Hi folks,
read table it_tab into st_tab with key field1 = st_tab1-field2 - 1.
field1 ,field2 are date fields.
i want one day less than the day.
how to achieve this..
in abap minus(-) is not accepting..
please help me..
Thx
03-23-2010 7:09 AM
Hi Swetha,
- is very well accepetd by ABAP. Here the issue is with the way you used the operator. try in different way:
st_tab1-field2 = st_tab1-field2 - 1.
read table it_tab into st_tab with key field1 = st_tab1-field2 .
If you dotn want to change st_tab1-field2 then use some other intermediate varible to store st_tab1-field2 - 1 value.
Regards,
Swarna Munukoti
03-23-2010 7:09 AM
Hi,
if you want to do this in selection screen output. you can do it in initialization event.
After reading table also you can minus dates.
regards,
Venkat.
03-23-2010 7:10 AM
Dear Shwtha,
defile variable say l_date of type st_tab1-field2
use
l_date = st_tab1-field2 - 1
read table it_tab into st_tab with key field1 = l_date.
Edited by: Sachin Bidkar on Mar 23, 2010 8:10 AM
03-23-2010 7:15 AM
03-23-2010 12:30 PM