Application Development 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: 

low value and high value

Former Member
0 Kudos

in table T001L hoe i konw what is the min and max value

if the werks is 100

3 REPLIES 3

Former Member
0 Kudos

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

0 Kudos

****

i have problem with type.

what is the declare of type

0 Kudos

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