04-28-2009 6:49 AM
Hi All,
I have a requirement. If i enter month in selection screen, depends on the month value how to get the previus month value. For Input criteria i can able to give only month.
Can you please suggest me how to do that?
Thanks,
Sreekala.
04-28-2009 6:51 AM
04-28-2009 6:52 AM
Sreekala,
I have a question for you. Have you searched in SCN Forums for this question?
Please let me know
Thanks,
Babu Kilari
04-28-2009 7:10 AM
Yes, I searched in Forum. But i am getting the Function modules with the inpur criteria Date field.
But i can able to give input only month.
Thanks,
Sreekala.
04-28-2009 7:12 AM
You neither need to search the forum, nor look for a Function Module for your requirement.
A little bit of common sense will do the trick.
pk
04-28-2009 7:15 AM
I searched in Forum and i tried with F4 help in SE37. Still i didnt get, if you find any FM let me know.
04-28-2009 6:59 AM
Hi...
If in selection criteria if u entering only month then its easy to get previous month by simply do -1 from that.
If you are taking date in selection then do following method
* if format is YYYYMMDD
then
DATA : v_date type sy-datum,
v_month type i.
PARAMETERS: P_DATE TYPE SY-DATUM.
v_month = P_DATE+4(2).
v_month = v_month - 1.
write v_month.
This way u can get the pre. month. hope this will helpful to u.
Regards,
Chintan.
04-28-2009 7:13 AM
if i enter input month as 1 then previous month will be 0. I have to find out the previous month. if i enter month in selection screen 1 then previous month will be 12 .
Is there any FM.
Thanks,
Sreekala.
04-28-2009 7:11 AM
for getting previous month you have somany function modules.
search for the same in SE37 ,providing as input PREVIOUSMONTH* and press F4 then you will get set of function modules.call this function module and populate as per definition of that function module.
Hope it will helpful
04-28-2009 7:11 AM