Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding DATES

Former Member
0 Likes
1,352

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?????????????????

6 REPLIES 6
Read only

venkateswaran_k
Active Contributor
0 Likes
1,287

What do you want, giving a date as input, you want the fm to give you at which quarter it is?

Read only

former_member1716
Active Contributor
0 Likes
1,287

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,

Read only

Abinathsiva
Active Contributor
1,287

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

Read only

FredericGirod
Active Contributor
1,287

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.
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,287

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
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,287

You provide a table with values, but tell us what is the functional rule?

Given TABLE

When ???

Then ???