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: 

How to pass a variable with lv_price(16) type p decimal 2 into ekko-netpr ?

dineshs
Explorer
0 Kudos

Hi Team,

I have a dump in Function module(Custom) which is used in Workflow, where the variable with

Data: lv_price(16) type p decimal 2

is passed to wa_ekko-netpr = lv_price.

And Dump occur stating "A calculation field defined is too small."

I have checked SDN completely but unable to get the answer.

the value in "lv_price" has more than 10 digit.

I tried using converstion_exit_alpha_input.(But Unsuccessful)

1 ACCEPTED SOLUTION

keremkoseoglu
Contributor
0 Kudos

If the value in LV_PRICE is really bigger than what NETPR can hold, I can't imagine a solution.

Otherwise; if your system level is high enough, you can simply use the CONV command:

wa_ekko-netpr = conv #( lv_price ).
2 REPLIES 2

srikanthnalluri
Active Participant
0 Kudos

Handle the exceptions, with this handling you can avoid the dump.

Try.
wa_ekko-netpr = lv_price.
catch cx_sy_conversion_overflow into data(lw_overflow).
endtry.

keremkoseoglu
Contributor
0 Kudos

If the value in LV_PRICE is really bigger than what NETPR can hold, I can't imagine a solution.

Otherwise; if your system level is high enough, you can simply use the CONV command:

wa_ekko-netpr = conv #( lv_price ).