Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

select problem...

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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

Former Member
0 Kudos

select <fields> from <database>

into table <itab>

where <Fiscal year field> = p_fiscal_year and

<period> in s_period.

rewards point if useful.

Madhavi

Former Member
0 Kudos

Hello Raghu,

An example:

Select belnr into table itab_belnr where gjahr = p_year

and monat in s_period.

Thanks,

Venu

Former Member
0 Kudos

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

Former Member
0 Kudos

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.