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

select problem...

I need to retrieve some data from the database table. Selection parameter is P_FISCAI_YEAR, and the select option is S_PERIOD. But in the table I have three fields fiscalyear, Period from and Period to. I don’t know how to write select on this. Please suggest me how to write.

Thanks in Adv,

Raghu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:11 AM

    SEE ITS SIMPLE

    take a single field as parameter for PERIOD.

    now write select as

    select <field> from dbtab into <wa>

    where <from period field> LT <parameter> and

    <to period field> GT <parameter>.

    HOPE U GOT IT

    REWARD IF USEFUL

    KEEP ROCKIN

    'VIVEK

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:13 AM

    select <fields> from <database>

    into table <itab>

    where <Fiscal year field> = p_fiscal_year and

    <period> in s_period.

    rewards point if useful.

    Madhavi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:14 AM

    Hello Raghu,

    An example:

    Select belnr into table itab_belnr where gjahr = p_year

    and monat in s_period.

    Thanks,

    Venu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:14 AM

    select fiscalyear, Period from,Period to into <ur ITAB> from DBTAB

    where fiscal year = P_FISCAI_YEAR and period in S_PERIOD.

    i think ur query will be resolved by this

    regards,

    kushagra

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:18 AM

    Raghu,

    SELECT required fields

    FROM your databasetable

    into table internal table

    where fiscalyear eq P_FISCAI_YEAR and

    Period from IN S_PERIOD and

    Period to IN S_PERIOD.

    Note : internal table should have the same fields

    like your extraction fields .

    Don't forget to reward if useful.

    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.