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

How to pass given week range condition to select query which is function module

Hi Experts,

I am Creating function Module in that i have to write a select query that query needs to retrieve fields from Custom table and the condition is based on date, between that dates i need to fetch. I have field as SUB_QUAN_TIMEST(char 14) and there is no start date and end date fields.

ie. i have to write like this where SUB_QUAN_TIMEST between given week range .

Can any one tell me how to write this .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Nov 21, 2012 at 08:04 AM

    Loop this SUB_QUAN_TIMEST If this is a Table.

    Split the SUB_QUAN_TIMEST Into table ITAB with ofset (as it is a 14 character. you will have date in two 7 char formats).

    Then check the useful FM from the below link.

    http://scn.sap.com/thread/3269347

    build your logic.

    endloop.

    hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 21, 2012 at 08:44 AM

    how this date range is stored in sub_quan_timest ..? you can check a record in the table.
    if you know that then you can use it to create the same through your from and to date parameters and pass it to your where clause.

    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.