2007 Feb 05 9:19 AM
Hello @ll,
when I try to put out a negative value in a table control field I get a short dump because the output field is too short. But it's long enough. I assume that the problem is the minus right beside the value. The output field is as a currency field defined and if I delete the minus in debugging mode than it works without short dump. Is there any possibility to put out a negative value in a currency field?
Thanks for any helpful responses
Chris
declare another itab and change the currecy field to fields of type char.
move the data from original itab to this itab and in the process
conver
newitab-currenyfield = originalitab-currency * -1 .
concatenate '-' newitab-currenyfield into newitab-currenyfield .
now use this new modifed itab in table control.
Regards
Raja
2007 Feb 05 9:24 AM
BEFORE SHOWING THE DATA IN TABL CNTRL.
LOOP AT ITAB.
IF ITAB-AMT LT 0.
ITAB-AMT = ITAB-AMT * (-1).
ENDIF.
MODIFY ITAB.
ENDLOOP.
OR YOU CAN USE ABS FN ALSO.
REGARDS
SHIBA DUTTA
2007 Feb 05 9:25 AM
all i know to this subject is:
at a ALV-Grid i had no problems displaying negative values in a currency field.
2007 Feb 05 9:28 AM
Sorry I forgot to mention... but I have to display the negative value in the table control field!!! So I think I have to insert an extra column only for the minus sign... or is there a better idea???
regards
chris
2007 Feb 05 9:31 AM
declare another itab and change the currecy field to fields of type char.
move the data from original itab to this itab and in the process
conver
newitab-currenyfield = originalitab-currency * -1 .
concatenate '-' newitab-currenyfield into newitab-currenyfield .
now use this new modifed itab in table control.
Regards
Raja
2007 Feb 05 9:41 AM
YOU CAN DO ONE THING IF YOU ARE NOT DOING ANY CALCULATION OR SOMTHING JUST TAKE THE CURRENCY FIELD TO A CHACTER TYPE FIELD AND SHOW THAT CHARACTER TYPE FIELD.
REGARDS
SHIBA DUTTA
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |