‎2009 Oct 01 12:36 PM
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
‎2009 Oct 01 12:39 PM
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.
‎2009 Oct 01 12:39 PM
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.
‎2009 Oct 01 12:48 PM
DATA: source(10) TYPE p DECIMALS 4 VALUE 100,
destin(256) TYPE c.
*MOVE source TO destin .
destin+0(10) = source.
WRITE / destin.
‎2009 Oct 01 1:48 PM
Thanks for your replies guys, but i dont have the option to modify the code becuase this logic is done in standard. I can only decide the data type of source field through config
Thanks,
Kasi
‎2009 Oct 01 3:30 PM
define the source field as string. or some char type field (any left justified data element)
Edited by: Soumyaprakash Mishra on Oct 1, 2009 8:00 PM
‎2009 Oct 01 3:53 PM
‎2009 Oct 01 5: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