Monday, 7 October 2013

What will be the output of the following below code?

DATA: text TYPE string VALUE 'TEST-*-SAP*-NEW*'.
IF text IS NOT INITIAL AND text CS '*'.
  REPLACE ALL OCCURRENCES OF '*' IN text WITH '^' .
  WRITE : / text.
ENDIF.
A. TEST-*-SAP*-NEW*
B. TEST-^-SAP^-NEW^
C. TEST-^-SAP^-NEW
D. Syntax Error

Ans: B

No comments: