Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV- Show column that calculates values after checking a checkbox?

Former Member
0 Kudos

Dear Friends,

I have this problem, I have an alv that does some calculations when I check some of the check boxes but my task is to add one more checkbox and when you check that check box than it should calculate somethin ( in my case add percentage to the original value), how do I do it, how do I write that when I check a checkbox than I get one more column in my alv grid that calculates extra percentage of the original value

I am sorry for my bad english

Thank you in advance

3 REPLIES 3

Former Member
0 Kudos

Could you possibly begin with two rows of checkboxes, and the second checkbox is disabled until the first checkbox is checked?

0 Kudos

Maybe I havent been so clear, let me make myself more clear. Let's take this scenario, I have a screen and in that screen through screen painter I putted a check box, now I want that when I check this check box ( lets say its name is: Add Transportation fee) in my ALV grid to be shown a column that will calculate (add) 10 percent to the original value.

0 Kudos

Hi-

Say you check box fields are: p_chk1 and p_chk2.

Write your logic like this:

IF p_chk1 IS NOT INITIAL AND p_chk2 IS INITIAL.

*--write your current logic

ELSEIF p_chk1 IS NOT INITIAL AND p_chk2 IS NOT INITIAL.

*--call new alv grid with additional field

ENDIF.

Hope this is clear.

-Venkat