‎2008 Jun 20 11:28 AM
Hi Guru,
I want one function module which can convert period to date.
means if I am giving 06-2008. Then I should get as out put as
01-06-2008 and 30-06-2008. I shouls get the first and last date for that period.
I should give only the period.
Max pts will be rewarded.
Thanks,
‎2008 Jun 20 11:30 AM
‎2008 Jun 20 11:35 AM
Hi,
In this case u can concatenate 01 and 30 to the date that u are passing and collect in two variables representing the start date and end date respectively.
Cheers,
Sai
‎2008 Jun 20 11:36 AM
If v_period is your period ...
replace all occurrences of '-' in v_period with ''.
condense v_period.
concatenate v_period2(4) v_period0(2) '01'
into v_firstdate.
Use FM BKK_GET_MONTH_LASTDAY and pass
v_firstdate .. get v_lastdate ...
write v_firstdate to v_fdate.
write v_lastdate to v_ldate.
‎2008 Jun 20 11:37 AM
hi use this ..fm
OIL_MONTH_GET_FIRST_LAST..
data: fday type sy-datum,
lday type sy-datum.
CALL FUNCTION 'OIL_MONTH_GET_FIRST_LAST'
EXPORTING
I_MONTH = sy-datum+4(2)
I_YEAR = sy-datum+0(4)
IMPORTING
E_FIRST_DAY = fday
E_LAST_DAY = lday.
write:/ lday,fday .
‎2008 Jun 20 11:55 AM
Hi Sandeep,
I tried with ur input to get the requirement and i am able to solve half of the part with FM JVA_LAST_DATE_OF_MONTH
u try with this code....
PARAMETERS: P_DATE TYPE JVA_PROD_MONTH.
DATA: DATE1 TYPE SY-DATUM.
CALL FUNCTION 'JVA_LAST_DATE_OF_MONTH'
EXPORTING
YEAR_MONTH = P_DATE
IMPORTING
LAST_DATE_OF_MONTH = DATE1.
WRITE: DATE1.
If u can find the FM for First date in the month with enterring period then the probelm is solved.
-Regards.
‎2008 Jun 20 12:51 PM
Hi.
You can increase the number of people reading your question by using a better subject. Describe your issue and more people get interested in reading your posting. Please have a look into our rules of engagement which will explain some other things you should know as a member of SDN. Postings not following the rules will be locked or deleted.
Best regards,
Jan Stallkamp