Skip to Content
author's profile photo Former Member
Former Member

Data

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 01:26 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2006 at 01:34 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2006 at 01:42 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 02:22 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.