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: 

begda and ennda

former_member497886
Participant
0 Kudos

hi,

If in the code i write a select statment with condition that

begda <= endda and endda >= begda.

which duration list it will give.

Plz make me understand.

Thanks.

6 REPLIES 6

former_member186143
Active Contributor
0 Kudos

everything ofcourse since it is always true

Former Member
0 Kudos

U'll get records where the ENDDA >= BEGIN date

and BEGDA <= ENDdate ..

I mean the BEGDA and ENDDA will be in BEGIN and END dates ..

Ex : If U give Begin = 01/01/2008 end date = 12/31/2008

and If U have records in infotype say as ..

BEGDA ENDDA

01/01/2007 12/31/2007

01/01/2008 12/31/2008

01/01/2009 12/31/2009

U'll get the second record ...

Former Member
0 Kudos

check this..

you will get the records whcih exists between these dates .

for example...

select pernr

begda

endda

from pa0002

into table itab

where pernr in s_pernr

and begda le endda

and endda ge begda .

then you will get the records whcih exists between these date intervals begda and endda in the infotype 0002 .

Former Member
0 Kudos

It will give data for the duration from beggining date and endate.

Ex : if beginda = 1

endada = 30

it will fetch data from 1st to 30th..irrespective of the month this will fetch data within that duration

Former Member
0 Kudos

Hi,

It will give that records where Enddate is Greater than or equal to begin date.

In either side it is the same condition, because in first condition it is true, if Begda is less than or equal to Enda.

In the Second condition is true if Endda greater the or equal to begda. So ultimately the condition is tru if start date is lesss then End date or End date is greater the Start date or same .

Regards,

Sujit

Former Member
0 Kudos

Hi,

this will give all the dates which is less than or equal to endda.

as u have written begda<=endda & endda>=begda

if begin date is less then or equal to end date and then u r checking enddate is greater than or = to begin date means u r checking the same thing but in different manner....

so it will show u the records in which date is less than or equal to enddate.

Thanks & Regards

Ashu Singh