Sunday, June 10, 2007

How to print apostrophe in SAP ABAP

In one of the training sessions , the tutor posed a question..
Write a program to display apostrophe (') in ABAP program.

One of them answered , declare a text symbol of the form text-001 ,
and set its value to '.
Lateral thinking... It works.

There is a more direct way to do it too.

replce single quote with 2 single quote :-)

hers how we do it

data: LINE(20) type c.
CONCATENATE 'It''' 's Hot'.
write:/ LINE.

Hope u found this helpful.

1 comment: