‎2007 Apr 04 2:23 PM
dear experts,
i need to check wheather date variable contains value or not.
could any one pls tell how to check
thanks and regards
karthik
‎2007 Apr 04 2:42 PM
chk this
REPORT ztest.
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
maktx LIKE makt-maktx,
END OF itab.
LOOP AT itab WHERE matnr IS INITIAL AND
NOT maktx IS INITIAL.
ENDLOOP.
‎2007 Apr 04 2:24 PM
‎2007 Apr 04 2:25 PM
Hi ,
In that case use INITIAL command.
I would look like this
IF NOT <Variable> IS INITIAL.
Varaible has a value
ENDIF.
Regards
Arun
‎2007 Apr 04 2:34 PM
hi arun,
LOOP AT object_tab1 WHERE aufnr NE space AND addat NE INITIAL.
i am using the above statement but i am getting the error.
pls help me solve.
regards
karthik
‎2007 Apr 05 4:53 AM
> hi arun,
>
> LOOP AT object_tab1 WHERE aufnr NE space AND addat
> NE INITIAL.
>
> i am using the above statement but i am getting the
> error.
>
> pls help me solve.
> regards
> karthik
your code should be:
LOOP AT object_tab1 WHERE aufnr NE space AND NOT addat IS INITIAL.
‎2007 Apr 04 2:36 PM
Hi..,
Not onli for a date value...
for any variable to check whether it contains any value or not .... we use the
IF NOT W_DATE IS INITIAL. (**** Checking for w_date contains value)
-
if w_date contains a value then it comes into this block---
ENDIF.
Plz do remember to close the thread , when your problem is solved, reward all helpful answers!!!
regards,
sai ramesh
‎2007 Apr 04 2:38 PM
hi,
we can check the date field by using IS INITIAL.
I think following code will help you.
data:
w_d type d value '20001212',
w_d1 type d.
if w_d is not initial.
write:'w_d'.
elseif w_d1 is not initial.
write:'w_d1'.
endif.
‎2007 Apr 04 2:40 PM
Hi,
Try this.
DATA: l_data LIKE sy-datum.
IF NOT l_date IS INITIAL.
*" write you logic here
ENDIF.Regards,
RS
‎2007 Apr 04 2:42 PM
chk this
REPORT ztest.
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
maktx LIKE makt-maktx,
END OF itab.
LOOP AT itab WHERE matnr IS INITIAL AND
NOT maktx IS INITIAL.
ENDLOOP.
‎2007 Apr 05 4:38 AM
‎2007 Apr 05 7:11 AM
hi,
you have check as
If not <date variable> is initial or <date variable> <> '00000000'
*Date Variable has a vlaue
endif.
Pls reward if it is helpful
regards,
Sangeetha.A
‎2007 Apr 05 7:12 AM
hi,
you have check as
If not <date variable> is initial or <date variable> <> '00000000'
*Date Variable has a vlaue
endif.
Pls reward if it is helpful
regards,
Sangeetha.A
‎2007 Apr 05 7:26 AM
hi
try this
move <date variable> to <variable of type sy-datum>
if sy-subrc ne 0
....
hope it will work
regard
ravish
plz reward if helpful
‎2007 Apr 05 7:27 AM
hi
try this
move <date variable> to <variable of type sy-datum>
if sy-subrc ne 0
....
hope it will work
regard
ravish
plz reward if helpful