‎2008 Mar 25 2:17 PM
i want to modify my dynamic table , but the table not
get the data .
-
this is my code :
read table <GT_TABLE> index g_index into <DYN_TABLE> .
CONCATENATE 'COL' WA_BSIK-BUDAT(4) WA_BSIK-BUDAT+4(2) INTO FIELD1.
ASSIGN COMPONENT FIELD1 OF STRUCTURE <DYN_TABLE> TO <F_FS>.
IF WA_BSIK-SHKZG = 'H'.
<F_FS> = <F_FS> + WA_BSIK-DMBTR * ( -1 ) .
ELSE.
<F_FS> = <F_FS> + WA_BSIK-DMBTR .
ENDIF.
-
i see that <DYN_TABLE> get the data , but the table <GT_TABLE> not get it , why ?
‎2008 Mar 25 2:21 PM
hi Dakota,
you have to write back the modified data from the work area to the internal table:
MODIFY <GT_TABLE> FROM <DYN_TABLE> INDEX g_index.
(please note you coded READ TABLE ... INTO and not READ TABLE ... ASSIGNING )
hope this helps
ec
‎2008 Mar 25 2:21 PM
hi Dakota,
you have to write back the modified data from the work area to the internal table:
MODIFY <GT_TABLE> FROM <DYN_TABLE> INDEX g_index.
(please note you coded READ TABLE ... INTO and not READ TABLE ... ASSIGNING )
hope this helps
ec
‎2008 Mar 25 2:22 PM
Hello
It seems that there is an additional MODIFY required:
read table <GT_TABLE> index g_index into <DYN_TABLE> .
CONCATENATE 'COL' WA_BSIK-BUDAT(4) WA_BSIK-BUDAT+4(2) INTO FIELD1.
ASSIGN COMPONENT FIELD1 OF STRUCTURE <DYN_TABLE> TO <F_FS>.
IF WA_BSIK-SHKZG = 'H'.
<F_FS> = <F_FS> + WA_BSIK-DMBTR * ( -1 ) .
ELSE.
<F_FS> = <F_FS> + WA_BSIK-DMBTR .
ENDIF.
" Apparently <DYN_TABLE> has the modified value.
" Next update <GT_TABLE>:
MODIFY <gt_table> FROM <dyn_table> INDEX g_index.
Regards
Uwe
‎2008 Mar 25 2:38 PM