Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
balakrishna_vegi2
Participant
2,890
Purpose : MDG Search BP - Enhance Search Result List

 

Business Scenario: MDG Search BP - Enhance Search Result List adding fields Account Group and Grouping Description.

 

Fiori App



 

Build


Component Configuration

BS_BP_QUERY_RESULT

 

Add  Account grouping and Grouping description fields to the list


 
Now populating the data for these two fields Account grouping and Grouping Text  use the feeder class CL_BS_BP_QUERY_RESULT  Method IF_FPM_GUIBB_LIST~GET_DATAenhancement.

 



*>> Added field grouping in search result list
FIELD-SYMBOLS : <lfs_data> type table,
<lfs_s_data> type any,
<lfs_group> type bu_group,
<lfs_grp_txt> type any,
<lfs_grp> type any.
data : lv_bp_group type bu_group.
types : begin of lty_grp_descr,
bu_group type tb002-bu_group,
txt40 type tb002-txt40,
end of lty_grp_descr.
data : lt_grp_descr type standard table of lty_grp_descr,
ls_grp_descr type lty_grp_descr.
*>> begin of logic
if iv_eventid->mv_event_id eq 'FPM_EXECUTE_SEARCH' or
iv_eventid->mv_event_id eq 'DONOTHING'.
*>> populate Description and BP Groping
refresh lt_grp_descr. clear ls_grp_descr.
SELECT BU_GROUP
txt40
into table lt_grp_descr
from tb002 where spras = sy-langu.
ASSIGN ct_data to <lfs_data>.
loop at <lfs_data> assigning <lfs_s_data>.
ASSIGN COMPONENT 'PARTNER' of STRUCTURE <lfs_s_data> to <fv_partner>.
if sy-subrc eq 0 and <fv_partner> is assigned.
clear lv_bp_group.
select single bu_group from but000 into lv_bp_group
where partner = <fv_partner>.
if sy-subrc eq 0.
ASSIGN COMPONENT 'GROUPING' of STRUCTURE <lfs_s_data> to <lfs_grp>.
if sy-subrc eq 0 and <lfs_grp> is assigned and <lfs_grp> is initial.
<lfs_grp> = lv_bp_group.
endif.
endif.
ASSIGN COMPONENT 'GROUPING__TXT' of STRUCTURE <lfs_s_data> to <lfs_grp_txt>.
if sy-subrc eq 0 and <lfs_grp_txt> is assigned and <lfs_grp_txt> is initial and lt_grp_descr[] is not initial.
read table lt_grp_descr into ls_grp_descr with key bu_group = lv_bp_group BINARY SEARCH.
if sy-subrc eq 0.
<lfs_grp_txt> = ls_grp_descr-txt40.
elseif lv_bp_group is initial.
ASSIGN COMPONENT 'GROUPING' of STRUCTURE <lfs_s_data> to <lfs_grp>.
if sy-subrc eq 0 and <lfs_grp> is assigned and <lfs_grp> is not initial.
read table lt_grp_descr into ls_grp_descr with key bu_group = <lfs_grp> BINARY SEARCH.
if sy-subrc eq 0.
<lfs_grp_txt> = ls_grp_descr-txt40.
endif.
endif.
endif.
endif.
endif.
endloop.
endif.

ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
ENDMETHOD.

Result

 


 

Conclusion : Now successfully enhanced/extended MDG BP Search Result list
Labels in this area