Skip to Content
author's profile photo Former Member
Former Member

convert

TYPES: BEGIN OF t_alter,

matnr LIKE mara-matnr, "Material number

MTART LIKE mara-MTART, "Plant

END OF t_alter.

data : v_int type i.

data :i_alter TYPE STANDARD TABLE OF t_alter,

wa_alter type t_alter.

select matnr MTART from mara into table i_alter.

loop at i_alter into wa_alter.

v_int = v_int + 1.

write :/ v_int , wa_alter-matnr.

endloop.

in this program v_int value is 1,000 1,001 is coming

in this i want display v_int valiue 1000 not display ',' .how to convert ','

pls send the code.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 10:29 PM

    Kumar,

    Convert it to char.

    Data: v_char(10) type c.
    TYPES: BEGIN OF t_alter,
    matnr LIKE mara-matnr, "Material number
    MTART LIKE mara-MTART, "Plant
    END OF t_alter.
    data : v_int type i.
    data :i_alter TYPE STANDARD TABLE OF t_alter,
    wa_alter type t_alter.
    select matnr MTART from mara into table i_alter.
    loop at i_alter into wa_alter.
    v_int = v_int + 1.
    Move v_int to v_char.
    write :/ v_char , wa_alter-matnr.
    endloop.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2007 at 12:59 PM

    declare it as type c to your required length

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2007 at 01:01 PM

    Hi,

    Declare v_int as type p with decimals 0.

    Data : V_int typ p decimals 0.

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 01:08 PM

    hi kuamr kk ,

    one way to do this is to change envoirment variables.

    System->User Profile->Own data

    Click on Defaults TAB change Decimal Notations.

    Regards,

    Sachin

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Kumar,

      If you want to see the value as 1000 instead of 1,000. I strongly believe you need to move it to char variable, If you change your user settings, it looks okay to you , but when the user with diff. settings is accessing this program might get different look.

      So I prefer move it to Char.

      Thanks,

      Pavan

  • Posted on Dec 05, 2007 at 03:21 AM

    Use Replace all occurenses ',' with space. This will work.

    check out help on replace .... you will see.. No need to convert into different field but make sure your field should be a char field or just check out the help.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.