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: 

Hard code in selection screen

Former Member
0 Kudos
683

Hi Experts,

i have selection screen like this

in the below one Division and Distibution channel is hard code to 21 and 10,

but need sales organization 1000 & 1100 have

Division and Distibution channel is hard code to 20 and 20.

How will write the logic in selection screen.

SELECT-OPTIONS : KUNNR FOR KNA1-KUNNR .

PARAMETER : VKBUR LIKE KNVV-VKBUR OBLIGATORY.

PARAMETER : VKORG LIKE KNVV-VKORG OBLIGATORY.

PARAMETER : SPART LIKE KNVV-SPART DEFAULT '21' NO-DISPLAY.

PARAMETER : VTWEG LIKE KNVV-VTWEG DEFAULT '10' NO-DISPLAY.

SELECT-OPTIONS : SPBUP for S001-SPBUP OBLIGATORY.

Thanks & Regards,

Sreedhar.

2 REPLIES 2

Former Member
0 Kudos
196

Hi.

Write like this

to give more than one value have to declare select-options and in the intialization you have to write the code

SELECT-OPTIONS : KUNNR FOR KNA1-KUNNR .

PARAMETER : VKBUR LIKE KNVV-VKBUR OBLIGATORY.

select-options: VKORG for KNVV-VKORG no intervals OBLIGATORY.

PARAMETER : SPART LIKE KNVV-SPART DEFAULT '20' NO-DISPLAY.

PARAMETER : VTWEG LIKE KNVV-VTWEG DEFAULT '20' NO-DISPLAY.

SELECT-OPTIONS : SPBUP for S001-SPBUP OBLIGATORY.

In the initialization Event.

write

s_vkorg-low = '1000'

s_vkorg-sign = 'I'.

s_vkorg-option = 'EQ'.

append s_vkorg.

s_vkorg-low = '1100'

s_vkorg-sign = 'I'.

s_vkorg-option = 'EQ'.

append s_vkorg.

use this s_vkorg in where condition of the select statement

reward if useful

regards,

Anji

Former Member
0 Kudos
196
INITIALIZATION.

if vkorg eq '1000' or
  vkorg eq '1100'.
   
        spart = '20'.
        vtweg = '20'.
endif.