Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

empty field is not being read as "INITIAL"

I am debugging my code and for some reason, when a field is blank/empty/devoid of any characters what so ever

hexadecimal value is: 20002000200020002000200020002000 it is still not dropping into the code...

IF NOT it_actual[] IS INITIAL.
 LOOP AT it_actual INTO lw_actual.

 IF lw_actual-strdt IS INITIAL.                                  *this does not work on empty field! *

        READ TABLE it_actual INTO ls_actual INDEX 1.
        lw_actual-strdt = ls_actual-strdt.
        lw_actual-enddt = ls_actual-enddt.
        MODIFY it_actual FROM lw_actual TRANSPORTING strdt enddt.
      ENDIF.
  ENDLOOP.
ENDIF.

The first loop round is okayu2026 as the field is populatedu2026

But on the second loop, the field is empty, but it does not drop into the codeu2026. 

I am just trying to copy the header dates into the line item dates before I call the proxyu2026.

Any ideas? it is probably something obvious...

Former Member
replied

Hi,

Initial value depends on the data type, if it is a date field initial value should be '00000000' not empty.If it is coming empty from system you should check "if strdt = space" not initial. Check abap documentation for the initial key word.

Regards,

Edited by: Gungor Ozcelebi on May 7, 2010 4:04 PM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question