2008 Jul 25 2:42 PM
Hi,
I am trying to assign a value with data type 'P' decimal 5 to a character type variable. But the character type variable is not taking the value.
I tried using MOVE and WRITE, but no success.
Please help. Its urgent.
regards,
Gaurav.
Hi,
I am trying to assign a value with data type 'P' decimal 5 to a character type variable. But the character type variable is not taking the value.
I tried using MOVE and WRITE, but no success.
Please help. Its urgent.
regards,
Gaurav.
2008 Jul 25 2:45 PM
Try with,
C14DG_LB04
C14DG_CHAR_NUMBER_CONVERSION
C14W
C14W_CHAR_NUMBER_CONVERSION
Amit.
2008 Jul 25 2:47 PM
Hi Gaurav,
U better use the field symbol for converting the data .
regards
Naresh
2008 Jul 25 2:49 PM
Hi
It's strange, all these samples work fine:
PARAMETERS: P1 TYPE P DECIMALS 5.
DATA N(20) TYPE C.
START-OF-SELECTION.
MOVE P1 TO N.
WRITE: 'MOVE:', N.
WRITE P1 TO N.
WRITE: / 'WRITE', N.
UNPACK P1 TO N.
WRITE: / 'UNPACK', N.Max
2008 Jul 25 2:50 PM
Hi Gaurav,
I tried a small program and found no problem in moving the data. Just check the length of char field..or try this program
DATA: pack TYPE p DECIMALS 5,
char(10) TYPE c.
pack = '5.00345'.
MOVE pack TO char.
WRITE char.
//Kothand
2008 Jul 25 2:51 PM
Hi,
what is the issue. Make sure that ur char variable is having sufficient length.
Check this code.
DATA: charec(20) TYPE c ,
typep TYPE p DECIMALS 5 VALUE '12345.02545'.
charec = typep.
CONDENSE charec.
WRITE: /1 charec,
/1 typep.
Thanks,
Vinod.
2008 Aug 18 5:54 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |