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

Quantity field.

Hi experts.

I have Character field in my program.

ex x(13).

This is acutally contains amount.

Now I need to update data base table using this field.

But data base table is WRBTR type.

It results me dump.

I tried using type N.but decimals are trunctaed.

I tired with type P results in dump.

I need to have extact values in Db table.

so that.I can sumup afterwards.

I cannot chnage the Char field in program.Becuase the field I am getting from interface file.

Kindly give me some solutions

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Mar 14, 2008 at 01:27 PM

    HI,

    Data:temp like bseg-wrbtr.

    temp = x.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 14, 2008 at 01:29 PM

    You have to first define a new field that matches your table field's data element.

    data: l_amount like table_name-WRBTR.

    l_amount = x. "ABAP engine automatically converts the data

    Now, update the database table with l_amount.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 14, 2008 at 01:29 PM

    Please look that char field v_x does not contain any ','(comas)

    Look at below code .. this works fine for me ... (no dump)

    data : v_data type WRBTR.

    data : v_x(13) value '12345.67'.

    move v_x to v_data.

    write :/ v_data.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2011 at 08:07 AM

    Self answered

    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.