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

Regarding date

Former Member
0 Likes
539

Hi all,

In selection screen have parameter field date. When i used select statement it should pick the data before 90 days

of the selection screen . It should take each and every value

in the internal table.

Please suggest it

please give code.

thanks

venkat

3 REPLIES 3
Read only

Former Member
0 Likes
523

Hi Venkat,

Have an field of ldate and subtract the current date with 90 days. and use that in your where condition range (from date i.e ldate to sy-datum) in select statement .

Regards,

JMB

Read only

Former Member
0 Likes
523

ranges : r_date for sy-datum.

date_low = p_date - 90.

r_date-sign = 'I'.

r_date-option = 'BT'.

r_date-low = date_low.

r_date-high = p_date ..

Now use r_date in your select statement to get the data ..

select * from <table> into <itab>

where <date> in r_date.

Read only

Former Member
0 Likes
523

Hi,

tables : vbak.

data : it_vbak like vbak occurs 0,

w_date type sy-datum.

parameters: p_date type sy-datum.

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

EXPORTING

date = p_date "'20080218'

days = '90'

months = '00'

SIGNUM = '-'

years = '00'

IMPORTING

CALC_DATE = w_date.

select * from vbak into table it_vbak where ERDAT < w_date.