04-30-2006 1:49 PM
in table T001L hoe i konw what is the min and max value
if the werks is 100
04-30-2006 2:05 PM
Hi,
[code]
DATA : W_ST_LGORT TYPE LGORT_D,
W_LA_LGORT TYPE LGORT_D.
SELECT MIN( LGORT ) INTO W_ST_LGORT FROM T001L WHERE WERKS = '1000'.
SELECT MAX( LGORT ) INTO W_LA_LGORT FROM T001L WHERE WERKS = '1000'.
r_lgort-sign = 'I'.
r_lgort-option = 'EQ'.
r_lgort-low = W_ST_LGORT
r_lgort-HIGH = W_LA_LGORT
append r_lgort.
Regards,
Ravi
04-30-2006 2:09 PM
04-30-2006 2:15 PM
Which TYPE, the one I have posted in the other thread, it has some syntax issues as I typed it here directly. You really don't need a type, directly refer to the table and the data element os lgort_d.
If you still want to use that logic
DATA : T_LGORT TYPE SORTED TABLE OF T001L WITH NON-UNIQUE KEY LGORT.
DATA : W_ST_LGROT TYPE LGROT,
W_LA_LGORT TYPE LGORT.
DATA : W_LINES TYPE I.
FIELD-SYMBOLS : <FS_LGORT> LIKE INE OF TABLE T__LGORT.
SELECT LGORT INTO TABLE T_LGORT FROM T001l.
READ TABLE T_LGORT ASSIGNING <FS_LGORT> INDEX 1.
IF SY-SYBRC = 0.
W_ST_LGORT = <FS_LGORT>-LGORT.
ENDIF.
DESCRIBE TABLE T_LGORT LINES W_LINES.
READ TABLE T_LGORT ASSIGNING <FS_LGORT> INDEX W_LINES.
IF SY-SYBRC = 0.
W_LA_LGORT = <FS_LGORT>-LGORT.
ENDIF.
Try this
Regards,
Ravi