field-symbols: type ANY.

时间:2023-03-09 05:59:32
field-symbols: <ATTR> type ANY.

field-symbols: type ANY.

* importing iv_root_list type refer to if_genil_cont_root_objectlist

   DATA lv_root        TYPE REF TO if_genil_cont_root_object.  "IF_GENIL_CONT_ROOT_OBJECTLIST is an interface
   DATA lv_key         TYPE zattr_cust_key.
   DATA lv_cust_att  TYPE zattr_cust.

* Get the first object of data container.

   lv_root = iv_root_list->get_first( ).      "iv_root_list  type refer to  IF_GENIL_CONT_ROOT_OBJECTLIST ,
                                              "get_first() will return to a object which implementIF_GENIL_CONT_ROOT_OBJECTLIST

*    data items TYPE REF TO IF_GENIL_CONTAINER_OBJECTLIST.  " container object list.
*   items = lv_root->GET_RELATION(         "acquire the relation.
*    iv_relation_name = 'Item_Rel'
*    iv_as_copy = abap_ture ).
*
*
*    data item TYPE REF TO IF_GENIL_CONTAINER_OBJECT.
*   item = items->get_first( ).  "get the first object

*    data shiptos TYPE REF TO IF_GENIL_CONTAINER_OBJECTLIST.
*    shiptos = item->GET_RELATION( iv_relation_name = 'ShipTo_Rel'
*                        iv_as_copy = abap_true ).
  method IF_GENIL_APPL_INTLAY~GET_DYNAMIC_QUERY_RESULT.
*CALL METHOD SUPER->IF_GENIL_APPL_INTLAY~GET_DYNAMIC_QUERY_RESULT
*  EXPORTING
*    IV_QUERY_NAME           =
*    IS_QUERY_PARAMETERS     =
*    IT_SELECTION_PARAMETERS =
*    IV_ROOT_LIST            =
**    IS_REQUEST_OBJECT       =
*    .
    data: lr_msg_cont type ref to cl_crm_genil_global_mess_cont,
          lv_num_hits type i,
          lt_results type ZATTR_CUST__KEY_TAB,
          lv_max_hits type char5,
          lv_max_hits_tmp type int4,
          lr_root_object type ref to if_genil_cont_root_object,
          lt_request_obj type crmt_request_obj_tab.

    field-symbols: <fs_results> type ZATTR_CUST_KEY.
* Retrieve the message container to log eventual messages
    " breakpoint in GET_DYNAMIC_QUERY_RESULT.
    lr_msg_cont = iv_root_list->get_global_message_container( ).