# function module

for 3x + 4y + 2z LE 25 i want all possible values can any body suggest me.pls?

##### Former Member replied

Hello

Try this code:

data: x type i, y type i, z type i, sum type i. data: begin of itab occurs 0, x type i, y type i, z type i, end of itab. x = y = z = 0. do 6 times. x = x + 1. do 5 times. y = y + 1. do 9 times. z = z + 1. sum = x * 3 + y * 4 + z * 2. if sum <= 25. itab-x = x. itab-y = y. itab-z = z. append itab. endif. enddo. z = 0. enddo. y = 0. enddo.

In result table ITAB will be all possible values (natural numbers, without zeros).

If you need with zeros - modify this code itself