Skip to Content

Remove decimal zeros from ‘delivery quantity’

I have a quantity field of datatype LIPS-LFIMG in module pool screen. While displaying the value in this field i do not want the decimals to appear.

In the screen the value gets displayed as 2,000

But i want it to be displayed as 2.

I do not want to change the datatype of the field.

The same functionality works in the standard transaction VA03, where the quantity field displays values without decimals.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Dec 08, 2016 at 03:49 PM

    The number of decimals are usually defined in customizing of unit of measures (transaction CUNI)

    Never forget that SAP internally uses always 3 decimals, even you customize it to display zero decimals it is still possible to enter a quantity with 3 decimals, so hiding decimals should really only be done for units where it is illogical to have decimals, e.g. a wheel , a car

    Add comment
    10|10000 characters needed characters exceeded

    • yes, my ST unit has 0 in field T006-DECAN, as you see in the first 3 old items it does not show decimals, now I added the 4th item and was able to enter decimals (Germans use comma as decimal separator). This can be restricted in the material master by using the delivery unit 1, but in standard you can use decimals even for a unit which is defined to have zero decimals

      dezi.png (5.2 kB)
  • Dec 09, 2016 at 09:11 AM

    Read some documentation or your Abap course: look for Quantity Fields, Handling in Dynpros

    (So here: did you define LIPS with a TABLES statements in global area of program, did you check the ddic box on the field in dynpro definition, Look at SE11 for LIPS, identify the quantity field, here it is a field of LIPS so you don't need an other table in your TABLES statement as would have be the case if, for example, unit came from MARA)


    Add comment
    10|10000 characters needed characters exceeded

  • Dec 08, 2016 at 09:51 PM

    To complement Jürgen : in the dynpro, you have not maintained the link between the quantity field and the unit field. They must both be on the screen (eventually hidden).


    In SE11, you'll see which unit field is assigned to LIPS-LFIMG (tab "Currency/Quantity Fields"). It's LIPS-VRKME. Then, add LIPS-VRKME into your dynpro, make sure the dynpro field has the DDIC flag ticked. At run time, you'll see that the number of decimals will vary based on the value in LIPS-VRKME. The number of decimals is defined for the unit in T006-DECAN (0 means that an integer value will be displayed without decimals).

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 08, 2016 at 05:53 PM

    VA03 is using the field type KWMENG in the ALV, I suspect that they have a specific conversion exit. You can always try to figure out the conversion exit being used in VA03 - the field there is not LIPS-LFIMG, which is only for the delivery not the sales order - and try to use the same conversion exit in your program - or write your own.

    Add comment
    10|10000 characters needed characters exceeded

    • OK, I see, thanks for clarification. Good point in general but I'm afraid OP quite limited their options by insisting on reference to LIPS-LFIMG and not willing to change it (for undisclosed reason).

      Btw, Coffee Corner is totally for all kind of tips on SCN.