‎2013 May 27 12:20 PM
Hi all,
I have to delete trailing zero of a quantity field in Module Pool Programming.
For example :
123.000 => 123
The Format of my field is QUAN (quantity),
"From Dict" is checked,
Ref Field : MYTABLE-MEINS
If anyone could help me.
Thank you
Regards
‎2013 May 27 12:54 PM
Hi Sam,
Take the quantity field into character variable, use SPLIT statement at ' . ' to break the integer and zero part.
regards
kumar shantanu
‎2013 May 27 12:49 PM
Use character type while creating screen element for qty field
write your logic to delete the trailing before passing to screen element in PBO event.
‎2013 May 27 1:03 PM
‎2013 May 27 12:54 PM
Hi Sam,
Take the quantity field into character variable, use SPLIT statement at ' . ' to break the integer and zero part.
regards
kumar shantanu
‎2013 May 27 1:08 PM
Hi kumar,
Thank you for your reply, but i need the field to be displayed like quantity and not character type
‎2013 May 27 1:44 PM
Define the variable using data element BCONS_VAR and pass the value ...
‎2013 May 27 3:12 PM
Thank you Rakesh,
I've added a new field in my structure with the data element BCONS_VAR and i changed the name of my field in the screen by this new field, and it's working.
Regards
Sam
‎2013 May 28 6:18 AM
‎2013 May 27 1:33 PM
AFAIK, from 3.0A on,
If a unit from table T006 (maintenance transaction CUNI) is found in a UNIT field, the respective QUAN field is output with as many places after the decimal point as required according to table T006.
However, no more decimals are output than the QUAN field has according to the ABAP/4 Dictionary. Conversely, no significant decimal places are suppressed, so if a place after the decimal point is to be suppressed and has a value not equal to zero, the quantity specification is output with its defined
So refer to a ddic QUAN field without decimal (Look via SE16N on DD01L where DATATYPE = 'QUAN' and DECIMALS = 0)
Regards,
Raymond
‎2013 May 27 2:03 PM
Hi Raymond,
Because my field is taken directly from the dictionary, i cannot change its reference field and also its format.
‎2013 May 27 3:19 PM
‎2013 May 27 3:22 PM