12-05-2015 11:46 AM
Hi Colleagues,
I write an enhancement.
The tx creates an ALV list. My enhancement in the same tx must determine the selected lines from the list. After creating the list I need the name from ALV, I want to store it with EXPORT and to read it in the enhancement with IMPORT. But EXPORT isn't possible because the value has TYPE REF ... Do You have any suggestions to make EXPORT / IMPORT possible ?
Thanks a lot for Your help !
Peter
12-05-2015 12:16 PM
12-05-2015 12:34 PM
Hi Ebrahim,
yes.
The list in the tx will be produced with the command
CALL METHOD grid1->set_table_for_first_display
and I'd like to export / import grid1. It is an enhancement for the same tx.
12-05-2015 12:45 PM
Hi Peter,
I don't think that you can export an object which ref to a class, but you can create a class with attribute which is ref to cl_gui_alv_grid .
Your_Class=>mr_grid = grid1.
or you can try to read about ABAP Shared Memory Objects
Regards
Ebrahim
12-05-2015 1:28 PM
Hi Peter,
you can use assign dirty to assign the object
PERFORM ('SUB_1') in PROGRAM ZIBO_PG_DYNAMIC_PRG2 if FOUND.
ASSIGN ('(ZIBO_PG_DYNAMIC_PRG2)lr_grid') to <lr_grid>.
<lr_grid> = o_grid_sob.
REPORT ZIBO_PG_DYNAMIC_PRG2.
data lr_grid TYPE REF TO cl_gui_alv_grid.
data lr_cust TYPE REF TO cl_gui_custom_container.
FORM sub_1.
CREATE OBJECT lr_grid
EXPORTING i_parent = lr_cust.
write:/ 'SUBROUTINE2 Sub1 wurde aufgerufen '.
lv_iscalled = abap_true.
ENDFORM.
Regards
Ebrahim
12-06-2015 10:34 AM
You can try to serialize alv. Or export just data table and fieldcatalog table.