‎2008 May 06 11:56 AM
Hi
I am writing code in one BADI implementation for production order release.
i am using BAPI_PRODORD_SETUSERSTATUS to change the user status of production order. but it refreshes all the dynamic internal tables used by the production order program.
but i need data in the dynamic internal tables. cAn anybody suggest me how to populate data in dynamic internal tables?
is there any Function Module to populate them?
vennila.
‎2008 May 06 12:39 PM
Hi Vennila,
I don't think so there is any FM to populate data into internal table.
try following syntax to populate the data.
Create a dynamic internal table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lit_fldcat
IMPORTING
ep_table = git_new_table.
ASSIGN git_new_table->* TO <gfs_dynamic>.
Create dynamic work area and assign to FS
CREATE DATA git_new_line LIKE LINE OF <gfs_dynamic>.
ASSIGN git_new_line->* TO <gfs_dyn_wa>.
FIELD-SYMBOLS: <lv_fs_column>.
LOOP AT git_final INTO gwa_final.
BOM Number
lv_index = 1.
ASSIGN COMPONENT lv_index OF STRUCTURE <gfs_dyn_wa> TO <lv_fs_column>.
<lv_fs_column> = gwa_final-bom .
BOM Description
lv_index = lv_index + 1.
APPEND <gfs_dyn_wa> TO <gfs_dynamic>.
CLEAR <gfs_dyn_wa>.
ENDLOOP.
Hope this helps.
Regards,
Rahul
‎2008 Jul 07 11:53 PM
hi,
sorry me ..
is possible refresh also the 'structure' of a dynamic table, by new katalog ??