Skip to Content
0
Former Member
Jul 09, 2007 at 05:48 PM

problem in metod decimal fields

35 Views

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