I am using Class Interface: 'CL_ITEM_TREE_CONTROL', Structure: 'MTREEITM' and I pass my value to 'MTREEITM-TEXT.'
data: amount_value type p decimals 2.
item-node_key = 'Child1'.
item-item_name = 'Column2'.
item-class = cl_gui_column_tree=>item_class_text.
item-text = amount_value
SHIFT item-text LEFT DELETING LEADING space.
APPEND item TO item_table.
Can you please give me advice as to how I can display numeric output with all its formatting? "1,234,567.89"
WRITE amount_value TO item-text.
item-text now contains amount_value with thousand separators and decimals as defined in your defaults. You can of course use other options to the WRITE statement, like MASK, or LEFT-JUSTIFIED etc. to get the output precisely as you like.
Dig Deeper on SAP ABAP
Related Q&A from Matthew Billingham
An SAP user needs information on how to change the password on several SAP user accounts from a central location.continue reading
An SAP user is trying to run a report in an SAP ALV Grid online and wants to know how to get the data in the report to appear along with the header.continue reading
An SAP user needs to transfer customer purchase order spreadsheet data to SAP VA01 to create a new sales order.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.