07-10-2007 6:32 AM
Hallow
I use this metod but I have a problem that in some fields that is empty with type hexdecimal I get number like 202.02 in P(3) DECIMALS 2,and in P(4) DECIMALS 2 I get 20202.02
How can be the problem?
it happen just in decimal fields.
Regards
FIELD-SYMBOLS: <fs_any> TYPE ANY,
<fs_pnnn> TYPE table.
FIELD-SYMBOLS: <ls_pnnnn> TYPE ANY.
DATA:ldo_data TYPE REF TO data,
ld_tabname TYPE tabname.
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = ls_prelp
IMPORTING
pnnnn = <ls_pnnnn>.
CASE ls_prelp-infty.
WHEN '0000'.
APPEND <ls_pnnnn> TO lt_p0000. " Line type PA0000
WHEN '0001'.
APPEND <ls_pnnnn> TO lt_p0001. " Line type PA0001
WHEN '0002'.
APPEND <ls_pnnnn> TO lt_p0002. " Line type PA0002
endcase
07-10-2007 3:08 PM
07-10-2007 6:42 AM
can you please upload code in detail, where the error/problem occured??
Entire code will help us to understand the problem.
thanks
Chetan Shah
07-10-2007 7:45 AM
hi chetan shah
the problem is in <ls_pnnnn> i get the datafrom metod with 202.02 in all the fields
taht type decimal and empty,fields that in numc or char dont have problem its empty.
maybe is becouse of the field symbol (type any) i dont now.
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = ls_prelp
IMPORTING
pnnnn = <b><ls_pnnnn>.</b>
regards
07-10-2007 8:20 AM
07-10-2007 3:08 PM