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

parameters in selection screen

hi all,

in the report, we have 2 parameters in the selection screen i.e., FROM DATE and TO DATE.

AS

PARAMETERS: p_fromdat LIKE kopp-fromdat,

p_todat LIKE kopp-todat.

in the selection screen if we give the data as

FROM DATE : 01.01.2001

TO DATE : 01.01.2009

Do i get the entries only FROM DATE and TO DATE data or FROM DATE and TODATE Inbetween data.

please let me know, i need inbetween data

please help with code to get inbetween range data.

thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Posted on Sep 09, 2009 at 06:03 AM

    Hi,

    If you use parameters it will only consider the date which you enter in the selection screen and not the inbetween range. Instead of parameters use Select-options.

    select-options : s_date for kopp-fromdat.
    

    Here enter the high and low values. It will then consider the range in between.

    Regards,

    Vikranth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2009 at 06:03 AM

    hi,

    use select option instead of parameter.

    select-options : s_data for kopp-fromdat.

    then while filtering

    select ..........

    .......

    where fromdat in s_date

    and todat in s_date.

    Hope this helps..

    Rgds.,

    subash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2009 at 06:06 AM

    Hi Vignesh,

    You can follow the solution given by Vikranth or you have one more option.

    In the select statement where condition, you can write logical expression as per ur requirement.

    where erdat < = todate and erdat > = fromdate.

    Hope this also helps.

    Rgds,

    Sripal

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 09, 2009 at 06:07 AM

    It depends on How you write select query. Always use select options when you try defining ranges in selection screen.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2009 at 06:08 AM

    hi,

    if you want in range use select-option instead of parameters...... here data what u will get depend on ur query....

    Thanks

    Ashu SIngh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 09, 2009 at 06:10 AM

    Hi, Sree,

    Do the following way if you want to work with PARAMETERS.

    TABLES: vbak.
    PARAMETERS: pfdate LIKE vbak-audat OBLIGATORY,
                ptdate LIKE vbak-audat OBLIGATORY.
    
    DATA: it_vbak LIKE STANDARD TABLE OF vbak WITH HEADER LINE.
    
    SELECT * INTO CORRESPONDING FIELDS OF TABLE it_vbak
      FROM vbak
      WHERE audat BETWEEN pfdate AND ptdate.

    Regards,

    Faisal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2009 at 06:11 AM

    Hi,

    You can use the Select Options ad this will extract the records within that range of Dates. So, you can use the following convention like

    Tables : kopp.

    SELECT-OPTIONS s_date like kopp-fromdat.

    Have a look at the following link for a detailed information of the syntax and usage.

    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba66935c111d1829f0000e829fbfe/content.htm

    Hope this helps.

    Thanks,

    Samantak.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2009 at 06:23 AM

    Hello,

    If you want the data between fromdate and todate you have to write select query after the event START-OF-SELECTION like:

    Select field1 field2 ... fieldn FROM Table_name into table IT_TAB

    WHERE DATE BETWEEN fromdate AND todate.

    Here after execution of select query you will get the data into internal table IT_TAB which would be between fromdate and todate.

    hope this will help.

    Best regards,

    Vivek

    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.