Decimals for QUAN Type field in ALV Display

    Hello,

    I am learning to use the OOP ALV and I am having trouble with changing the decimals for a QUAN type field. 

    Essentially what i need is as follows:

    Unfortunately, I am not allowed to change the

    If the value is a whole number, I want to display with out any decimals.  Ex: 101 and not 101.000  

    If the value is not a whole number/has a decimal, I want it to display with the decimals. Ex. 101.662 or 101.660

    At first I thought I could loop through my itab and use what “WRITE itab-field1 to itab-field1 NO ZEROS”; but that didn’t work.

    Any suggestions would be great. 

    Thanks,

    Aashish

    Hello,I am learning to use the OOP ALV and I am having trouble with changing the decimals for a QUAN type field.  Essentially what i need is as follows:Unfortunately, I am not allowed to change the If the value is a whole number, I want to display with out any decimals.  Ex: 101 and not 101.000   If the value is not a whole number/has a decimal, I want it to display with the decimals. Ex. 101.662 or 101.660At first I thought I could loop through my itab and use what "WRITE itab-field1 to itab-field1 NO ZEROS"; but that didn't work.Any…

    Decimals for QUAN Type field in ALV Display

    Very Helpfull

    User Rating: Be the first one !
    Add Comment
    1 Answer(s)

      (FAQ) Read also some documentation at http://help.sap.com like Value Display with Currency/Quantity Unit.

       

      Regards,

      Raymond

      Add Comment

        (FAQ) Read also some documentation at http://help.sap.com like Value Display with Currency/Quantity Unit.

         

        Regards,

        Raymond

        Add Comment

        Your Answer

        By posting your answer, you agree to the privacy policy and terms of service.