SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Последний день предыдущего квартала



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
z01
Специалист
Специалист



Joined: 18 Jan 2008
Posts: 59

PostPosted: Wed Dec 03, 2008 4:42 pm    Post subject: Последний день предыдущего квартала Reply with quote

Здравствуйте,
как найти последний день предыдущего квартала?
Back to top
View user's profile Send private message
werwolf
Участник
Участник



Joined: 19 Feb 2008
Posts: 30
Location: Ростов-на-Дону

PostPosted: Wed Dec 03, 2008 5:26 pm    Post subject: Reply with quote

Быстрым поиском нашел ФМ HR_99S_GET_DATES_QUARTER
Необходимо только вычислить номер предыдущего квартала.
Back to top
View user's profile Send private message
z01
Специалист
Специалист



Joined: 18 Jan 2008
Posts: 59

PostPosted: Wed Dec 03, 2008 6:04 pm    Post subject: Reply with quote

werwolf wrote:
Быстрым поиском нашел ФМ HR_99S_GET_DATES_QUARTER
Необходимо только вычислить номер предыдущего квартала.


Спасибо, но у нас нет такого Sad
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 60
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Wed Dec 03, 2008 9:05 pm    Post subject: Reply with quote

Code:
DATA: p_rpdat TYPE sy-datum.

p_rpdat = sy-datum.
* Первый день текущего квартала
p_rpdat+4(2) = TRUNC( ( p_rpdat+4(2) - 1 ) / 3 ) * 3 + 1.
p_rpdat+6(2) = '01'.

* Последний день предыдущего квартала
p_rpdat = p_rpdat - 1.
Back to top
View user's profile Send private message Blog Visit poster's website
Удав
Гуру
Гуру


Age: 48
Joined: 25 Jan 2008
Posts: 580
Location: Москва

PostPosted: Thu Dec 04, 2008 1:48 am    Post subject: Re: Последний день предыдущего квартала Reply with quote

z01 wrote:
Здравствуйте,
как найти последний день предыдущего квартала?

1.Найти первый день текущего квартала (ФМ FIRST_DAY_IN_PERIOD_GET)
2.Вычесть полученной даты 1, как сказал vga Wink

_________________
С уважением,
Удав.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.