‎2006 Apr 27 7:54 AM
hi
when i write below statement and activated am getting a error message as 'werks unknown'.
select single ekgrp from t024 into g_ekgrp where werks in p_werks.
can any one help how shoould i write above staament
thanks venkat
‎2006 Apr 27 7:58 AM
Hi Venkat,
The table T024 does not have any field named "werks".
Hence the error.
Tell the exact requirement.
**Don't forget to reward points for useful replies
‎2006 Apr 27 7:59 AM
Hi !!
There is no "werks " field in t024 table.
Check what filds are in that table using SE11 or SE16N tansaction
BR, Jacek
‎2006 Apr 27 8:13 AM
hi venkat,
werks is not available is in the table,
do you have any append struture , if so try to check the table is active or not. try to adjust the table and activate it.
then check your select .
Regards
vijay
‎2006 Apr 27 8:16 AM
There is no field werks so u have to get by using join on EKPO or EKKO.
regards
vinod
‎2006 Apr 27 8:20 AM
Hai Venkat
Tables : T001W.
DATA : BEGIN OF TB_MATNR_WERKS OCCURS 0,
MATNR LIKE BSEG-MATNR, " Material Number
WERKS LIKE BSEG-WERKS, " Plant
END OF TB_MATNR_WERKS.
AT SELECTION-SCREEN.
PERFORM VALIDATE_SEL_SCREEN_INPUT .
FORM VALIDATE_SEL_SCREEN_INPUT .
Local varaibles
DATA:L_BUTXT(30), " For Name of the company code
L_WERKS TYPE WERKS. " For Plant
Validation for Plant
CLEAR L_WERKS.
SELECT SINGLE WERKS
INTO L_WERKS
FROM T001W
WHERE WERKS IN S_WERKS.
IF SY-SUBRC <> 0.
MESSAGE E899 WITH 'Enter valid Plant'(004).
ENDIF.
endform. " VALIDATE
Thanks & Regards
Sreenivasulu P
Message was edited by: Sreenivasulu Ponnadi
‎2006 Apr 27 8:23 AM
Hi Venkat,
Check demo programs
DEMO_SELECT_SINGLE
DEMO_SELECT_SINGLE_FIELDS on how to use Select Single statement.
Hope this helps
Thanks
Lakshman