2007 Sep 20 8:46 AM
Hi to all
plz tell me in the database i have order creation date in yyyy-mm-dd format.
At selection screen i am giving fiscal year bkpf-gjahr.
I want report according to fiscal year.
How to compare year and date.
plz help me out.
thanks...
Hi to all
plz tell me in the database i have order creation date in yyyy-mm-dd format.
At selection screen i am giving fiscal year bkpf-gjahr.
I want report according to fiscal year.
How to compare year and date.
plz help me out.
thanks...
2007 Sep 20 9:55 AM
I am not very sure if the "Order" ( that you are talking about ) is Accounting Doc ( BKPF-BELNR).
If that is so - creation date is BKPF-BLDAT , Fiscal year - u already know it is BKPF-GJAHR and period is BKPF-MONAT.
You can decide the Fiscal Year & Period from a date by using FM -DATE_TO_PERIOD_CONVERT
and
FIRST_DAY_IN_PERIOD_GET
LAST_DAY_IN_PERIOD_GET
for deriving the boundaries of a period.
For any Order , you can have the detials in AUFK ( creation date ERDAT).
Revert in case of problems.
2007 Sep 21 7:03 AM
Hi,
Use the function modue : RP_BEGDA_ENDDA_PAYROLL_YEAR_TH
Provide abkrs = '01' and year as your input fiscal year. It will provide o/p from Jan 1st to Dec 31st of that year.
Hope this info will help you. Rewards points in Useful.
With Regards,
K K V
2007 Sep 21 7:06 AM
Hello Anubhav
Please use FM: GET_CURRENT_YEAR passing the company code and date you will get the fiscal year...
Regards,
Arun
2007 Sep 26 8:54 PM
Hi. If you already have the two dates that you want to compare, then you can just create a couple of temporary date fields to use like this:
Data: fiscal_begda type sy-datum,
fiscal_endda type sy-datum.
fiscal_begda(4) = bkpf-gjahr.
fiscal_begda+4(4) = '0101'.
fiscal_endda = fiscal_begda.
fiscal_endda+4(4) = '1231'.
SELECT * FROM your_table INTO internal_table
WHERE bkpf-gjahr >= fiscal_begda
AND bkpf-gjahr <= fiscal_endda.
ENDSELECT.
I hope this helps.
- April King
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |