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

Sapscript: Do not interpret two commas in text as tab

Former Member
0 Likes
2,217

Since Sapscript interprets two commas in a row as a tab, this causes a problem for any form which prints out any text containing two commas. Does anyone know a way to get Sapscript to ignore these commas?

Since Sapscript interprets two commas in a row as a tab, this causes a problem for any form which prints out any text containing two commas. Does anyone know a way to get Sapscript to ignore these commas?

2 REPLIES 2
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,025

Hi,

One way could be, create a constant in the print program and use it in script.

eg: CONSTANTS: c_comma(2) TYPE c VALUE ',,'.

Inscript print this variable.

&c_comma&

Other way is use the character format.

eg: <AA>,,</AA>

First method is simple i feel.

Thanks,

Vinod.

Read only

venkat_o
Active Contributor
0 Likes
1,025

Hello friend, Welcome to SDN. The interpretation is different. Situation 1


/: Do,,not,,interpret,,two,,commas,,in,,text,,as,,tab

"the output will look like below text with tabs in between each word.
Do  not interpret two commas  in  text  as  tab
Situation 2.

"Define two variables in script editor like below and display.
/: DEFINE text1 = 'Do not interpret two,,commas in text as tab'
/: DEFINE text2 = ',,Text will be displayed like this'
/: &text1&,,&text2&
"The output will be like below
Do not interpret two,,commas in text as tab ,,Text will be displayed like this
"It does not care what is there inside program symbols &text1& and &text2&
I think that you will understand. Thanks Venkat.O