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: 

selection queries

Former Member
0 Kudos

Hi all,

i have 7 inputs in selection screen from the 3 difrnt tables (4from one table and 2 from one table and 1 from one table.). and i want to fetch data in difrnt combinations.and in start of selection i m writing condition like below. but it is not performaing.there is no mandatory field. can anybody give me short way to fetch data from difrnt combinations. very urgent....

im writing the if condition like this. for two combinations.

START-OF-SELECTION.

IF S_WERKS EQ ' ' AND S_MATNR EQ ' ' AND S_LIFNR EQ ' ' AND S_MTART EQ 'X' OR S_MATKL EQ 'X'.

PERFORM GET_MARA.

ELSEIF S_WERKS EQ 'X' OR S_MATNR EQ 'X' OR S_LIFNR EQ 'X'.

PERFORM GET_MSEG.

ENDIF.

6 REPLIES 6

Former Member
0 Kudos

Sameer,

what are the 7 input fields & 3 db tables?

Satish

0 Kudos

Hi satish.

inputs:

plant-mseg

matnr-mseg

vendor-mseg

taxcode-mseg

mtart-mara

matkl-mara

date-mkpf

former_member194152
Contributor
0 Kudos

Hi,

In selection screen you have declare parameter or select-option because if you declare select-option then 'EQ' will not work for that you have to change it with 'IN' operator or for parameter 'EQ' will work.so just confirm.

Rewards if helpful.

Cheers

Gagan

Former Member
0 Kudos

Hi,

try like this,

START-OF-SELECTION.

IF S_WERKS is initial AND S_MATNR is initial AND S_LIFNR is initial AND ( not S_MTART is initial OR not S_MATKL is initial ).

PERFORM GET_MARA.

ELSEIF not S_WERKS is initial OR not S_MATNR is initial OR not S_LIFNR is initial .

PERFORM GET_MSEG.

ENDIF.

Thanks!

Brunda

'Reward is useful'.

Former Member
0 Kudos

u can use table join i.e inner join.

is there any relationship b/w the tables?

'eq' is not associated with select-options

u have to use 'in'.

reward if useful

umakanth

Former Member
0 Kudos

instead of writing EQ '' write is initial