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

sap Script

Former Member
0 Likes
806

Hi

In my sap script textelement they declare the the quantity filed like &,,&komvd-kbetr(T10.2)&/M ,, this statement printed like 89.89 /M. but it should display like 89.89/M. How can i remove the space? Pls help me out

9 REPLIES 9
Read only

Former Member
0 Likes
780

for removing gap use condense (C)

&symbol(C)&

reward if helpful

raam

Read only

Former Member
0 Likes
780

Hi,

Hope this helps.....

&SYMBOL& No formatting

&SYMBOL+4& Offset - Output begins here. Offset refers to formatted value

&SYMBOL(5)& Length - Output data in the specified length

&SYMBOL(I)& Suppress initial value - If the field has been initialized, nothing is output

&SYMBOL(Z)& Suppress leading zeros

&SYMBOL(C)& Compress blank spaces - Consecutice spaces are compressed into a single space. Leading spacesare suppressed.

&SYMBOL(R)& Right align output

&SYMBOL(S)& Operators are suppressed

&SYMBOL(*)& Dictionary length - The data length is defined by the ABAP dictionary

&SYMBOL(8.2)& Decimal format. Length 8 decimals 2

&'text1'SYMBOL'text2'& Text can be inserted before and after the symbol

Regards,

V.Balaji

Reward if Usefull...

Read only

Former Member
0 Likes
780

hi,

to remove the blank spaces use

&symbol+offset&

for example

&symbol& 123456789

&symbol+3& 456789

&symbol+7& 89 .

Each symbol has a name that is used when the symbol is called. A call to a symbol is normally made in a line of text that also includes other kinds of text. Therefore it is necessary that symbols can be distinguished from normal text, and that the call is structured in such a way that it is possible to identify it as a call to a symbol.

Use the delimiter & both immediately before and after the symbol.

Do not use blank characters in the name of a symbol. Moreover, since the characters '+() are used for defining formatting options, you must not use any of these a symbol name either.

Make sure that no SAPscript editor line break occurs between the symbol delimiters. If necessary, use a long line to avoid this (paragraph format = or /=).

Enclose additional formatting options in round brackets and insert them immediately after the symbol name. The code letters identifying these options must be given in capitals.

for example,

&symbol&

&MY_symbol&

&KNA1-NAME1&

&DATE&

&KNA1-UMSAT(I)&

these are valid symbol.

reward points ifuseful.

regards

sandhya

Read only

0 Likes
780

Hi Sandhya

Using this symbol how can i remove space in the above code. Can u pls explain me

Regards

Kumar

Read only

Former Member
0 Likes
780

I tried all the ways. Still it is not working. Anyone help me

Read only

0 Likes
780

Hi,

Try this ..

Delete the blank spaces in your document using ' compress ' command

mark the text where you want to remove the blank space.

choose edit ->selected area -> compress

Read only

0 Likes
780

Hi Megha

i can't see anu compress option

Read only

Former Member
0 Likes
780

Hi Kumar,

in ur driver program take another CHAR variable & move komvd-kbetr to that.

And pass that in ur script.

If i is usefull do reward.

Regards

Srimanta

Read only

Former Member
0 Likes
780

if you want to give space between two fields write like this

&wa_matnr( i )& &wa_matkl( i )&

if you want to sepress the row entry in script if that value is not there, then you can write like this

if &wa_matnr& ne ' '

&wa_matnr&

endif