‎2006 Jun 15 3:39 PM
Hello,
Im reading the documentation on ->* operator, and dont really understand how it works, can any body tell me its functionality?
Thanks
Gabriel P.
‎2006 Jun 15 3:46 PM
What it does, it takes the underlying DATA object from a dynamically created a element, and assigns that to the data element. Other wise there is no way dealing with the dynamically created object.
Regards,
Ravi
‎2006 Jun 15 3:40 PM
Basically it is a deferencing operator. It is used for refering an anonymus object of any type.
Check this piece of code
DATA: gt_dyn_table TYPE REF TO data,
gs_dyn_line TYPE REF TO data.
FIELD-SYMBOLS: <fs_quota> TYPE STANDARD TABLE,
<fs_amount>,
<fs_quota_wa>.
*Create dynamic internal table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = gt_fldcat
IMPORTING
ep_table = gt_dyn_table.
ASSIGN gt_dyn_table->* TO <fs_quota>.
CREATE DATA gs_dyn_line LIKE LINE OF <fs_quota>.
ASSIGN gs_dyn_line->* TO <fs_quota_wa>.
Thanks,
Message was edited by: Naren Somen
‎2006 Jun 15 3:46 PM
What it does, it takes the underlying DATA object from a dynamically created a element, and assigns that to the data element. Other wise there is no way dealing with the dynamically created object.
Regards,
Ravi
‎2006 Jun 15 4:00 PM
Hi,
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = t_fieldcat
IMPORTING
ep_table = r_dyn_table
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Get access to new table using field symbol.
ASSIGN r_dyn_table->* TO <t_dyn_table>.
* Create work area for new table.
CREATE DATA r_wa_dyn_table LIKE LINE OF <t_dyn_table>.
* Get access to new work area using field symbol.
ASSIGN r_wa_dyn_table->* TO <wa_dyn_table>.
Regards
Vijay