on 05-13-2008 10:37 AM
Hi SDNers,
I have three Fields COST, QUANTITY, and NET QUANTITY in my alv table , Now i want to calculate the field NET QUANTITY based on COST and QUANTITY and display it in NET QUANTITY Here QUANTITY is a editable field and the value in COST is coming from the data base, Here if i manually enter the QUANTITY and click enter then the NET QUANTITY should be updated. how can i achieve This??
Thanks
Harish
You need to set the cell editor as Input Field for the quantity column, and also define an event handler for the onEnter event of the input field. In that method, you need to read the value entered and populate the net qty field. And then bind it to the context again.
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perhaps I am missing something in your requirements, but this seems really simple. In your event handler, you just read the data from your context. Do the calculation in ABAP setting the new results back into the context. You can use the code wizard to help with the logic to read and write to/from the context. The calcuation itself is really basic ABAP (var1 * var2 = var3).
What part are you having problems with?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.