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

How to fetch last 12 months posting date from DFKKOP table

I am selected document number , posting date and amount from dfkkop table based contract account no and palced in an internal table , now have to display only last 12 months data instead of all the data. how should i write the logic to fetch only 12 months posting date data.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2011 at 06:07 AM

    Hi Sarfaraz !

    U have to write logic about fetching data based on current month posting date from DFKKOP table. i.e system should calculate last 12 month posting date based on the current month posting date of Invoice .

    Thanks,

    AnUrAg

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 08, 2011 at 08:09 PM

    Hi,

    Use system date as your current date.

    Then select documents from DFKKOP where (System date minus BUDAT in days <=366).

    I am not an ABAPer, so you will have to use appropriate ABAP statement to calculate the difference in days between the above 2 2 dates.

    You will have to confirm with your user/s what they mean by "Documents in DFKKOP". DFKKOP is the open items table.

    If there were items that were paid, you will have to look at the clearing reason 01, and retrieve based on the Clearing Posting date.

    Also, check if they want to retrieve documents that have been reversed.

    I hope this helps.

    Regards,

    Ivor Martin

    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.