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

date problem

Former Member
0 Likes
1,120

dear all,

i have a task which has to be fininshed in 50 days.

while generating report i have to get these values by default: -

start date of the task as sy-datum and (this value i got)

task finish date is 50th day from the Sy-datum.

for example: sy-datum is 01.01.2008

task finish date : 19.02.2008

how to do this. inputs plz. it's urgent

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,095

You can use the Function

RP_CALC_DATE_IN_INTERVAL

11 REPLIES 11
Read only

Former Member
0 Likes
1,096

You can use the Function

RP_CALC_DATE_IN_INTERVAL

Read only

Former Member
0 Likes
1,095

Try directly adding number 50 to sy-datum

type : l_date_start type sy-datum,

l_date_finish type sy-datum

l_date_start = sy-datum.

l_date_finish = sy-datum + 50.

Read only

Former Member
0 Likes
1,095

hi,

Take another variable of type sy-datum.

data:

w_date like sy-datum.

w_date = sy-datum + 50.

Assign this date to the final date.

Hope this will help.

Regards

Sumit Agarwal

Read only

Former Member
0 Likes
1,095

Hi,

Try the below code for Finish date-

parameters:

sdate like sy-datum,

fdate like sy-datum.

Initialization.

sdate = sy-datum.

fdate = sy-datum + 50.

Regards,

Sujit

Read only

Former Member
0 Likes
1,095

Hi

try to use the function module RP_CALC_DATE_IN_INTERVAL

and give the DAYS as 50 as you want date after 50 days.

Reward if useful.

Read only

peter_ruiz2
Active Contributor
0 Likes
1,095

hi,

do this.



v_enddate type sydatum.

v_enddate = sydatum + 50.

pass v_date to task end date variable.

regards,

Peter

Read only

Former Member
0 Likes
1,095

Use this code.

Data: vari type sy-datum.

vari = sy-datum + 50.

In the variable vari you will get the desired result.

Reward points if helpful

Regards

Bikas

Read only

Former Member
0 Likes
1,095

hi,

check the following.

data:
  start_date  like sy-datum,
  finish_date like sy-datum.

  ----------------
  ----------------

 start_date   = sy-datum.
 finish_date = sy-datum + 50.

------------------
-----------------

write:
  'Start Date:',start_date,
  'Finish Date:', finish_date.

Hope it will work.

Reward if found helpful.

Anirban Bhattacharjee

Read only

Former Member
0 Likes
1,095

Hi

DATA :
var1 type sy-datum,
var2 type sy-datum.

var1 = sy-datum    " Start Date 
var2 = sy-datum + 50. "Finished Date

try this one , it will solve your problem.

Rewards Points if useful.

Thanks & Regards

Nikunj Shah

Read only

Former Member
0 Likes
1,095

Hi Karteek,

use the below code:

DATA:
  a LIKE sy-datum.

SELECT-OPTIONS:
  c FOR sy-datum.

INITIALIZATION.
  c-low  = sy-datum.
  a = sy-datum + 50.
  c-high = a.
  APPEND c.

Best Regards,

Sunil.

Read only

Former Member
0 Likes
1,095

Solved