Application Development 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: 

Need a FM for gettng starting & ending date based on the settlement period

Former Member
0 Kudos

Hi,

I have to filter a database table based on the settlement period( IDENT3 ) and the field available is of date field. Can anyone give me a function module by which can calculate the starting date and ending date by providing the settlement period ( eg. AM- Monthly, AQ- Quarterly, AJ- Annually, etc ) and date.

Thanx in advance.

Regards,

Sumanth.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sumanth,

Please use the function module 'DATE_CONVERT_TO_FACTORYDATE' to get the start date and end date for the particular factory calender.

For end date:

CORRECT_OPTION +

DATE sy-datum

FACTORY_CALENDAR_ID Aq(quaterly)

For start date:

CORRECT_OPTION -

DATE sy-datum

FACTORY_CALENDAR_ID Aq(quaterly)

According to sy-datum, it will calculate the Extreme interval .

Thanx,

Zenthil.

1 REPLY 1

Former Member
0 Kudos

Hi Sumanth,

Please use the function module 'DATE_CONVERT_TO_FACTORYDATE' to get the start date and end date for the particular factory calender.

For end date:

CORRECT_OPTION +

DATE sy-datum

FACTORY_CALENDAR_ID Aq(quaterly)

For start date:

CORRECT_OPTION -

DATE sy-datum

FACTORY_CALENDAR_ID Aq(quaterly)

According to sy-datum, it will calculate the Extreme interval .

Thanx,

Zenthil.