2007 Jan 06 6:09 PM
Hi All,
Im using a FM CLAF_CLASSIFICATION_OF_OBJECT to get the material classfication view values.
The internal table it_out is filled by the FM . now i have to calculate PC per carton, so i have to perform a division.
Now it_out-ausp1 has got the number, But not all the time, Im also getting values like ?, ' ', 220F, 55F and so on . Now if i do a division operation , its throwing me a short dump Unable to interpret ? as a number.
loop at it_out.
if it_out-smbez = 'FIBROUS STICK LENGTH'.
move it_out-ausp1 to ausp11.
endif.
if it_out-smbez = 'CARTON QUANTITY'.
move it_out-ausp1 to ausp12.
endif.
<b>it_final-pcpercar = ausp12 / ausp11.</b>
endloop.
Kindly letme know some possible solution to overcome this.
Thanks
S
2007 Jan 06 7:48 PM
Hi,
use
CATCH SYSTEM-EXCEPTION OTHERS = 7.
it_final-pcpercar = ausp12 / ausp11.
ENDCATCH.
IF sy-subrc <> 0.
clear it_final-pcpercar.
ENDIFRegards,
Clemens
Hi All,
Im using a FM CLAF_CLASSIFICATION_OF_OBJECT to get the material classfication view values.
The internal table it_out is filled by the FM . now i have to calculate PC per carton, so i have to perform a division.
Now it_out-ausp1 has got the number, But not all the time, Im also getting values like ?, ' ', 220F, 55F and so on . Now if i do a division operation , its throwing me a short dump Unable to interpret ? as a number.
loop at it_out.
if it_out-smbez = 'FIBROUS STICK LENGTH'.
move it_out-ausp1 to ausp11.
endif.
if it_out-smbez = 'CARTON QUANTITY'.
move it_out-ausp1 to ausp12.
endif.
<b>it_final-pcpercar = ausp12 / ausp11.</b>
endloop.
Kindly letme know some possible solution to overcome this.
Thanks
S
2007 Jan 06 7:48 PM
Hi,
use
CATCH SYSTEM-EXCEPTION OTHERS = 7.
it_final-pcpercar = ausp12 / ausp11.
ENDCATCH.
IF sy-subrc <> 0.
clear it_final-pcpercar.
ENDIFRegards,
Clemens
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |