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

Date Function

Former Member
0 Likes
492

Hi ,

can anyone will me writing ABAP statements for ..

I have fiscal year period 001 to 003 and 004 to 006 , 007 to 009 and 010 to 012.

I want the data for these split period which need to be collected for the 3-3-3-3 pattern.

means 3 months data need to be collected as q1,q2,a3 AND Q4.

CAN anyone will give me the steps to write down this..

~Thanks

3 REPLIES 3
Read only

Former Member
0 Likes
442

Hi,

Which type of Data you are talking here.

You must be knowing the Start Date & the End Date of every Fiscal Year, Based on that you can segregate your values.

Lets Say you have got an Internal Table Itab with fields as Amount & Date.

Now

Q1 = Sum (Quantities) where start_date_of_q1 >= Date and Date <= end_date_of_q1

Q2 = Sum (Quantities) where start_date_of_q2 >= Date and Date <= end_date_of_q2

Q3 = Sum (Quantities) where start_date_of_q3 >= Date and Date <= end_date_of_q3

Q4 = Sum (Quantities) where start_date_of_q4 >= Date and Date <= end_date_of_q4

Read only

RaymondGiuseppi
Active Contributor
0 Likes
442

You may use FM [LAST_DAY_IN_PERIOD_GET|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=last_day_in_period_get+&adv=false&sortby=cm_rnd_rankvalue] and [FIRST_DAY_IN_PERIOD_GET|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=first_day_in_period_get&adv=false&sortby=cm_rnd_rankvalue] to determine the date required, the rest is basic abap.

Regards

Read only

0 Likes
442

Hi,

How to store...

fiscal year period 001.2008 to 003.2008 this is the range from and to which i have to store in an single variable...that is fiscal year..

Thankls

Edited by: Sonu Sharma on Nov 5, 2008 5:30 AM