Hello All
Getting error with Filter Operator.
I assume USING KEY is mandatory but with Default Key option Using Key can't be used.
And If I change the Default Key to Unique Key my VALUE operator starts to give error.
How to fix this ?
TYPES:
BEGIN OF lty_ord,
vbeln TYPE vbeln_va,
posnr TYPE posnr_va,
auart TYPE vbak-auart,
END OF lty_ord,
lty_ord_tab TYPE TABLE OF lty_ord WITH DEFAULT KEY.
* Prepare a Structure and a table using VALUE constructor operator.
DATA(wa_ord) = VALUE lty_ord( vbeln = '0000000001' posnr = '000010' auart = 'DT' ).
DATA(li_ord) = VALUE lty_ord_tab( ( vbeln = '0000000001' posnr = '000010' auart = 'TS' )
( vbeln = '0000000002' posnr = '000010' auart = 'TS' )
( vbeln = '0000000002' posnr = '000010' auart = 'TS' )
( vbeln = '0000000003' posnr = '000020' auart = 'FS' ) ).
DATA(li_ord_fliter) = FILTER lty_ord_tab( li_ord WHERE vbeln = '0000000001' AND posnr = '000010' AND auart = 'TS' ) .
The Filter Argument requires a sorted or hashed key.
lty_ord_tab TYPE SORTED TABLE OF lty_ord WITH DEFAULT KEY. lty_ord_tab TYPE HASHED TABLE OF lty_ord WITH DEFAULT KEY.
Add a comment