2009 May 07 7:21 PM
Hi All,
Greetings!!!
I am working an ALV report in which am asked to display the soem of the column headings right align and some left. I need to display calcuated quantities in one column where the negative values should be printed with in the braces... Eg: -2000.000 should be displayed as (2,000.000) and psotive values 1,000.000 default.
Please help me out on this....
Regards,
Kalam.
2009 May 07 7:33 PM
sorry, bad post. Please erase
Edited by: Gustavo Campanelli on May 7, 2009 3:44 PM
Hi All,
Greetings!!!
I am working an ALV report in which am asked to display the soem of the column headings right align and some left. I need to display calcuated quantities in one column where the negative values should be printed with in the braces... Eg: -2000.000 should be displayed as (2,000.000) and psotive values 1,000.000 default.
Please help me out on this....
Regards,
Kalam.
2009 May 07 7:31 PM
Hi,
I doubt you can do anything with the column headings, as for your second requirement, you can probably think of moving your values to a character field, as you cannot do for fields with numeric types, and then displaying them by converting it as per your rules. i.e brackets for negatives. before displaying them in the alv.
2009 May 07 7:37 PM
Hi,
Thanks for an immediate response....
I have used the same for negative values and am able to display the same. But my requirement is for +ve values, I need to display the values with commas(,). eg: 2,000.000. If I declare a quantitty variable in my final Internal table for quantity field, it gives dump as I cannot move character value (1000.000) in to quatity field. If I declare a character field, I cannot display quantity value as 2,000.000 ( if it is +ve). It gets displayed as 2000.000.
Need your guidance...
Regards,
Kalam.
2009 May 07 7:33 PM
sorry, bad post. Please erase
Edited by: Gustavo Campanelli on May 7, 2009 3:44 PM
2009 May 07 7:43 PM
Experiment a little with the abap instruction write anything to textvar, this way you can write formated data to a text variable, then modify it as you like before sending it to the alv.
About the alingment issue, check the catalog definition and modify the fields as you need with the field just, where R stands for right L for left and C for centered. If your catalog is called it_fieldcat, for example, and a workarea is defined as wa_fieldcat, then you should loop and change wa_fieldcat-just for the fields you need. Of course, this is for authomatic catalog creation, for manual creation just modify just in the needed fields.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |