‎2020 Mar 05 8:12 AM
I have 4 condition related date please give me the suggestions
Quarter BOE Due Date betweenLast Date of Filing 1st Quarter1st April to 30th June31st July
2nd Quarter1st July to 30th September31st Oct
3rd Quarter1st October to 31st December31st Jan
4th Quarter1st January to 31st March31st May
Is there any function module to get the date as per above condition?????????????????
‎2020 Mar 05 8:30 AM
What do you want, giving a date as input, you want the fm to give you at which quarter it is?
‎2020 Mar 05 8:49 AM
Dear pratikcej,
You can make us of the FM HR_99S_GET_DATES_QUARTER, here you have to give the Quarter and Year for which you need the dates. Below screen shot for example.

Regards,
‎2020 Mar 05 8:58 AM
Hi Pratik,
FM - BKK_GET_QUARTER_DATE will fulfill the requirement. by passing date export parameter will be start date of quarter and end date of Quarter.
Regards,
Abinath S
‎2020 Mar 05 9:01 AM
The code is really simple
( I do real code, because your quarter does not correspond to the real quarter of SAP)
methods get_quarter
importing
quarter type i
year type gjahr
returning
value(dates) type WCB_DATE_INTERVAL.
method get_quarter.
data(lv_year) = cond #( when 4 then year + 1 else year ).
dates-from = switch #( quarter when 1 then |{ lv_year }0401|
when 2 then |{ lv_year }0701|
when 3 then |{ lv_year }1001|
when 4 then |{ lv_year }0101| ).
dates-to = switch #( quarter when 1 then |{ lv_year }0630|
when 2 then |{ lv_year }0931|
when 3 then |{ lv_year }1231|
when 4 then |{ lv_year }3101| ).
endmethod.
‎2020 Mar 05 9:19 AM
Please verify your question, it's incorrectly formatted. You should use the CODE button so that to align the columns in your table. Example:
Quarter BOE Due Date between Last Date of Filing
1st Quarter 1st April to 30th June 31st July
2nd Quarter 1st July to 30th September 31st Oct
3rd Quarter 1st October to 31st December 31st Jan
4th Quarter 1st January to 31st March 31st May
‎2020 Mar 05 9:21 AM
You provide a table with values, but tell us what is the functional rule?
Given TABLE
When ???
Then ???