Application Development 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: 

Doubt regarding IS INITIAL and IS NOT INITIAL comparison operators.

0 Kudos
1,134

can someone explain me about IS INITIAL and IS NOT INITIAL comparison operators.

a help would be appreciated 🙂

2 REPLIES 2

former_member9115
Participant
1,071

Hi,

  • IS INITIAL Means NO Records.
  • IS NOT INITIAL Means 1 or more than one records.

Example:

SELECT TKNUM
INTO TABLE @DATA(LT_VTTK)
FROM VTTK WHERE TDLNR IN S_TDLNR .



IF LT_VTTK IS NOT INITIAL. "If record/s found from above table then
WRITE : 'Shipment Number Found'.
ELSE. "If Not Found
WRITE : 'No Data Found'.
ENDIF.
*******************OR*******************
IF LT_VTTK IS INITIAL. "If NO record/s found from above table then
WRITE : 'No Data Found'.
ELSE. "If any record/s Found
WRITE : 'Shipment Number Found'.
ENDIF.

Sandra_Rossi
Active Contributor
0 Kudos
1,071

IS INITIAL : is equal to its "initial value" (depends on type)

IS NOT INITIAL : is not equal to its "initial value" (depends on type)

Help of "initial value": https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abeninitial_value_glo...