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

identifying blank fields

Former Member
0 Likes
705

i want to extract blank field form the database table :

DATA: BEGIN OF IT_YCSTK OCCURS 0 ,

MATNR LIKE YCSTK-MATNR,

WERKS LIKE YCSTK-WERKS,

CHARG LIKE MSEG-CHARG,

GKAHR LIKE YCSTK-GKAHR,

FLD2 LIKE YCSTK-FLD2,

END OF IT_YCSTK.

SELECT MATNR WERKS CHARG GKAHR

FROM YCSTK

INTO CORRESPONDING FIELDS OF TABLE IT_YCSTK

WHERE FLD2 = SPACE.

BUT SY-SUBRC IS 4...y???????

HERE FLD2 IS A DATE TYPE FIELD...

1 ACCEPTED SOLUTION
Read only

Sm1tje
Active Contributor
0 Likes
686

all data types have different initial (empty) values. For a date it will be 00000000

5 REPLIES 5
Read only

Sm1tje
Active Contributor
0 Likes
687

all data types have different initial (empty) values. For a date it will be 00000000

Read only

Sm1tje
Active Contributor
0 Likes
686

do a select like this:

where FLD2 is initial or where FLD2 = '00000000'.

Read only

Former Member
0 Likes
686

check with default value of date field.

it is 00000000

Read only

Former Member
0 Likes
686

By default date has value 00000000

so fld2 = '00000000'

~hitesh

Read only

Former Member
0 Likes
686

Hello

WHERE FLD2 IS INITIAL.