2023 May 04 5:31 PM
Hi all,
I want to convert pack quantity to integer.
Here is the field tpcny for below if condition i want to change field type to integer. Please refer below screenshot.
Declaration:
tpcny TYPE p DECIMALS 2.
IF wa_tcurr-fcurr = 'KRW' OR wa_tcurr-fcurr = 'IDR' .
??????
Endif.
What will be the syntax for converting?
Thank you.
2023 May 09 10:36 AM
Hi ankitashinde173,
you can declare the field gs_output-tpcny like an integer (make attention on the lenght of the field). If you pass to that field a quantity with decimals, the value will be directly converted.
Regards
2023 May 09 12:38 PM
Is your question about rounding a number with decimals to its closest integer value? (half-down, half-up, ...?)
2023 May 09 2:32 PM
You can use an implicit conversion from packed to integer (move, 😃
Or use functions related to conversion