2007 Jul 30 2:16 PM
Dear All,
I created one table.In that there are there quantity fields(of type Kmenge).Lets say A,B,C.
Here C = A - B.
Now the problem ,whenever C is negative and saved in table then if i am trying to see the data from SM30 then it is showing dump.
In the dump it is saying that C has negative sign and conversion error occured during displaying data on the screen.
Please let me know how to solve this.
Dear All,
I created one table.In that there are there quantity fields(of type Kmenge).Lets say A,B,C.
Here C = A - B.
Now the problem ,whenever C is negative and saved in table then if i am trying to see the data from SM30 then it is showing dump.
In the dump it is saying that C has negative sign and conversion error occured during displaying data on the screen.
Please let me know how to solve this.
2007 Jul 30 2:22 PM
2007 Jul 30 2:22 PM
Hi,
You should check data element and domain of field C. If you get this message, that means that the domain of this field doesn't support negative amount.
Regards,
Nicolas.
2007 Jul 30 2:29 PM
You should use data element which supports negative values..
Regards
Pradeep
2007 Jul 30 2:52 PM
Hi..
You have to keep a check in module pool of maintenance view whether field A is less than field B.
If field A is less than B then, you should throw an error message.
If A is greater than or equal to B then only you should do subtraction.
e.g.
MODULE process INPUT.
IF ztab_prax1-a GE ztab_prax1-b.
ztab_prax1-c = ztab_prax1-a - ztab_prax1-b.
ELSE.
MESSAGE 'Plz input A greater than or equal to B.' TYPE 'E'.
ENDIF.
ENDMODULE. " process INPUT
and in the screen flow logic use this module as:
LOOP AT extract.
MODULE liste_init_workarea.
<b>
CHAIN.
FIELD ztab_prax1-a .
FIELD ztab_prax1-b .
MODULE process ON CHAIN-REQUEST.
ENDCHAIN.
</b>
CHAIN.
FIELD ztab_prax1-a .
FIELD ztab_prax1-b .
FIELD ztab_prax1-c .
MODULE set_update_flag ON CHAIN-REQUEST.
ENDCHAIN.
FIELD vim_marked MODULE liste_mark_checkbox.
CHAIN.
FIELD ztab_prax1-a .
MODULE liste_update_liste.
ENDCHAIN.
ENDLOOP.
Reward if useful
Regards Prax
2007 Jul 30 3:09 PM
Please do the change in datatype of C field from INT1 to INT4 ...
" INT1-> 1-byte integer, integer number <= 255
" INT4-> 4-byte integer, integer number with sign
So your negative data in the C field will reffer to the datatype a INT4 which can avoid giving the Dump . and have the check box of sign . ok it will solve your problem .....
reward points if it is usefull ....
Girish
2007 Jul 30 3:11 PM
Hi,
I think, the data element you used is not allowing any - values. Try using DMSHB data element.
Thanks,
Sriram.
2007 Jul 30 3:20 PM
I have used one currency field in custom table and it works great.
I used data element WRBTR and domian WERT7 ,You can refer like this.
Thanks
Seshu
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |