Skip to Content
avatar image
Former Member

selection queries

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Oct 29, 2007 at 11:01 AM

    Sameer,

    what are the 7 input fields & 3 db tables?

    Satish

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi satish.

      inputs:

      plant-mseg

      matnr-mseg

      vendor-mseg

      taxcode-mseg

      mtart-mara

      matkl-mara

      date-mkpf

  • avatar image
    Former Member
    Oct 29, 2007 at 11:01 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 29, 2007 at 11:04 AM

    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'.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 29, 2007 at 11:08 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 29, 2007 at 11:11 AM

    instead of writing EQ '' write is initial

    Add comment
    10|10000 characters needed characters exceeded