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

move char to qty field

The below code short dumps beucase 12,000.00 is recongnised as a number. So is there an easy way to get this value into the quantity field. I can think of replacing the comma, biut it doesnt seem that full proof, just wondered if there was an easier way?

DATA: ls_LTAP_CHK-VSOLM TYPE LTAP_VSOLM,

v_REQTY(12) TYPE C VALUE '12,000.00'.

ls_LTAP_CHK-VSOLM = v_REQTY.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2009 at 12:25 PM

    Hello

    Use FM 'MOVE_CHAR_TO_NUM'

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2009 at 12:24 PM

    Hi,

    As per my knowledge its not possible to move some value of type C to other type (P or I or D or T or N or...) is not possible directly.

    I think no way...

    We can move other types to type C but vice versa is not possible..

    Kiran...

    Edited by: kiran vempati on Aug 13, 2009 5:54 PM

    Edited by: kiran vempati on Aug 13, 2009 5:57 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 13, 2009 at 12:27 PM

    Hi,

    Use the FM MOVE_CHAR_TO_NUM.

    regards,

    Ankur Parab

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2009 at 12:31 PM

    Hi,

    try this

    data : qty type p decimals 2,

    ch(10) type c value '10'.

    move ch to qty.

    may be this will be helpful to u.

    or try the FM

    CALL FUNCTION 'CHECK_AND_CONVERT_NUMERICS'

    EXPORTING

    dmzei = ','

    dtype = 'CURR'

    efeld = input

    IMPORTING

    error = error

    ifeld = output

    messg = messg

    msgln = msgln

    regards,

    Archana

    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.