Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

EXPORT / IMPORT value TYPE REF

Former Member
0 Kudos

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

5 REPLIES 5

former_member184158
Active Contributor
0 Kudos

Hi

you mean to export / import an object?

0 Kudos

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.

0 Kudos

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

0 Kudos

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

former_member210008
Active Participant
0 Kudos

You can try to serialize alv. Or export just data table and fieldcatalog table.