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 Statement

Former Member
0 Likes
1,034

Hi Experts,

I am having BEGDA and ENDDA in database. And input is also BEGDA and ENDDA. I want to fetch all the records from the database those are collapsing between Input BEGDA and ENDDA.

urgent.....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
937

HI,

Write like this,

begda >= s_begda and

endda <= s_endda.

Thanks

Azad.

Reward if useful.

6 REPLIES 6
Read only

Former Member
0 Likes
938

HI,

Write like this,

begda >= s_begda and

endda <= s_endda.

Thanks

Azad.

Reward if useful.

Read only

0 Likes
937

s_begda , s_endda are you input parameters.

edited by Azad.

thanks

Azad.

Read only

Former Member
0 Likes
937

If u have to read HR tables... (PAnnnn )

then u can use FMs or MACROs

HR_READ_INFOTYPE : pass BEGDA = sy-datum and ENDDA = sy-datum

or use macro..

rp-read-infotype pernr nnnn pnnnn BEGDA ENDDA.

If u need to read normal table then

select * from <tab where begda le sy-datum and endda ge sy-datum.

Regards

Prax

Read only

varma_narayana
Active Contributor
0 Likes
937

Hi

You can Write the SELECT like this.

SELECT <FIELDS> FROM <TABLE>

INTO TABLE <IT>

WHERE begda >= BDGDA

AND ENDDA <= ENDDA.

<b>Reward if helpful</b>

Read only

Former Member
0 Likes
937

Hi,

You can do it this way:

Select f1 f2...

into itab

from dtab

where endda GE sy-datum

and begda LE sy-datum.

Hope it works,

Sandeep.

Read only

Former Member
0 Likes
937

HI

REWARD IF USEFULL

WHERE BEGDA LE SY-DATUM

AND ENDDA GE SY-DATUM.

REGARDS

NARESH