‎2009 Apr 29 7:28 AM
what is wrong in my select stmt. kindly validate me.
DATA : v_charvalue TYPE atwrt.
SELECT atwrt
UP TO 1 ROWS
INTO v_charvalue
FROM ausp
WHERE objek = mcha-matnr
AND atinn = 'US_FRENCH_ON'
AND klart = '101'.
ENDSELECT.
When I try to select using se16
with the the values the record is getting selected.
How ever My above select stmt is not fetching value for me.
Thanks.
‎2009 Apr 29 7:40 AM
Because of ATINN Field,check it once in AUSP Table ATINN is a 10size numeric char field
but in where condition you are mentioning values as US_FRENCH_ON it one is 12 char..
Hope it will helpful
‎2009 Apr 29 7:40 AM
Because of ATINN Field,check it once in AUSP Table ATINN is a 10size numeric char field
but in where condition you are mentioning values as US_FRENCH_ON it one is 12 char..
Hope it will helpful
‎2009 Apr 29 7:41 AM
DATA : v_charvalue TYPE atwrt.
SELECT atwrt
UP TO 1 ROWS
INTO v_charvalue
FROM ausp
WHERE objek = mcha-matnr
AND atinn = 'US_FRENCH_ON' " ATINN is NUMC(10) Field which will not hold characters
AND klart = '101'.
ENDSELECT.Just check the table again for the data.
Regards,
Gurpreet
‎2009 Apr 29 7:43 AM
Please debug and see mcha-matnr has some value or not . As this code is working fine for me when i use constant value in where clause.
‎2009 Apr 29 7:48 AM
As for ATINN u have used the character string 'US_.........' which is fine. But as ATINN is NUMC type it has default value as some no.
So u have to use a conversion routine for it.
CONVERSION_EXIT_ATINN_INPUT
In the above FM u can give ur ATINN text value abnd u will get the corresponding NUMC ATINN value which u have to pass in ur select query. This wil surely solve the problem.
‎2009 Apr 29 7:46 AM
‎2009 Apr 29 7:56 AM
Hi Kumar,
The field ATINN has CONVERSION EXIT, so you need to convert it first before you use it in the SELECT statement. Follow this example:
DATA: atinn TYPE atinn.
CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
EXPORTING
input = 'US_FRENCH_ON'
IMPORTING
output = atinn.
DATA : v_charvalue TYPE atwrt.
SELECT atwrt
UP TO 1 ROWS
INTO v_charvalue
FROM ausp
WHERE objek = mcha-matnr
AND atinn = atinn
AND klart = '101'.
ENDSELECT.Regards,
Lim...