cancel
Showing results for 
Search instead for 
Did you mean: 

Space between two variables deleted when activated

Former Member
0 Kudos

Hi,

I am working on smartforms and i need to display multiple fields in one text box. If I write it like this: &var1& &var2&

when I activate it, it becomes: &var1&&var2&

The space between the variables is being deleted.

I already tried to change the editor to place the space and also did the suggestion to use &VAR1& &SPACE& &VAR2&, but it is still not working.

There was also a suggestion to use tabs, but if i will be doing address there will be spaces in between if for example one field is blank or if the length per variable varies.

There was also a suggestion to concatenate the fields to a new variable using program lines and display this variable. But if I am working on the page (ex. Page 1 of 2), it does not recognize the following code:

concatenate 'Page' SFSY-PAGE 'of' SFSY-FORMPAGES into v_string separated by space.

It says that the field "SFSY" is unknown. But i alredy added the fields in the input and output parameter.

Can anyone please give me suggestions on how to go about this or which approach will be better.

Thanks a lot.

null

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Try like this it will solve your problem.

Page &SFSY-PAGE& of &SFSY-FORMPAGES(3ZC)&

Try to drag and drop

SAPScript

Page&PAGE& of &FORMPAGES(ZC)&

Regards,

SaiRam

Former Member
0 Kudos

Hi Sai,

Thanks for the suggestion but it is still not working.

Outpt is: Page1 of2

Former Member
0 Kudos

rou

make sure the two variables are not under the grey high lighting

that is hard coded text is not highlighed

Answers (4)

Answers (4)

Former Member
0 Kudos

I was using the option MS Word as editor in Smartforms. We should change this to use the original editor. Go to transaction I18N then go to I18N Customizing, then click on MS Word as editor. Untick the checkbox for Smartform then activate. Do the coding again or just activate the smartform, and no more space error will be encountered.

Former Member
0 Kudos

pUT &VAR1&,,&VAR2& IN THE EDITOR. iT WILL SOLVE YOUR PROBLEM. OR MAKE A TEMPLATE WITH TWO COLUMNS, THE ADVANTAGE YOU WILL HAVE IS THAT YOU CAN FORMAT THEM INDIVIDUALLY.

REGARDS,

mALLICK

Former Member
0 Kudos

Hi,

I think you should check OSS notes since I also face the same problem and it is fixed after I escalate the issue to higher level. I think it relate to basis or something like that. It is not your code that wrong, it is the SAP's bug so no need to put a lot of effort on checking the error.

Former Member
0 Kudos

Hi,

I also had faced the same problem.

The better way is to create a template and display them

keeping them right and left or centered aligned

Regards

Shiva