2006 Aug 11 7:51 AM
Hi Frendz, i want to display '001' in lower and '007' in hger , this is my code , but its giving run time error .
tables : coep.
data : month(3) type n,
month1(3) type n.
month = sy-datum+4(2).
month1 = month - 1.
select-options : s_perio for coep-perio default '001' to 'month1'.
i want to display '001' in lower and current month - 1 in higher ie 7.
can u pls help me ?
2006 Aug 11 7:56 AM
Hello Srini,
Use like this.
In INITIALIZATION EVENT,
s_perio-low = '001'.
s_perio-high = sy-datum+4(2) - 1.
If useful reward,
vasanth
2006 Aug 11 7:57 AM
Hi srini,
1. we have to use INITIALIZATION EVENT.
2. just copy paste, and it will show
3.
report abc.
Tables : coep.
data : month(3) type n,
month1(3) type n.
*----
select-options : s_perio for coep-perio .
*----
INITIALIZATION.
month = sy-datum+4(2).
month1 = month - 1.
S_PERIO-LOW = '001'.
S_PERIO-HIGH = MONTH1.
APPEND S_PERIO.
regards,
amit m.
2006 Aug 11 8:00 AM
Hi,
THis is the corrected code. check it.
REPORT ZTESt .
tables : coep.
select-options : s_perio for coep-perio .
initialization.
data : month(3) type n,
month1(3) type n.
month = sy-datum+4(2).
month1 = month - 1.
s_perio-sign = 'I'.
s_perio-option = 'BT'.
s_perio-low = '001'.
s_perio-high = month1.
append s_perio.
regards
vijay
2006 Aug 11 8:00 AM
Hi Srini
Do the coding in Initialization evenT and it will work for you.
Kind Regards
Eswar
Note: Reward for helpful answers.
Message was edited by: Eswar Rao Boddeti
2006 Aug 11 8:01 AM
data : x type i.
x = sy-datum+4(2).
x = x-1.
s_perio-sign = 'I'.
s_perio-option = 'EQ'.
s_perio-low = '001'.
s_perio-high = x.
APPEND s_perio.
CLEAR s_perio.
Message was edited by: Ashok Parupalli
2006 Aug 11 8:01 AM
put like this.
REPORT YTEST_EMAIL2 .
tables : coep.
data : month(3) type n,
month1(3) type n.
select-options : s_perio for coep-perio.
initialization.
break-point.
month = sy-datum+4(2).
month1 = month - 1.
s_perio-sign = 'I'.
s_perio-option = 'BT'.
s_perio-low = '001'.
s_perio-high = month1.
append s_perio.
Regards
Prabhu