12-04-2013 6:39 AM
For the Function module HR_EMPLOYEE_SEARCH , we get ABAP dump when we enter names with ‘, example O'BRIEN.
Kindly suggest the resolution.
Runtime Errors SAPSQL_WHERE_PARENTHESES
Exception CX_SY_DYNAMIC_OSQL_SYNTAX
12-04-2013 7:02 AM
Hi Nitu ,
The error is coming from the following statement in the FM:
SELECT PERNR INTO TABLE I_PERNR
FROM PA0002 WHERE BEGDA LE SEARCH_DATE
AND ENDDA GE SEARCH_DATE
AND (WHERE_TAB).
Here WHERE_TAB will have value - VNAMC LIKE 'O'BRIEN'.
This is a wrong declaraton of SQL statement , so it is giving you a dump.
Could you check in PA0002 table , how the fields VNAMC or NCHMC maintained?
BR.
GIRI
12-04-2013 7:02 AM
Hi Nitu ,
The error is coming from the following statement in the FM:
SELECT PERNR INTO TABLE I_PERNR
FROM PA0002 WHERE BEGDA LE SEARCH_DATE
AND ENDDA GE SEARCH_DATE
AND (WHERE_TAB).
Here WHERE_TAB will have value - VNAMC LIKE 'O'BRIEN'.
This is a wrong declaraton of SQL statement , so it is giving you a dump.
Could you check in PA0002 table , how the fields VNAMC or NCHMC maintained?
BR.
GIRI
12-04-2013 7:07 AM
Hi Giri,
I have checked in PA0002 table,
The entries are as below.
NCHMC O'BRIEN
VNAMC AARON
Regards,
Nitu
12-04-2013 7:17 AM
You will have to pass in this case O''BRIEN as two single quote reporesent one single quote
12-04-2013 7:23 AM