10-16-2008 7:59 AM
Hi,
I would like to select the PSPID from table PROJ with POST1.
I don´t understand why it doesn´t work.
Here is my select statement.
SELECT PSPID POST1
FROM PROJ
Into wa_tab
WHERE PSPID EQ B_PSPID .
ENDSELECT.
The fields are empty, i don´t understand this.
regards
10-16-2008 8:01 AM
Hi,
Did you check the data in the table is present or not according to your where condition
I think no data in your database table
regards
prasanth
10-16-2008 8:01 AM
check the sy-subrc value after the select query. If its 4 then no records were selected and so the fields are empty.
10-16-2008 8:01 AM
hi
check the table entries in PROJ for the matching entries in the where clause.
10-16-2008 8:03 AM
Hi Sabine,
If B_PSPID is a select-option
then the code should like this :
SELECT PSPID POST1
FROM PROJ
Into wa_tab
WHERE PSPID in B_PSPID .
ENDSELECT.
This is more optimestic:
SELECT PSPID POST1
FROM PROJ
Into table i_tab
WHERE PSPID EQ B_PSPID .
10-16-2008 8:32 AM
thank you for the answers,
I have looked in the table. I´ve took the Post1 to select the PSPID and POST1 together.
SELECT PSPID POST1
FROM PROJ
Into table i_project
WHERE POST1 EQ "a project description", I get empty field, but there are a many data sets in the table PROJ.
But when I take the WHERE PSPID EQ "12345", it works.
I dont understand what is the difference between POST1 and PSPID?
10-16-2008 10:11 AM
Hi,
PSPID is the keyfield for the table PROJ, when you use " WHERE PSPID EQ '12345' " statement, it returns you the matching values for sure if there is any, but POST1 is a text field and using a text field in an SQL query is not an efficient way to get matching values (uppercase-lowercase conflict may be an example).
that is the difference between POST1 and PSPID.
regards,
Murat Kaya
10-16-2008 10:16 AM
Hi,
OK
DATA: lt_proj TYPE STANDARD TABLE OF proj.
SELECT * FROM proj INTO TABLE lt_proj WHERE post1 = 'test'.
NOT OK
DATA: lt_proj TYPE STANDARD TABLE OF proj.
SELECT * FROM proj INTO TABLE lt_proj WHERE post1 = 'TEST'.<<---------------------
So, it's case sensitive!
Adibo.
10-16-2008 10:17 AM
-> look at domain PS_PSPID
notice the conversion routine ABPSN
CONVERSION_EXIT_ABPSN_INPUT / output
A.
10-16-2008 10:34 AM
Hi.
SELECT PSPID POST1
FROM PROJ
Into table i_project
WHERE POST1 EQ "a project description", I get empty field, but there are a many data sets in the table PROJ.
But when I take the WHERE PSPID EQ "12345", it works.
As you mentioned that it is working for PSPID Eq '12345' and not for 'a project description'. it seems to be case sensitive problem or else pattern problem. so please check case first. if its is fine then try to write CP ( contains pattern ) in where condition.
Hope this will give you some idea,
Regards,
Aswini.
10-16-2008 10:50 AM
Hi,
Try selecting with the query,
SELECT PSPID POST1
FROM PROJ
Into table i_project
WHERE POST1 EQ 'A PROJECT DESCRIPTION'.
ENDSELECT.
Hope this will help you.
Best Regards,
Suresh
10-17-2008 8:48 AM