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

Hi Friends

Hi

I have a field w_poids coming from a file which is of type c. The value in this will be of '0.001'. but I have to change this value to '0,001' and move the value to w_bewrg which is of type "mara-bewrg". How to do this.

Ramesh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08:29 AM

    REPLACE '.' WITH ','

    INTO field.

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08:30 AM
    REPLACE '.' WITH ',' INTO  w_bewrg
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08:38 AM

    here field means character field w_posid.

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08:56 AM

    Hi Ramesh,

    data : w_poids(13),

    len type i,

    s1(1) value '.'.

    len = strlen( s1 ).

    w_poids = '0.001'.

    write : / w_poids.

    replace s1 length len with ',' into w_poids.

    write : / w_poids.

    now w_poids contains ' 0,001'.

    Then move w_poids to u r w_bewrg.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2007 at 09:15 AM

    Hi,

    data : w_poids(6) type c value '0.001',

    w_bewrg type mara-bewrg.

    replace '.' with ',' into w_poids.

    w_bewrg = w_poids.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2007 at 09:17 AM

    hi,

    data : fv_poids(6) type c value '0.001',

    fv_bewrg type mara-bewrg.

    replace '.' with ',' into fv_bewrg.

    Regards

    Anver

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2007 at 09:24 AM

    Hi,

    You can do as below:

    DATA: v_bewrg LIKE mara-bewrg.
    DATA: w_poids(20) TYPE c.
    
    SEARCH w_poids FOR '.'  .
    
    IF sy-subrc = 0.
     REPLACE '.' WITH ',' INTO w_poids.
     v_bewrg = w_poids.
    ENDIF.

    Hope this solves ur problem.

    Pelase reward points and close the thread.

    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.