Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

problem in metod

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi antonio

check your castumisig ?

regards

4 REPLIES 4

Former Member
0 Kudos

can you please upload code in detail, where the error/problem occured??

Entire code will help us to understand the problem.

thanks

Chetan Shah

0 Kudos

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

Former Member
0 Kudos

hi all

maybe some one can give me idea?

regards

Former Member
0 Kudos

hi antonio

check your castumisig ?

regards