Skip to content

Commit

Permalink
Update BW on HANA search
Browse files Browse the repository at this point in the history
  • Loading branch information
mbtools committed Apr 13, 2021
1 parent 666af9c commit 71ad6ab
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/#mbtools#cl_command.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@ CLASS /mbtools/cl_command IMPLEMENTATION.
METHOD select_bw_hana.

DATA:
lr_data TYPE REF TO data,
lv_subrc TYPE sy-subrc.
lr_data TYPE REF TO data,
lv_subrc TYPE sy-subrc.

FIELD-SYMBOLS:
<lt_where_attributes> TYPE ANY TABLE,
Expand All @@ -611,9 +611,9 @@ CLASS /mbtools/cl_command IMPLEMENTATION.
<lv_object> TYPE any,
<lv_sel_name> TYPE any.

CREATE DATA lr_data TYPE TABLE OF ('RSOS_S_SEARCH_ATTRIBUTE').
CREATE DATA lr_data TYPE ('RSOS_S_SEARCHATTRIBUTE').
ASSIGN lr_data->* TO <ls_search_attributes>.
CREATE DATA lr_data TYPE TABLE OF ('RSOS_T_SEARCH_ATTRIBUTE').
CREATE DATA lr_data TYPE ('RSOS_T_SEARCH_ATTRIBUTE').
ASSIGN lr_data->* TO <lt_search_attributes>.

ASSIGN COMPONENT 'ATTRIBUTENM' OF STRUCTURE <ls_search_attributes> TO <lv_field> ##SUBRC_OK.
Expand All @@ -622,17 +622,28 @@ CLASS /mbtools/cl_command IMPLEMENTATION.
<lv_field> = abap_true.
INSERT <ls_search_attributes> INTO TABLE <lt_search_attributes>.

CREATE DATA lr_data TYPE TABLE OF ('RSOS_S_WHEREATTRIBUTE').
CREATE DATA lr_data TYPE ('RSOS_S_WHEREATTRIBUTE').
ASSIGN lr_data->* TO <ls_where_attributes>.
CREATE DATA lr_data TYPE TABLE OF ('RSOS_T_WHEREATTRIBUTE').
CREATE DATA lr_data TYPE ('RSOS_T_WHEREATTRIBUTE').
ASSIGN lr_data->* TO <lt_where_attributes>.

LOOP AT iv_sel_objects ASSIGNING <ls_sel_objects>.
MOVE-CORRESPONDING <ls_sel_objects> TO <ls_where_attributes>.
ASSIGN COMPONENT 'ATTRIBUTENM' OF STRUCTURE <ls_where_attributes> TO <lv_field> ##SUBRC_OK.
<lv_field> = 'TLOGO'.
INSERT <ls_where_attributes> INTO TABLE <lt_where_attributes>.
ENDLOOP.

ASSIGN COMPONENT 'ATTRIBUTENM' OF STRUCTURE <ls_where_attributes> TO <lv_field> ##SUBRC_OK.
<lv_field> = 'OBJVERS'.
ASSIGN COMPONENT 'SIGN' OF STRUCTURE <ls_where_attributes> TO <lv_field> ##SUBRC_OK.
<lv_field> = 'I'.
ASSIGN COMPONENT 'OPTION' OF STRUCTURE <ls_where_attributes> TO <lv_field> ##SUBRC_OK.
<lv_field> = 'EQ'.
ASSIGN COMPONENT 'LOW' OF STRUCTURE <ls_where_attributes> TO <lv_field> ##SUBRC_OK.
<lv_field> = 'A'.
INSERT <ls_where_attributes> INTO TABLE <lt_where_attributes>.

CALL METHOD io_search->('SEARCH')
EXPORTING
i_search_term = iv_obj_name
Expand Down

0 comments on commit 71ad6ab

Please sign in to comment.