cancel
Showing results for 
Search instead for 
Did you mean: 

urgent .. SMARTFORMS.

Former Member
0 Kudos

hi friends,

i have to display a field VBAP-KWMENG (order quantity) in samrt forms it has a value 1.000 but it is display ing as 1,000.

how can i avoid those zeroes after the 1 my req is to print 1.

KWMENG is a data element with packed decimal as (15,3).

i tried VBAP-KWMENG(Z), VBAP-KWMENG(T) , VBAP-(KWMENG(K),

but it is not supprssing those zeroes.

pls urgent........

thanks in advance.

VENUMADHAV

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try VBAP-KWMENG(.0)

Regards,

Nick

Answers (5)

Answers (5)

Former Member
0 Kudos

Try to Pass that value to an inteteger variable and print that integer variable.

Reward if it helps,

Satish

Former Member
0 Kudos

There are 2 areas that you can check:

1. User profile - check decimal notation whether is "1,234,567.89"

2. If user profile already set, try to issue SET COUNTRY ' ' in your smart forms in the initialization

after that, try to issue VBAP-KWMENG(.0) again.

rewards if help.

Former Member
0 Kudos

use CONVERSION_EXIT_* function module on that field before populating.

reward if it helps,

Satish

Former Member
0 Kudos

Hi Venu,

In order to display the value 1.000 as 1 assign the value to the variable VAR of CHAR18 datatype and use the following statement:

SHIFT VAR RIGHT DELETING LEADING ZEROS.

Reward points if it works...

Thanks,

RK

raymond_giuseppi
Active Contributor
0 Kudos

No "Edit code" will suppress these trailing zeroes (for alignment and precision reasons)

You should write to a char field and programaticaly suppress leading/trailing zero from the result field before printing it.

List of Formatting Options for Fields

<i><b>&field+<offset>&</b> Skips <offset> places of the field value (character fields only). If the

offset is greater than the length of the value, nothing is displayed.

<b>&field(<length>)&</b> Sets the output length to <length>.

<b>&field(*)& </b>If the field is defined by a Data Dictionary type, Smart Forms set the

output length to the value specified there.

<b>&field(S)& </b>Suppresses the sign

<b>&field(<)& </b>Displays the sign to the left of the number

<b>&field(.<nat.number>)& Limits output of decimal places to <nat.number></b>

<b>&field(E<nat.number>)& </b>Displays the field value with the fixed exponent <nat.number>. The mantissa is adapted to this exponent by shifting the decimal

character and inserting zeros.

<b>&field(T)& </b>Suppresses thousand indicators when displaying fields of types

DEC, CURR, INT, and QUAN.

<b>&field(Z)& </b>Suppresses leading zeros of numbers

<b>&field(I)& </b>Suppresses display of initial values

<b>&field(K)& </b>Deactivates a conversion routine specified in the Data Dictionary.

<b>&field(R)& </b>Right-justified display. Use this option only when specifying an

output length as well.

<b>&field(F<filler>)& </b>Replaces left-justified blanks in the value by the fill character <filler>.

<b>&field(L)& </b>Converts and a date field to a local date and displays it. The date is

then formatted using edit mask JPDAT.

Since this representation uses Japanese characters, use it in the

Japanese version of the SAP System only.

<b>&field(C)& </b>The system takes the field value as a sequence of words separated

by blanks. Option C shifts these words to the left and leaves only

one blank inbetween as separator. Any leading blanks are

suppressed. This effect corresponds to that of the ABAP statement

condense</i>

Regards