Skip to Content
avatar image
Former Member

How to retrieve data based on different inputs from selection screen

For ex:

on selection screen i have 6 input fields.

                                         1.vendor name

                                         2.Vendor Number(Mandatory)

                                         3.Address

                                         4.telephone number

                                         5.company code(Mandatory)

                                         6.Terms of payment

case 1.

so while entering input values, I entering only "vendor name" and 2 mandatory fields values,So that i need get output with given vendor name.

case 2.

In this case I an entering "terms of payment" and 2 mandatory fields values,So that i need get output with given Terms of payment.

For such cases, How we can write SELECT query and WHERE Clause conditions..Please give solution...its my requirement

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 29, 2014 at 01:12 PM

    Hi Vijay,

    Instead of declaring obligatory syntax write the logic.

    AT SELECTION-SCREEN.

    if vendor is initial and payment terms is initial.

    message 'Select vendor or payment terms' type 'S' Display like 'E'.

    STOP.

    endif.

    if vendor is not initial.

    CHECK FIELD1 IS INITIAL AND FIELD2 IS INITIAL.

    message 'enter field1  field2' type 'S' DISPLAY LIKE 'E'.

    STOP.

    elseif payment terms is not initial.

    CHECK FIELD2 IS INITIAL AND FIELD3 IS INITIAL.

    message 'enter field2  field3' type 'S' DISPLAY LIKE 'E'.

    STOP.

    endif.

    Try to combine the selection-field tables in a single select query using joins

    Regards,

    Venkat.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 29, 2014 at 01:22 PM

    Hi Vijay,

        this one we can achieve by using the Selection screen events or in normal way also.

    1) normal way

      if vendorname & your two input fields is initial.

         write the select statement accordingly.

    elseif termsofpayment & your 2 mandatory fields is initial.

        write the select statements accordingly.

    endif.

    2) we can achieve by selection screen events & using radio buttons ,& modify screen.

    Regards,

    Krishna


    Add comment
    10|10000 characters needed characters exceeded