F Compare two string in SAP ABAP | CodeTheta

Compare two string in SAP ABAP

September 03, 2019

Code :
REPORT ZVP_PRACTICE.

DATAVAR1(50TYPE C,
      VAR2(50TYPE C.

VAR1 'HELLO WORLD!'.
VAR2 'HELLO WORLD!'.

IF VAR1 VAR2.
  WRITE:/'EQUAL'.
ELSE.
  WRITE:/'NOT EQUAL'.
ENDIF.

Output :
EQUAL

IDE Used To Test This Code : SAP Login 730.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Post a Comment