‎2010 Aug 11 9:48 AM
Dear All,
Is there any function Module which take current date as input and return previous month start and end date.
e.g; Input = 20100811
output = 20100701 and 20100731
Regards,
Sohail
Moderator message: date conversion questions = FAQ, please search before posting.
locked by: Thomas Zloch on Aug 11, 2010 11:08 AM
‎2010 Aug 11 10:04 AM
Hello Muhammed,
You can use fm WSAF_GET_LAST_DAY_OF_MONTH. As parameter you have to process the current date and subtract 1 from current month. For example today is 11.08.2010, you can change the month portion to 07 and give 11.07.2010 to the fm. It will return the relevant last day of the month.
Regards,
Ali
‎2010 Aug 11 10:05 AM
Hello,
Use FM "'RS_VARI_V_LAST_MONTH"'
Pass current date in P_DATETAB-low and execute the FM.
Regards,
Bhavana
‎2010 Aug 11 10:09 AM
Check this Wiki
http://wiki.sdn.sap.com/wiki/display/ABAP/FunctionModulerelatedonDate+calculations
Regards
Sas