2006 Sep 14 11:36 AM
Hi Everyone ,
I have to pass the Date and have to get the End of month
Ex : if I pass 09142006 as inputdate I need 09302006
as my Output date .
Is there any Function Module available or
what is the way to proceed ..
Thanks in Advance,
Regards,
PAVAn.
Lets day ldate is the output of the FM..after that use the below and it get you the date in required format.
Translate ldate using '/ '.
Condense ldate no-gaps.
OR
Write ldate to lfdate MMDDYYYY.
Message was edited by: Anurag Bankley
2006 Sep 14 11:38 AM
2006 Sep 14 11:40 AM
2006 Sep 14 11:44 AM
From that FM my Enddate will be in 09/30/2006
I want to get 09302006.
2006 Sep 14 11:49 AM
Lets day ldate is the output of the FM..after that use the below and it get you the date in required format.
Translate ldate using '/ '.
Condense ldate no-gaps.
OR
Write ldate to lfdate MMDDYYYY.
Message was edited by: Anurag Bankley
2006 Sep 14 11:50 AM
then go like this
REPORT Z_TEST.
DATA : DATE1(10),
LAST LIKE SY-DATUM.
CALL FUNCTION 'SG_PS_GET_LAST_DAY_OF_MONTH'
EXPORTING
DAY_IN = SY-DATUM
IMPORTING
LAST_DAY_OF_MONTH = LAST.
WRITE : LAST to date1 MM/DD/YYYY.
REPLACE all occurrences of '/' IN date1 WITH SPACE.
CONDENSE date1.
WRITE : / date1.Reward if helpful and close thread if solved
Message was edited by: Chandrasekhar Jagarlamudi
2006 Sep 14 11:41 AM
u can use the simple logic...
ldate <= inputdate of type date.
lmon = ldate+4(2) + 1.
concatenate ldate(4) lmon '01' into ldm.
ldm = ldm - 1.
2006 Sep 14 11:44 AM
REPORT Z_TEST.
DATA : DATE1 LIKE SY-DATUM,
LAST LIKE SY-DATUM.
CALL FUNCTION 'SG_PS_GET_LAST_DAY_OF_MONTH'
EXPORTING
DAY_IN = SY-DATUM
IMPORTING
LAST_DAY_OF_MONTH = LAST.
WRITE : / LAST.
2006 Sep 14 12:11 PM
hi pavan,
use the function module RP_LAST_DAY_OF_MONTHS.
that should help u
regards,
sudha.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |