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: 

Data

Former Member
0 Kudos

In which case we declare the date field by type Sy-datum or scal-date or type d.

5 REPLIES 5

Former Member
0 Kudos

Hi Johnn,

sy-datum current application server data ex 19981130

if you want to add a day

data : x like sy-datum.

x = sy-datum + 1.

Then x will have tommorow's date.

Thanks

Venki

roberto_tagliento
Active Contributor
0 Kudos

You cannot declare field by TYPE Sy-datum.

But LIKE, because sy-datum isn't a type but a VARIABLE.

It is the system variable (in this case the date!).

"Sy" is the SYSTEM table of variable.

andreas_mann3
Active Contributor
0 Kudos

Hi John,

think, ther's no difference btw. scal-date and sy-datum

but what's about field TCURR-GDATU?

-> this is a field for invert date

(fm CONVERSION_EXIT_INVDT_OUTPUT)

A.

Former Member
0 Kudos

Hi,

difference is in output length and display format

1) data lv_date like sy-datum has output length

10 including separators like / or which

are user specific.

data lv_date like sy-datum

lv_date = sy-datum.

write lv_date.

output is 10/25/2006.

2) data lv_date type d has output length 8

data lv_date typew d

lv_date = sy-datum.

write lv_date.

output is 10252006 without separators.

Regards,

amole