Application Development and Automation 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: 
Read only

conversions program

Former Member
0 Likes
773

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

6 REPLIES 6
Read only

Former Member
0 Likes
740

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

Read only

Former Member
0 Likes
740

Hi !!

There is no "werks " field in t024 table.

Check what filds are in that table using SE11 or SE16N tansaction

BR, Jacek

Read only

Former Member
0 Likes
740

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

Read only

vinod_gunaware2
Active Contributor
0 Likes
740

There is no field werks so u have to get by using join on EKPO or EKKO.

regards

vinod

Read only

Former Member
0 Likes
740

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

Read only

Lakshmant1
Active Contributor
0 Likes
740

Hi Venkat,

Check demo programs

DEMO_SELECT_SINGLE

DEMO_SELECT_SINGLE_FIELDS on how to use Select Single statement.

Hope this helps

Thanks

Lakshman