‎2008 Dec 10 5:51 AM
Hi All,
In selection screen i should enter the month field only from MKPF-BUDAT.
which contains date as 01.03.2008.
i should capture only month.
selection screen should be like this..
Month----
> 03
i should not allow to enter day n year.
how to validate this
Regards
Suprith
‎2008 Dec 10 5:54 AM
Hi
lets say you declared PARAMATERS Like this
parameters month(2).
and you entered 03
now AT SELECTION-SCREEN event
select single month from t247 INTO month where month = month
( for correct field names go through T247 table)
if sy-subrc <> 0
message 'Please enter a Valid Month' type 'E'
endif.
Best Regards
Ramchander Rao.K
‎2008 Dec 10 5:54 AM
Hi
lets say you declared PARAMATERS Like this
parameters month(2).
and you entered 03
now AT SELECTION-SCREEN event
select single month from t247 INTO month where month = month
( for correct field names go through T247 table)
if sy-subrc <> 0
message 'Please enter a Valid Month' type 'E'
endif.
Best Regards
Ramchander Rao.K
‎2008 Dec 10 5:56 AM
Hi,
use the following piece of code :
report sy-repid.
parameters : p_month(2) type num.
Using this automtcailly user will have to enter a month number only and nothing else will be accepted.
Regards,
Mansi
‎2008 Dec 10 5:59 AM
‎2008 Dec 10 6:00 AM
‎2008 Dec 10 6:09 AM
Hi suprith kumar,
rather using bkpf-budat. try out below way..
REPORT ZTEST_MONTH.
TABLES : ISELLIST.
SELECT-OPTIONS : S_MONTH FOR ISELLIST-MONTH.
DATA: MONTH LIKE VVIS_SOPTI-SMONTH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MONTH-LOW.
CALL FUNCTION 'REAL_ESTATE_F4_MONTH'
EXPORTING
I_MONTH = 00
I_POPUP_TITLE = 'Choose Month'
IMPORTING
E_MONTH = MONTH.
* E_SEL_OK =
S_MONTH-LOW = MONTH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MONTH-HIGH.
CALL FUNCTION 'REAL_ESTATE_F4_MONTH'
EXPORTING
I_MONTH = 00
I_POPUP_TITLE = 'Choose Month'
IMPORTING
E_MONTH = MONTH.
* E_SEL_OK =
S_MONTH-HIGH = MONTH.Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
‎2008 Dec 10 6:18 AM
Hi..
For your specific select option just write the code
at selection-screen...
check if p_mon > 0 and p_mon <13...
consider the month numbers from 1 to 12..and then continue with the code for this check..this shud solve ur problem or else u can give errro messages for all other checks....