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

Doubt regarding IS INITIAL and IS NOT INITIAL comparison operators.

0 Likes
7,664

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

a help would be appreciated 🙂

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

a help would be appreciated 🙂

2 REPLIES 2
Read only

former_member9115
Participant
7,601

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.
Read only

Sandra_Rossi
Active Contributor
0 Likes
7,601

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...