Application Development and Automation 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: 
Read only

select query

Former Member
0 Likes
572

hi,

I want to fetch the records of the current year and the records of all the previous years.....................in Selection screen I am giving the fiscal year as the current year.............then in my Select query how can I write my where condition..........

in where condition gjarh less than and equal to the current year entered in the selection screen.............?How to write.......can anyone help me out in this.........

thanks in advance............

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
519

IN WHERE CONDITION USE

GJAHR LE P_GJAHR.

REWARD IF USEFUL.

AMIT SINGLA

4 REPLIES 4
Read only

Former Member
0 Likes
519

Hi Deepthi,

Use the less than and eqaul to (<= or LE) to fetch the entries.

Thanks and Regards,

Sunil Yarlagadda.

Reward if it is helpfull

Read only

Former Member
0 Likes
520

IN WHERE CONDITION USE

GJAHR LE P_GJAHR.

REWARD IF USEFUL.

AMIT SINGLA

Read only

Former Member
0 Likes
519

Hi

suppose if your date is SY-DATUM then

for year you can write the logic like this

<b>sy-datum+0(4).</b>

then it will take only the year part

apply this rule for ur code

<b>reward if usefull</b>

Read only

Former Member
0 Likes
519

Hi Deepthi,

Use < sy-datum.

Regards,

Sai