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: 

Select Query Failure

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

former_member202818
Active Contributor
0 Kudos

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

raymond_giuseppi
Active Contributor
0 Kudos

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

0 Kudos

Thanks a lot Raymond.

Yes I checked in SE16n.

I am getting the data in that.

I applied your solution to put the parameter as select options. And it worked.

Thank you:-)

0 Kudos

Usage of SELECT-OPTIONS was suggested by Laxman P, not by me…

Regards,

Raymond

Mohamed_Mukhtar
Active Contributor
0 Kudos

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