Skip to Content
author's profile photo Former Member
Former Member

How to get the current posting period

Hi,

Is there any way to get the current posting period?

We have used the following query to get it...

SELECT T0.Code AS 'Period Code', T0.Name AS 'Period Name' FROM [dbo].[OFPR]

T0 where getdate() >= F_RefDate and getdate() <= T_Refdate FOR BROWSE

However, this query will not giving the correct output when the user changes the period to previous period. Is there any other way to get the default Posting period?

Thanks

Ajith

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 20, 2005 at 10:21 AM

    Hi Ajith,

    Setting the "default posting period" to another period only affects the active SAP Business One application.

    When you start a second "SAP Business One", you will find that the default period is set to the real current period. That's why the "default posting period" is not stored in the database.

    In addition there's no way yet to get the information "directly".

    I.e., currently you can only catch the appropriate event in SAP Business One on the "General Settings" form (form type "138")...

    Please note: DI API does not yet support setting another period as "default posting period" - just in case this is the background of your question.

    HTH,

    Frank

    PS:

    Nevertheless there are postings that are allowed in case of postings to other periods:

            • Not Active period *****

            AR documents - block

            AP documents - No block

            Manual JE # - No block

            Goods Receipt \ Goods Issue + Stock transfer + MRV (in 6.7 only) + Stock opening balances and update after counting # - No block

                    • Locked period *****

                    AR documents - block

                    AP documents - block

                    Manual JE # - block

                    Goods Receipt \ Goods Issue + Stock transfer + MRV (in 6.7 only) + Stock opening balances and update after counting - block

                    Add a comment
                    10|10000 characters needed characters exceeded

                  Before answering

                  You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
                  You must be Logged in to submit an answer.

                  Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.