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

how to check date type is initial

there is SQL sentence.

---

DATA: BEGIN OF it OCCURS 0,

matnr LIKE mara-matnr,

laeda LIKE mara-laeda,

END OF it.

select matnr laeda

from mara

where laeda <> space.

---

How can I check the laead field is initial.

Regards.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Oct 21, 2008 at 12:55 PM

    I checked and IS NULL does not work either....

    laeda is a date field, so the only correct solution is:

    ... laeda EQ '00000000'.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2008 at 12:39 PM

    select matnr laeda

    from mara

    where laeda IS INITIAL.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2008 at 12:40 PM

    if it-laeda is initial.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2008 at 12:44 PM

    Hi Cao,

    Check the code which i have modified which you have post

    DATA: BEGIN OF it OCCURS 0,

    matnr LIKE mara-matnr,

    laeda LIKE mara-laeda,

    END OF it.

    select matnr laeda

    from mara into it

    where laeda = ''.

    endselect.

    Cheers!!

    Balu

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2008 at 12:45 PM

    select matnr laeda

    from mara

    where laeda IS NULL

    (IS INITIAL is definetly wrong)

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2008 at 12:45 PM

    Hi,

    Try this syntax

    SELECT... WHERE s IS [NOT] NULL...

    SELECT matnr laeda FROM mara INTOTABLE it_itab WHERE

    laeda IS [NOT] NULL.

    Regards

    Bala Krishna

    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.