2008 May 17 11:47 AM
hi gurus.,
plz check the transaction VA01 .. if i enter '10' in a quantity field it shows 10 only .. but when i use the same field in my 'Z' Program it shows '10.000' .. how ? .. i want to display only '10' not '10.000' . In all standard transactions it is displaying like that only ..
for example.
the field menge is (13,3) ..
but in va01 if i enter 10 it displays 10 only ..
but when i use the same field in my Z-Program(Module Pool)
its get displayed as (10.000) ...
i want to know how to display '10' only without decimal places in screen ..
i tried all comnversions but not working ...
plz help me .. its urgent ..
Regards.,
S.Sivakumar
2008 May 17 11:56 AM
hi,
create ur own date element with 0 decimal places.
Hopeful it will solve ur problem.
2008 May 17 12:34 PM
hi.,
not like that .. Creating own data element is not the solution .. i want elimate decimal places in the standard field as used in Transactions like va01 ... if it is possible in Standard programs how it is not possible in Z-programs ..
plz guide me ...
Regards.,
S.Sivakumar
2008 May 17 5:42 PM
Hi.
I think this differs with the data is displayed too and not only with field domain.
For Eg. If you are using ALV grid display using function module you have parameter in that DECIMALS_OUT where you can specify how many digits you want to display after decimal point. If you pass here '0' then value 10.000 will be displayed as 10.
Similarly there must be parameter in table control to display the number of places after decimal point or there might be conversion routine.
For exact answer you will have to debug the transaction completely but if you need solutions there are many ways to get it.
Thanx,
Ags.
2008 May 17 6:05 PM
Hi,
Try this..
Create a local variable with type P decimals 0 and move the Quantity field in that Local variable and display on screen.
Raghav
2008 May 22 12:12 PM
hi.,
Ya i debugged the whole transaction .. but i am unable to find how decimal places are ignored in Transaction(VA01) ..
if u find plz help me ..
Thanks and Regards.,
S.Sivakumar
2008 May 22 12:21 PM
Hi,
Try below code.......
DATA:
char_value TYPE char15 ,
pack_value TYPE p DECIMALS 0
VALUE '353252623.38'.
WRITE pack_value to char_value.
write char_value.
Regards,
Biswanath
2008 Dec 08 4:19 AM
2024 Jan 30 3:58 AM
Hi Sivakumar
How to resolve, can you please explain the solution.
Advance Thanks
Akbar
2024 Jan 30 12:11 PM
Hello @akbarmscjnu,
While we're happy that you've come to SAP Community to get an answer to your question, you posted your question as an answer in an old thread. Posting in older threads is not the best way to get guidance.
If you're looking for help, you should ask a new question in our Q&A section instead: https://community.sap.com/t5/technology-q-a/qa-p/technology-questions
Best regards,
Anne
2024 Jan 12 5:26 PM
Hi,
Can you share the solution please, I have the same request.
Regards.
M Schonbuch
2024 Jan 30 9:15 AM
WRITE wa1-field1 TO wa2-field1 DECIMALS 0.
You can define decimals number to control decimal places