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

Move assignment

Hi,

For expaining the scenario i am copying below the custom code , but the problem is happening in a standard code

REPORT yztest.

DATA: source(10) TYPE p DECIMALS 4 VALUE 100,

destin(256) TYPE c.

MOVE source TO destin .

WRITE / destin.

The output of this code is coming as blank when its suppose to display '100.0000' , not sure whats happening. Surprisingly if i change the length of destin to 10 from 256 its displaying correct value. data: destin(10) TYPE c.

Did anyone come accross such a scenario before? The problem is its a standard code and i can only change the datatype of source through config but not the destin and also source will contain numebrs with decimals

Many Thanks,

Kasi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Oct 01, 2009 at 11:39 AM

    Hi,

    Instead of MOVE use WRITE statement.....

    REPORT yztest.
    DATA: source(10) TYPE p DECIMALS 4 VALUE 100,
    destin(256) TYPE c.
    
    *MOVE source TO destin .      
    WRITE source TO destin LEFT-JUSTIFIED.
    WRITE / destin.

    Regards,

    Shankar.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 01, 2009 at 02:53 PM

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 01, 2009 at 04:26 PM

    Hi Kasi,

    although alread closed:

    Don't worry, source has been moved to destin. If you use a WRITE TO, then it will put it as a numeric value by default right-justified into the output field, so you can see it if you look at destin+240.

    Your example is just no use.

    Regards,

    Clemens

    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.