Skip to Content
author's profile photo
Former Member

how to take blank spaces

hi experts,

I have a field with type menge .It can store around 13.3 decimal places .if the quantity is just 2.00 trhen the remaining things are replaced by spaces precedingly.so when i print the field

intsead of

2.00

it is printing

2.00

i need to remove the preceeding space .what shall i do?

regards ,

mani

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 09:29 AM

    Hi Mani,

    Use CONDENSE.

    Do F1 on this you will get how to use.

    Regards,

    Atish

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 09:30 AM

    Mani,

    a simple solution for this is..... before printing the field, transfer the field value to a variable of type string....and then print this variable value now...

    hope ur problem is solved

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 09:41 AM

    Is it a list or script?

    if list

    use

    write : / itab-menge left-justified.

    if it is a script

    &itab-menge(C)&

    if it is in alv.

    use fieldcat-just = 'L'. for that field

    But here it will only change the justification but not deleting the space(in case of list or alv). So if you find it is not solving your problem then you have to transfer that menge value to some character type variable.

    v_char = itab-menge.

    shift v_char left deleting leading space.

    or

    condense v_char no-gaps.

    now write that.

    regards

    shiba dutta

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 09:50 AM

    Hi,

    You can use the CONDENSE( field_name). So that you can remove the space. if you want to remove the preceeding Zero you can use the TRIM ( ).

    Thanks

    Yogesh

    Add comment
    10|10000 characters needed characters exceeded