‎2012 Feb 02 2:28 PM
as read table with
READ TABLE gt_INT_CURR_VALUE into gs_int_curr_value
WITH KEY gs_FS_EINA_KEY BINARY SEARCH.
the statement read tabel with key is absolute in ecc 6 so how to replace it .
‎2012 Feb 02 2:39 PM
Hi ,
This statement is not obsolete in 6.0, can you use it.
if you see that this statement is obsolete, please provide the source of that information.
Thanks,
Srini.
‎2012 Feb 03 12:32 AM
Hi ,
> This statement is not obsolete in 6.0, can you use it.
> if you see that this statement is obsolete, please provide the source of that information.
>
> Thanks,
> Srini.
HI Srinivas,
In the below statement, gs_FS_EINA_KEY is a structure. It is obsolete. I think this is what subrat was also taking about,(if iam correct).
READ TABLE gt_INT_CURR_VALUE into gs_int_curr_value
WITH KEY *gs_FS_EINA_KEY* BINARY SEARCH.for this to be modified,
you can do it in 2 ways, if gt_INT_CURR_VALUE is table with unique keys, then you can use same structure of table and mention your key values. and use READ FROM statement.
another way is to use to specifiy individual components..
Please hit F1 on READ TABLES....you will get cleared.
‎2012 Feb 02 11:06 PM
Hi subratt,
internal tables with header lines are obsolete and in oo context (CLASS / METHOD code) forbidden.
OK, you'd better use SORTED TABLE and FIELD-SYMBOLS to gt optimal code::
READ TABLE gt_INT_CURR_VALUE into gs_int_curr_value
WITH KEY gs_FS_EINA_KEY BINARY SEARCH.may be replaced with
DATA:
gt_INT_CURR_VALUE_SORTED LIKE SORTED TABLE OF gs_int_curr_value
WITH [NON-]UNIQUE KEY <fields of gs_FS_EINA_KEY>.
FIELD-SYMBOLS:
<nt_curr_value> LIKE gs_int_curr_value.
gt_INT_CURR_VALUE_SORTED = gt_INT_CURR_VALUE.
READ TABLE gt_INT_CURR_VALUE_SORTED ASSIGNING <nt_curr_value>
WITH TABLE KEY <key1> = gs_FS_EINA_KEY-<key1> .. <keyn> = gs_FS_EINA_KEY-<keyn>.Regards,
Clemens
‎2012 Feb 03 6:27 AM
Hi,
Use this code snippet for your reference -
LOOP AT i_matnr INTO wa_matnr.
Read Table i_makt INTO wa_makt
WITH KEY matnr = wa-matnr BINARY SEARCH.
IF sy-subrc EQ 0.
- - - - - -
ENDIF.
ENDLOOP.
Regards,
Harsh Bansal