Skip to Content
0
Former Member
Oct 19, 2005 at 12:31 PM

Looking for better logic

19 Views

Dear experts...

In the selection screen i have two radio buttons.

If i click the first one, it shoud take from the parameter

(it contains date).

If i click second radio it should take from the range(select-options.)

if radio1 = 'x'.

select vtweg kunnr matnr knumh datbi into corresponding fields of i_inforec

from A005

where kappl eq 'V'

and kschl eq pkschl

and vkorg eq pvkorg

and vtweg in svtweg

and kunnr in skunnr

and matnr in smatnr

and datbi ge pvalid

and datab le pvalid.

-


some code -


-


some code -


elseif radio2 = 'x'.

select vtweg kunnr matnr knumh datbi datab

into corresponding fields of i_inforec

from A005

where kappl eq 'V'

and kschl eq pkschl

and vkorg eq pvkorg

and vtweg in svtweg

and kunnr in skunnr

and matnr in smatnr

  • and datbi ge pvalid

  • and datab le pvalid.

and datab ge prange-low

and datbi le prange-high.

-


some code -


-


some code -


endif.

Instead of copying all the select statements in the second radio button ...is there any way to do.....i mean i want to reduce my code...!!!

Reward guaranteed...

Kaki