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

hi reg date

Former Member
0 Likes
776

hi all

i want to give a date range to int table.

my higher value is sy-datum, lower value must be less than 2 yrs , how can i code for this.

any suggesstion

hi all

i want to give a date range to int table.

my higher value is sy-datum, lower value must be less than 2 yrs , how can i code for this.

any suggesstion

6 REPLIES 6
Read only

Former Member
0 Likes
746

Hi,

You can use this function module this will solve your problem

RP_CALC_DATE_IN_INTERVAL

Regards,

siva chalasani.

<b>Reward poits if usefull</b>

Read only

0 Likes
746

hi siva

what r the parametrs to b given for that function module?

whther it ll satisfy my requirement

Read only

former_member386202
Active Contributor
0 Likes
746

Hi,

FOr lower date use FM HR_PT_ADD_MONTH_TO_DATE

Regards,

Prashant

Read only

Former Member
0 Likes
746

Hi,

Pass the date to DATE field

and give 02 in years field

and give '-' minus symbol in SIGNUM

andcheck the date you can get two years back date

Read only

Former Member
0 Likes
746

Hi ,

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

EXPORTING

date = '27.11.2007'

  • days =

  • months =

SIGNUM = '+'

years = '2'

IMPORTING

CALC_DATE = v_calc_date.

Rewards if useful..

kavitha

Read only

gopi_narendra
Active Contributor
0 Likes
746

Check this code

DATA : l_date TYPE sy-datum.
DATA : l_y(4) TYPE c.
DATA : l_m(2) TYPE c.
DATA : l_d(2) TYPE c.
SELECT-OPTIONS : so_date FOR sy-datum.

INITIALIZATION.
  so_date-high = sy-datum.
  l_y = sy-datum+0(4).
  l_y = l_y - 2.
  l_m = sy-datum+4(2).
  l_d = sy-datum+6(2).
  CONCATENATE l_y l_m l_d INTO l_date.
  so_date-low = l_date.
  APPEND so_date.

Regards

Gopi