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

sy-datum

Former Member
0 Likes
698

hi

period is field of type n, & is declared by parameters, when a number eg. x is entered in period input field, it must show the data of current period minus x.

eg. if x=6 and current period is 8 then it must show 8-6= 2 it must show data of 2nd date, how?plz answer for this

hi

period is field of type n, & is declared by parameters, when a number eg. x is entered in period input field, it must show the data of current period minus x.

eg. if x=6 and current period is 8 then it must show 8-6= 2 it must show data of 2nd date, how?plz answer for this

5 REPLIES 5
Read only

Former Member
0 Likes
654

Chitra,

explain clearly. Or else send ur code sample.

Read only

Former Member
0 Likes
654

hi,

try this code..

parameters : n type i. "n denotes the period.

data : d type sy-datum.

d = sy-datum.

d = d - n.

write : d.

Read only

Former Member
0 Likes
654

data : l type sy-datum,

parameters : period type i.

l = sy-datum. " 8 - 12 -2006

l = l - n. " if n = 3 then date is 5 - 1 -2006

write l.

regards

purshoth

Message was edited by:

Purshothaman P

Message was edited by:

Purshothaman P

Read only

Former Member
0 Likes
654

Hi Chitra

Try the below code

Parameters: per(3) type n.

Data: curr_per like sy-datum,

new_per like sy-datum.

curr_per = sy-datum.

new_per = curr_per - per.

write:/ new_per.

In new_per you are getting the difference based on that data you can write you code.

Regards

Haritha.

Read only

Former Member
0 Likes
654

Hello,

Just subtract the value entered in the selection screen from the date field.

data: lv_date like sy-datum.

lv_date = lv_date - ( <input on the screen field>).

Regs,

Venkat Ramanan N

Message was edited by:

Venkat Ramanan Natarajan