Skip to Content
avatar image
Former Member

Select Query Failure

Hi All,

I have made a Z table and I am fetching data from it.

But the issue is some data is not being fetched, though the same data exists in the table.

I have 3 variables in where condition.

SELECT * FROM ZFIIST003 " Estimation Data
INTO CORRESPONDING FIELDS OF TABLE GT_ZFIIST003
WHERE PARTNER IN S_PART AND
       ZDATE IN S_DATE and
     VENDOR_NAME = PVENDOR  .


if I remove VENDOR_NAME in this query then it is working fine.

But according to the requirement i have to keep this in the query.


Does any one having a solution.?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 09, 2015 at 07:17 AM

    HI

    I think you have declare PVENDOR is PARAMETER filed. if you wont give in parameter field then you wont get anything.

    make that field as select-option with no extension and no intervels and check it.


    regards

    laxman

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09, 2015 at 07:22 AM

    Did you check thru SE16[n] transaction, I could only suppose that either you don't pass the value or pass invalid values (e.g. conversio-exit or lowercase/uppercase characters mismatch)

    NB: If SE16[n] is also unsuccesful there may be some incorrect data stored in database (nonn-consistent with field definition at Abap level, but correct at DB level, wrong conversion-exit or LC/UC) usually due to wrong coded upload of data.

    Regards,

    Raymond

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 09, 2015 at 07:18 AM

    Hi,

    If you are missing conversion exit before your select, then add the below code before your select query and try again.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = PVENDOR 
    IMPORTING
       OUTPUT        = PVENDOR.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 09, 2015 at 07:20 AM

    Hi Acharya,

    Since PVENDOR is a parameter, if its value is initial the select query checks the records with VENDOR_NAME is initial.

    So better make PVENDOR as obligatory field or change it to select option.

    Note: If a select option is initial, 'where' will not consider this condition.\

    Regards

    Sreekanth

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09, 2015 at 07:29 AM

    Hi Yash,

    Please check the value of PVENDOR in debugging mode and check the value in table.

    May be it is lower and upper case issue.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded