cancel
Showing results for 
Search instead for 
Did you mean: 

remove extra space value of the field in text element

Former Member
0 Kudos

Dear All,

Can any one please help me out to remove the blank spaces in the text elements of SF.

we are printing Label in which i want print quantity of material. and i am using MSEG-MENGE for quantity of maetrial.

But the issues is when we are printing the label. We are getting spaces in the Text elements fields &MSEG-MENGE&.

i am also check menge field within mseg table. in which menge field define as QUAN data type with length 13.

<

MAT CODE:&t_MSEG-MATNR&

DESC:&MAKTX&

QTY:&t_MSEG-MENGE&

UOM:&t_MSEG-MEINS&

>

My Output in SF:

MAT CODE:11000002

DESC:Coarse Aggregate 10mm Sieve

QTY: 960

UOM:LBM

MIGO.NO.:4900000025

how to remove extra blank spaces in the text elements ( QTY: 960 )

guide me.........

Accepted Solutions (0)

Answers (1)

Answers (1)

prakashjasti
Contributor
0 Kudos

:&t_MSEG-MENGE(CZ)&

Use this if u want zero qty also to be printed

:&t_MSEG-MENGE(C)&

Regards,

Prakash

Former Member
0 Kudos

Dear All,

NO change in printout , still my problem, extra space comming in quantity field.

guide me.........

Former Member
0 Kudos

hi,

Move MENGE to a temp variable of type char.

then use condense.

And finally print this variable.

Former Member
0 Kudos

Hi,

i did used QTY varible and QTY variable define in Global Defination as type C.

and under program Line add two line...

<

read table t_mseg index w_index.

qty = t_mseg-menge.

condense qty.

SELECT SINGLE name1 FROM t001w INTO name1 WHERE werks = t_mseg-werks.

SELECT SINGLE maktx FROM makt INTO maktx WHERE matnr = t_mseg-matnr.

>

and then i did pass QTY varible in Output parameter and text element

now also no change, again same problem comming in printout "extra space value of the field in text element"

guide me................

Former Member
0 Kudos

hi ,

you added the code block in the smartform itself?? Just befor ethe text element?

COuld you please paste how is your output looking?

and what are you typing inside the text element.

Edited by: sap_wiz on May 25, 2011 4:31 PM

Former Member
0 Kudos

Dear All,

I am using code block in SF before text element.

In The Text Element ...

<

MAT CODE:&t_MSEG-MATNR&

DESC:&MAKTX&

QTY:&t_MSEG-MENGE&

UOM:&t_MSEG-MEINS&

MIGO.NO.:&t_MSEG-MBLNR&

PO.NO.:&t_MSEG-EBELN&

LOCATION:&t_MSEG-WERK&&NAME1&

>

In programe Line ( code block )....

<

read table t_mseg index w_index.

qty = t_mseg-menge.

condense qty.

SELECT SINGLE name1 FROM t001w INTO name1 WHERE werks = t_mseg-werks.

SELECT SINGLE maktx FROM makt INTO maktx WHERE matnr = t_mseg-matnr.

>

My Output:

MAT CODE:11000002

DESC:Coarse Aggregate 10mm Sieve

QTY: 960

UOM:LBM

MIGO.NO.:4900000025

Only problem in value of Quantity field .

guide me.........

Former Member
0 Kudos

Hi,

If you are condensing the value in field QTY.

why are you passing QTY:&t_MSEG-MENGE&

in text element ?:)

You need to pass QTY in text element !

Former Member
0 Kudos

Hi,

this my typing mistak ....

in the text element............

<

MAT CODE:&t_MSEG-MATNR&

DESC:&MAKTX&

QTY:&tqty&

UOM:&t_MSEG-MEINS&

MIGO.NO.:&t_MSEG-MBLNR&

PO.NO.:&t_MSEG-EBELN&

LOCATION:&t_MSEG-WERKS&&NAME1&

<

guide me...............

Former Member
0 Kudos

try concatenating QTY & UOM:&t_MSEG-MEINS&

in a single variable, and print. see if you get extra space there as well?