Skip to Content
0
Former Member
Apr 28, 2009 at 07:40 AM

Do not hard code the plant instead maintain it in a custom table

90 Views

Hi Gurus,

in the initialization iam hardcoding the plant value and appening it in the R_WERKS.

But here insted of doing hardcoding for every plant here we need to maintain the plant in a custom table and plants should be added in this customtable.

as i have created the Custom table.

Now how i need to incorporate the changes in this coding.

DATA : IT_PLANTS LIKE ZQM_PLANT OCCURS 0 WITH HEADER LINE.

INITIALIZATION.

CLEAR: R_WERKS.

REFRESH: R_WERKS.

R_WERKS-SIGN = 'I'.

R_WERKS-OPTION = 'EQ'.

R_WERKS-LOW = IT_PLANTS-ZWERKS.

APPEND R_WERKS.

CLEAR: R_WERKS.

R_WERKS-SIGN = 'I'.

R_WERKS-OPTION = 'EQ'.

R_WERKS-LOW = '3500'.

APPEND R_WERKS.

CLEAR: R_WERKS.

R_WERKS-SIGN = 'I'.

R_WERKS-OPTION = 'EQ'.

R_WERKS-LOW = '2500'.

APPEND R_WERKS.

CLEAR: R_WERKS.

R_WERKS-SIGN = 'I'.

R_WERKS-OPTION = 'EQ'.

R_WERKS-LOW = '3000'.

APPEND R_WERKS.

CLEAR: R_WERKS.