Display recursive tree expanded upto element level
Hi all,
I have created a Recursive tree. I want to show expanded tree upto element level. I saw EXPAND_INTO_ELEMENT mehod of IF_WD_TABLE_METHOD_HNDL and SET_ON_EXPAND_ALL from class cl_wd_tree. Is it useful for me.
Please suggest how it works for me.
Thanks
Sanket
Any suggestions.
Similar Messages
-
Selection of elements in a recursive tree structure
Hello,
I have a recursive tree structure, and I am dynamically creating the child nodes as the parent nodes get expanded. The structure at runtime after expansion of the nodes would look something like this:
Node 1
---Node 1.1
Leaf 1.1.1
Leaf 1.1.2
Leaf 1.1.3
---Node 1.2
Leaf 1.2.1
Leaf 1.2.2
Node 2
---Node 2.1
Leaf 2.1.1
---Node 2.2
Leaf 2.2.1
Leaf 2.2.2
When I select an item, say Leaf 1.1.1, that item gets highlighted. Now, when I select another node, say Node 2.1, that item gets highlighted as well. The issue now is that both Leaf 1.1.1 and Node 2.1 are highlighted, although I want only the latest selection to be highlighted.
I have the following settings on my context node of the tree:
Initialization Lead Selection = False
Singleton = False
Selection = 0..1
How can I get only the latest selection to be highlighted on the tree?Hi Venkatramanan,
You are right - the lead selection works perfectly, and it is just an issue with the appearance. But even so, I would like to know if there is some way to control the visual highlighting of the nodes. The main cause of concern is that for a user, if he selects leaf 1 first, and then leaf 2 (from another node) next, both are highlighted, and there is no way to know which one is really selected.
I did look at the component WDR_TEST_EVENTS. The dyn-load recursive tree does not appear to have this problem, but I could not find any special handling in the code.
One more thing: I have the ignoreAction attribute set to true for all the parent nodes. The leaves have this attribute set to false, so they can be selected. But this does not seem to help with the highlighting issue.
Thanks,
Kamal -
Regarding ALV ( To be displayed in Tree Format)
Hi all,
I am working on a ALV report which is to be displayed in Tree Structure . I found some demo programs within SAP .. but do we have an Alternative .. all those Demos use OOPS concept .. Can this Report be done without using OOPS in ALV.
Please Suggest.
Thanks & Regards
SrinivasHi,
This is a ALV Report with tree structure.
report zwmr_pick_status_report no standard page heading
message-id zw.
Type Pools *
type-pools: icon, slis.
Tables *
tables: tvst,
likp,
t30b,
vekp,
zpallettr,
zvantr.
Types *
types:
begin of ty_data,
lgtor like likp-lgtor, " door
vbeln like likp-vbeln, " delivery
wbstk like vbuk-wbstk, " Goods movement status
kostk like vbuk-kostk, " Picking status
posnr like lips-posnr, " item
route like likp-route, " route
wadat like likp-wadat, " goods issue date
lvsta like vbup-lvsta, " warehouse status
packvorschr like vekp-packvorschr, " pack mnemonic
exidv like vekp-exidv, " handling unit
zpallet_no(10), "like zpallettr-zpallet_no, " pallet no
zcount_check like zpallettr-zcount_check," count check flag
zvan_no(10), "like zvantr-zvan_no, " van no
zvan_print like zvantr-zvan_print, " van manifest print
zeod_print like zvantr-zeod_print, " eod manifest print
zzpackclass like vekp-zzpackclass, " package class
zzti like vekp-zzti, " T.I. value
end of ty_data.
Data *
ranges: r_del for likp-vbeln,
r_lgtor for likp-lgtor.
ranges: r_vanno for zvantr-zvan_no,
r_palno for zpallettr-zpallet_no.
data: begin of number_range occurs 0,
mark(1),
id(3),
num(10) type n,
desc like zpalletmd-zdesc,
end of number_range.
data: t_disp_tab type standard table of zpickdisp,
t_data_tab type ty_data occurs 0 with header line,
t_disp_head type standard table of zpickhead.
data: w_numrnge like number_range,
w_number(10) type n.
data: t_likp like likp occurs 0 with header line,
t_lips like lips occurs 0 with header line,
t_vbuk like vbuk occurs 0 with header line,
t_vbup like vbup occurs 0 with header line,
t_vepo like vepo occurs 0 with header line,
t_vekp like vekp occurs 0 with header line,
t_vantr like zvantr occurs 0 with header line,
t_pallettr like zpallettr occurs 0 with header line,
w_likp like likp,
w_lips like lips,
w_vbuk like vbuk,
w_vbup like vbup,
w_vepo like vepo,
w_vekp like vekp.
ALV DATA *****
data:
g_grid type ref to cl_gui_alv_grid,
g_sort type slis_t_sortinfo_alv,
g_custom_container type ref to cl_gui_custom_container,
g_layout type slis_layout_alv,
gt_fieldcat type slis_t_fieldcat_alv,
t_fldcat like line of gt_fieldcat,
g_keyinfo type slis_keyinfo_alv,
gt_events type slis_t_event,
gs_event type slis_alv_event,
w_sy_repid like sy-repid.
data: begin of seltab occurs 0.
include structure rsparams.
data: end of seltab.
SYSTEM GENERATED TABLE CONTROL DATA ********
DECLARATION OF TABLECONTROL 'TC_TABCON' ITSELF
controls: tc_tabcon type tableview using screen 0100.
LINES OF TABLECONTROL 'TC_TABCON'
data: g_tc_tabcon_lines like sy-loopc.
data: ok_code like sy-ucomm.
Constants *
constants: c_data_class like klah-class value 'DG_DATA',
c_mat_class like rmclf-klart value '001',
c_pack like lips-mtart value 'VERP',
c_a(1) value 'A',
c_b(1) value 'B',
c_c(1) value 'C',
c_yes(1) value 'X',
c_no(1) value ' '.
Selection screen *
standard report select options block
selection-screen begin of block a with frame title text-002.
select-options:
s_wadat for likp-wadat no-extension obligatory. " Goods Issue Date
*parameters: "TR01-
p_vstel like tvst-vstel obligatory. " Shipping Point "TR01-
select-options: "TR01+
p_vstel for tvst-vstel. " Shipping Point "TR01+
select-options:
s_lfart for likp-lfart, " Delivery type
s_lgtor for t30b-lgtor, " Door selection
s_exidv for vekp-exidv, " Handling Unit
s_vbeln for likp-vbeln. " Delivery
parameters:
p_exdata as checkbox. " Show extra columns flag
selection-screen end of block a.
van/pallet specific select options block
selection-screen begin of block b with frame title text-001.
select-options:
s_palno for zpallettr-zpallet_no, " no-extension,
s_vanno for zvantr-zvan_no. " no-extension.
selection-screen end of block b.
Value Request Events *
at selection-screen on value-request for s_palno-low.
clear: number_range, w_number .
refresh number_range.
select numbers and display pop up screen for selection
perform select_pal_nos.
s_palno-low = w_number.
at selection-screen on value-request for s_palno-high.
clear: number_range, w_number .
refresh number_range.
select numbers and display pop up screen for selection
perform select_pal_nos.
s_palno-high = w_number.
at selection-screen on value-request for s_vanno-low.
clear: number_range, w_number .
refresh number_range.
select numbers and display pop up screen for selection
perform select_van_nos.
s_vanno-low = w_number.
at selection-screen on value-request for s_vanno-high.
clear: number_range, w_number .
refresh number_range.
select numbers and display pop up screen for selection
perform select_van_nos.
s_vanno-high = w_number.
At Selection Screen *
at selection-screen.
perform validate_selections.
Initialization *
initialization.
Start of selection *
start-of-selection.
clear all data tables
clear: t_likp,
t_lips,
t_vbuk,
t_vbup,
t_vepo,
t_vantr,
t_pallettr,
w_likp,
w_lips,
w_vbuk,
w_vbup,
w_vepo,
w_vekp.
refresh: t_likp,
t_lips,
t_vbuk,
t_vbup,
t_vepo,
t_vantr,
t_pallettr.
select data for ALV
due to different input parameters being used, to streamline the data
selection process, different selection methods are required
if not s_vanno is initial
or not s_palno is initial.
if selecting by van/pallet number, need to select the data from the
handling unit upwards to delivery
perform select_data_up.
else.
otherwise the data can be selected from the delivery downwards
perform select_data_down.
endif.
End of selection *
end-of-selection.
call hierarchical ALV display function module
call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
exporting
i_callback_program = 'ZWMR_PICK_STATUS_REPORT'
i_callback_pf_status_set = 'SET_STATUS'
i_callback_user_command =
'USER_COMMAND' "custom gui status form
is_layout = g_layout "user command form
it_fieldcat = gt_fieldcat
it_sort = g_sort
it_events = gt_events
i_tabname_header = 't_disp_head'
i_tabname_item = 't_disp_tab'
i_structure_name_header = 'ZPICKHEAD'
i_structure_name_item = 'ZPICKDISP'
is_keyinfo = g_keyinfo
tables
t_outtab_header = t_disp_head
t_outtab_item = t_disp_tab.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
FORMS *
Includes inserted by Screen Painter Wizard. DO NOT CHANGE THIS LINE!
include zwmr_pick_status_reporto01 .
include zwmr_pick_status_reporti01 .
include zwmr_pick_status_reportf01 .
*& Form select_pal_nos
select pallet numbers for search help
form select_pal_nos.
data: begin of t_palno occurs 0,
zpallet_no like zpallettr-zpallet_no,
end of t_palno.
select all available pallet numbers
select distinct zpallet_no from zpallettr
into corresponding fields of table t_palno.
loop at t_palno.
get pallet id
select single zpallet_id from zpallettr
into number_range-id
where zpallet_no = t_palno-zpallet_no.
get pallet description
select single zdesc from zpalletmd
into number_range-desc
where zpallet_id = number_range-id.
number_range-num = t_palno-zpallet_no.
append to search help table
append number_range.
endloop.
call pop up dialog box
call screen 0100 starting at 5 5.
endform. " select_pal_nos
*& Form select_van_nos
select van numbers for search help
form select_van_nos.
data: begin of t_vanno occurs 0,
zvan_no like zvantr-zvan_no,
end of t_vanno.
select available van numbers
select distinct zvan_no from zvantr
into corresponding fields of table t_vanno.
loop at t_vanno.
select van id
select single zvan_id from zvantr
into number_range-id
where zvan_no = t_vanno-zvan_no.
select van description (maintained in pallet tables)
select single zdesc from zpalletmd
into number_range-desc
where zpallet_id = number_range-id.
number_range-num = t_vanno-zvan_no.
append to search help table
append number_range.
endloop.
call pop up dialog box
call screen 0100 starting at 5 5.
endform. " select_van_nos
*& Form select_data_down
select data if selecting from delivery down
form select_data_down.
select all deliveries from LIKP that fulfill selection criteria
select * from likp into table t_likp
where vbeln in s_vbeln
and vstel eq p_vstel "TR01-
and vstel in p_vstel
and lgtor in s_lgtor
and wadat in s_wadat
and lfart in s_lfart.
if sy-subrc ne 0.
no data found
message i007.
exit.
endif.
if not t_likp[] is initial.
select sales document headers from VBUK
select * from vbuk into table t_vbuk
for all entries in t_likp
where vbeln eq t_likp-vbeln.
select all relevant delivery items from LIPS
select * from lips into table t_lips
for all entries in t_likp
where vbeln eq t_likp-vbeln
and pstyv ne 'ZPAC'
and pstyv ne 'ZGDP' "TR02+
and lfimg gt 0. "TR01+
endif.
if not t_lips[] is initial.
select all sales document line items from VBUP
select * from vbup into table t_vbup
for all entries in t_lips
where vbeln eq t_lips-vbeln
and posnr = t_lips-posnr.
select corresponding handling unit ID's (venum)
TR03 Replace start
select * from vepo appending corresponding fields of table t_vepo
for all entries in t_lips
where vbeln = t_lips-vbeln
and posnr = t_lips-posnr
and matnr = t_lips-matnr
and charg = t_lips-charg.
select * from vepo
inner join vekp on vepovenum = vekpvenum
appending corresponding fields of table t_vepo
for all entries in t_lips
where vepo~vbeln = t_lips-vbeln
and vepo~posnr = t_lips-posnr
and vepo~matnr = t_lips-matnr
and vepo~charg = t_lips-charg
and vekp~exidv in s_exidv.
TR03 Replace end
endif.
build process table
perform move_to_table.
endform. "select_data_down
*& Form select_data_up
select data if selecting from van/pallet up
form select_data_up.
if not s_vanno is initial.
if van then select van numbers and hence pallet numbers
select * from zvantr into table t_vantr
where zvan_no in s_vanno.
and vstel eq p_vstel."TR01-
if not t_vantr[] is initial.
select * from zpallettr into table t_pallettr
for all entries in t_vantr
where zpallet_no eq t_vantr-zpallet_no.
and vstel eq p_vstel."TR01-
endif.
else.
otherwise can get pallet numbers directly
select * from zpallettr into table t_pallettr
where zpallet_no in s_palno.
and vstel eq p_vstel."TR01-
endif.
if not t_pallettr[] is initial.
from the pallet nos. we can select the handling units
select * from vekp into table t_vekp
for all entries in t_pallettr
where exidv eq t_pallettr-exidv
and exidv ne space
and exidv in s_exidv "TR03+
and ( exida = 'E' "TR01+
or exida = 'F' ). "TR01+
endif.
if not t_vekp[] is initial.
build vbeln range from t_vekp.
loop at t_vekp.
r_del-sign = 'I'.
r_del-option = 'EQ'.
r_del-low = t_vekp-vpobjkey.
append r_del.
endloop.
select all deliveries from LIKP that correspond to HU's
select * from likp into table t_likp
where vbeln in r_del
and wadat in s_wadat
and lfart in s_lfart.
endif.
if not t_likp[] is initial.
select sales document headers from VBUK
select * from vbuk into table t_vbuk
for all entries in t_likp
where vbeln eq t_likp-vbeln.
select all relevant delivery items from LIPS
select * from lips into table t_lips
for all entries in t_likp
where vbeln eq t_likp-vbeln
and pstyv ne 'ZPAC'
and pstyv ne 'ZGDP' "TR02+
and lfimg gt 0. "TR01+
endif.
if not t_lips[] is initial.
select all sales document line items from VBUP
select * from vbup into table t_vbup
for all entries in t_lips
where vbeln eq t_lips-vbeln
and posnr = t_lips-posnr.
select corresponding handling unit ID's (venum)
select * from vepo appending corresponding fields of table t_vepo
for all entries in t_lips
where vbeln = t_lips-vbeln
and posnr = t_lips-posnr
and matnr = t_lips-matnr
and charg = t_lips-charg.
endif.
build process table
perform move_to_table.
endform. "select_data_up
*& Form move_to_table
move data to processing table
form move_to_table.
loop at t_vepo.
clear t_data_tab.
delivery lines.
clear w_lips.
read table t_lips with key vbeln = t_vepo-vbeln
posnr = t_vepo-posnr
into w_lips.
move-corresponding w_lips to t_data_tab.
sales document line items
clear w_vbup.
read table t_vbup with key vbeln = t_vepo-vbeln
posnr = t_vepo-posnr
into w_vbup.
if w_vbup-kosta = space. "TR01-
not relevant for picking
delete t_vepo. "TR01-
continue. "TR01-
else. "TR01-
move-corresponding w_vbup to t_data_tab.
endif. "TR01-
sales doc header
clear w_vbuk.
read table t_vbuk with key vbeln = t_vepo-vbeln
into w_vbuk.
move-corresponding w_vbuk to t_data_tab.
delivery header
clear w_likp.
read table t_likp with key vbeln = t_vepo-vbeln
into w_likp.
move-corresponding w_likp to t_data_tab.
select handling unit info using vepo entry
clear w_vekp.
if t_vekp[] is initial.
select single * from vekp into w_vekp
where venum = t_vepo-venum.
else.
read table t_vekp with key venum = t_vepo-venum
into w_vekp.
if sy-subrc ne 0.
select single * from vekp into w_vekp
where venum = t_vepo-venum.
endif.
endif.
move-corresponding w_vekp to t_data_tab.
select pallet / van load information
select single zpallet_no zcount_check from zpallettr
into (t_data_tab-zpallet_no,
t_data_tab-zcount_check)
where exidv eq w_vekp-exidv.
if not t_data_tab-zpallet_no in s_palno. "TR01+
continue. "TR01+
endif. "TR01+
if sy-subrc = 0.
select single zvan_no zvan_print zeod_print from zvantr
into (t_data_tab-zvan_no,
t_data_tab-zvan_print,
t_data_tab-zeod_print)
where zpallet_no eq t_data_tab-zpallet_no.
if not t_data_tab-zvan_no in s_vanno. "TR01+
continue. "TR01+
endif. "TR01+
endif.
append t_data_tab.
endloop.
*-----> TR01+ start
If the delivery has yet to be packed, then need to include in report
Thus delete t_lips here and if any entries left after looping through
t_vepo, these will also need to be added to t_data_tab
if the selection is by handling unit though we do not want these"TR03+
if s_exidv is initial. "TR03+
loop at t_vepo.
read table t_lips with key vbeln = t_vepo-vbeln
posnr = t_vepo-posnr.
if sy-subrc = 0.
delete t_lips index sy-tabix.
endif.
endloop.
if not t_lips[] is initial.
move any unpacked items to the data table
perform move_lips_to_table.
endif.
endif. "TR03+
*<---- TR01+ End
get relevant status icons
perform select_icons.
prepare ALV data
perform prepare_alv.
endform. " select_data
*& Form select_icons
select icons for display and move data to display table
form select_icons.
data: w_disp_tab like zpickdisp,
w_disp_head like zpickhead,
w_color like zpickdisp-color,
ov_icon like zpickdisp-ov_icon,
gi_icon like zpickdisp-gi_icon,
to_icon like zpickdisp-to_icon,
lp_icon like zpickdisp-lp_icon,
pc_icon like zpickdisp-pc_icon,
lv_icon like zpickdisp-lv_icon,
vm_icon like zpickdisp-vm_icon,
em_icon like zpickdisp-em_icon,
t_ovst_tab like t_disp_tab with header line.
constants: c_col1(3) value 'C10',
c_col2(3) value 'C20'.
sort t_data_tab by lgtor vbeln.
w_color = c_col2.
loop at t_data_tab.
at new lgtor.
fill ALV header table
clear w_disp_head.
w_disp_head-lgtor = t_data_tab-lgtor.
append w_disp_head to t_disp_head.
endat.
goods issue status & overall amber/green only
case t_data_tab-wbstk.
when c_c.
move icon_green_light to gi_icon.
move icon_green_light to ov_icon.
when others.
move icon_red_light to gi_icon.
move icon_yellow_light to ov_icon.
endcase.
transfer order status
case t_data_tab-lvsta.
when c_a.
move icon_red_light to to_icon.
when c_b.
move icon_yellow_light to to_icon.
when c_c.
move icon_green_light to to_icon.
when space.
write N/A
to_icon = 'N/A'.
endcase.
loaded to pallet status
if not t_data_tab-zpallet_no is initial.
move icon_green_light to lp_icon.
else.
move icon_red_light to lp_icon.
endif.
pallet count status
if not t_data_tab-zcount_check is initial.
move icon_green_light to pc_icon.
else.
move icon_red_light to pc_icon.
endif.
loaded to van status
if not t_data_tab-zvan_no is initial.
move icon_green_light to lv_icon.
else.
move icon_red_light to lv_icon.
endif.
van manifest status
if not t_data_tab-zvan_print is initial.
move icon_green_light to vm_icon.
else.
move icon_red_light to vm_icon.
endif.
end of day manifest status
if not t_data_tab-zeod_print is initial.
move icon_green_light to em_icon.
else.
move icon_red_light to em_icon.
endif.
move working data table to display table
move-corresponding t_data_tab to w_disp_tab.
w_disp_tab-ov_icon = ov_icon.
w_disp_tab-gi_icon = gi_icon.
w_disp_tab-to_icon = to_icon.
w_disp_tab-lp_icon = lp_icon.
w_disp_tab-pc_icon = pc_icon.
w_disp_tab-lv_icon = lv_icon.
w_disp_tab-vm_icon = vm_icon.
w_disp_tab-em_icon = em_icon.
w_disp_tab-color = w_color.
fill N/A values for initial fields for display
if w_disp_tab-packvorschr is initial.
w_disp_tab-packvorschr = 'N/A'.
endif.
if w_disp_tab-exidv is initial.
w_disp_tab-exidv = 'N/A'.
endif.
if w_disp_tab-zpallet_no is initial.
write 'N/A' to w_disp_tab-zpallet_no.
endif.
if w_disp_tab-zvan_no is initial.
write 'N/A' to w_disp_tab-zvan_no.
endif.
display different color for new doc number
at end of vbeln.
if w_color = c_col1.
w_color = c_col2.
elseif w_color = c_col2.
w_color = c_col1.
endif.
endat.
append w_disp_tab to t_disp_tab.
clear w_disp_tab.
endloop.
we have all the icons in display but need to check the overall status
as this refers to the line items
green and amber statuses already set and use the same criteria as the
goods issue status unless detected as red here
data: ov_stat_red(1).
clear w_disp_tab.
sort t_disp_tab by vbeln.
loop at t_disp_tab into w_disp_tab.
at new vbeln.
check all line items for delivery
loop at t_data_tab where vbeln = w_disp_tab-vbeln.
if t_data_tab-lvsta = c_a.
set overall status to red
ov_stat_red = c_yes.
exit.
else.
leave green/amber status icon as previosly determined
endif.
endloop.
if ov_stat_red = c_yes.
set overall status to red for all items in that delivery
clear ov_stat_red.
move icon_red_light to w_disp_tab-ov_icon.
modify t_disp_tab from w_disp_tab transporting ov_icon
where vbeln = w_disp_tab-vbeln.
endif.
endat.
endloop.
endform. " select_icons
*& Form fill_layout
fill ALV layout parameters
form fill_layout.
clear g_layout.
g_layout-colwidth_optimize = c_yes. " column width optimisation
g_layout-zebra = space. " alternate line colors
g_layout-box_fieldname = 'MARK'. " checkbox fieldname
g_layout-info_fieldname = 'COLOR'. " highlight row indicator
g_layout-no_vline = space. " vertical line
g_layout-key_hotspot = space. " hotspot field
g_layout-f2code = 'PICK'. " F2 ok_code
g_layout-numc_sum = c_yes. " sum numc fields
g_layout-box_tabname = 't_disp_head'. " checkbox table name
g_layout-expand_fieldname = 'EXPAND'. " expand field name
endform. " fill_layout
*& Form fill_sort
fill ALV sort table
form fill_sort.
data: w_g_sort type slis_sortinfo_alv.
w_g_sort-spos = 1.
w_g_sort-fieldname = 'LGTOR'.
w_g_sort-tabname = 't_disp_tab'.
w_g_sort-up = c_yes.
append w_g_sort to g_sort.
w_g_sort-spos = 2.
w_g_sort-fieldname = 'VBELN'.
w_g_sort-tabname = 't_disp_tab'.
w_g_sort-up = c_yes.
append w_g_sort to g_sort.
w_g_sort-spos = 3.
w_g_sort-fieldname = 'POSNR'.
w_g_sort-tabname = 't_disp_tab'.
w_g_sort-up = c_yes.
append w_g_sort to g_sort.
w_g_sort-spos = 4.
w_g_sort-fieldname = 'WADAT'.
w_g_sort-tabname = 't_disp_tab'.
w_g_sort-up = c_yes.
append w_g_sort to g_sort.
endform. " fill_sort
*& Form fill_fieldcat
Fill field category structure for ALV
form fill_fieldcat.
clear t_fldcat.
create field catalogue for header table
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = 'ZWMR_PICK_STATUS_REPORT'
i_internal_tabname = 't_disp_head'
i_structure_name = 'ZPICKHEAD'
i_client_never_display = c_yes
changing
ct_fieldcat = gt_fieldcat[].
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
ceate field catalogue for items table
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = 'ZWMR_PICK_STATUS_REPORT'
i_internal_tabname = 't_disp_tab'
i_structure_name = 'ZPICKDISP'
i_client_never_display = c_yes
changing
ct_fieldcat = gt_fieldcat[].
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
modify field catalogue for this report
set no display flag if not requested on selection screen
if p_exdata ne c_yes.
t_fldcat-no_out = c_yes.
modify gt_fieldcat from t_fldcat transporting no_out
where fieldname eq 'PACKVORSCHR'
or fieldname eq 'EXIDV'
or fieldname eq 'ZPALLET_NO'
or fieldname eq 'ZVAN_NO'
or fieldname eq 'ZZPACKCLASS'
or fieldname eq 'ZZTI'.
endif.
set no display flag for item level LGTOR field
t_fldcat-no_out = c_yes.
modify gt_fieldcat from t_fldcat transporting no_out
where fieldname eq 'LGTOR'
and tabname eq 't_disp_tab'.
prevent display of technical fields
t_fldcat-tech = c_yes.
modify gt_fieldcat from t_fldcat transporting tech
where fieldname eq 'EXPAND'
or fieldname eq 'SELKZ'.
set vbeln as key
t_fldcat-key = c_yes.
modify gt_fieldcat from t_fldcat transporting key
where fieldname eq 'VBELN'.
prevent scrolling for info fields
t_fldcat-fix_column = c_yes.
modify gt_fieldcat from t_fldcat transporting fix_column
where fieldname eq 'VBELN'.
endform. " fill_fieldcat
*& Form prepare_ALV
Fill ALV parameters
form prepare_alv.
fill ALV key info
g_keyinfo-header01 = 'LGTOR'.
g_keyinfo-item01 = 'LGTOR'.
fill ALV events
gs_event-name = 'TOP_OF_PAGE'.
gs_event-form = 'TOP_OF_PAGE'.
append gs_event to gt_events.
fill ALV sort table
perform fill_sort.
fill ALV layout structure
perform fill_layout.
fill ALV field category
perform fill_fieldcat.
endform. " prepare_ALV
*& Form user_command
form called on user command from ALV list
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
data: index type i,
w_disp_head like line of t_disp_head,
w_door like likp-lgtor.
clear r_lgtor. refresh r_lgtor.
case r_ucomm.
when 'PICK'. " Double click line
when 'VANM'. " Van Manifest button
read the header table where has been selected
loop at t_disp_head into w_disp_head where mark = c_yes.
r_lgtor-sign = 'I'.
r_lgtor-option = 'EQ'.
r_lgtor-low = w_disp_head-lgtor.
append r_lgtor.
endloop.
print the van manifest
perform print_van_manifest tables r_lgtor.
when 'EODM'. " EOD Manifest button
read the header table where has been selected
loop at t_disp_head into w_disp_head where mark = c_yes.
r_lgtor-sign = 'I'.
r_lgtor-option = 'EQ'.
r_lgtor-low = w_disp_head-lgtor.
append r_lgtor.
endloop.
print the end of day manifest
perform print_eod_manifest tables r_lgtor.
when 'REFR'. "Refresh
refresh display
w_sy_repid = sy-repid.
call function 'RS_REFRESH_FROM_SELECTOPTIONS'
exporting
curr_report = w_sy_repid
tables
selection_table = seltab.
exceptions
not_found = 1
no_report = 2
others = 3.
if sy- -
Displaying ALV hierarchy at a certain level
Hi all,
I have an ALV report that shows a hierarchy. This ALV hierarchy is created using std class CL_GUI_ALV_TREE.
The number of hierarchy levels is dynamic and only determined during run time. However I would like to be able to either display all nodes expanded or only the last node unexpanded. In other words I would like to control which hierarhcy level is expanded when the report is first displayed.
Can anyone suggest a way to do this please?
ThanksIf you want to display the sum for a given hierarchy level, you should use CUBESET function.
e.g.
=IF(B2="all",CUBESET("mycube","[Location].[Location Hierarchy].[Department].&[DEPT 07]","all"),Cubemember("MyCube","[Location].[Location Hierarchy].[Department].&[DEPT 07].&["&B1&"]"))
Hope it helps. -
How to Use MRS Functionality at Activity Elements Level?
When we use Multi Resource Scheduling for resources in PS, we specify "Resource planner process" as process variant at the network header and the Resource planner node.
In the other hand, at the network operation level we are able to choose the same Process variant and the system displays the planner node to start planning; however we cannot do that when using activity elements because the icon to search the Resource planner is gray out.
How can I use MRS functionality at activity elements level?
I will appreciate your help.
Ragards,
RafaelHi Rafael...
A question were able to integrate elements activity to MRS?
Thanks
Damy Vidal -
How to only display specific members from dissimilar hierarchy levels?
Hi,
I have a Business Partner that routinely wants to build a report that displays members from dissimilar hierarchy levels. For example, she wants to display member "210_UNASSIGNED EXP/ACC" from level 8 and member "E090_ADVISOR SERVICES" from level 1. When she filters on just those two members, the reports displays as such:
She then must manually expand the "E020_CORPORATE AND EXECUTIVE" member 7 times to see "210_UNASSIGNED EXP/ACC":
Is there anyway to make her life easier and have the report display only the "210_UNASSIGNED EXP/ACC" member and the "E090_ADVISOR SERVICES" member, even though they are from different levels?
Thanks,
Michael J Titera
BI4.0 SP8.3
SQL Server 2012Hello Michael
Displaying information from mixed hierarchy levels without the context of the parent members is a reporting workflow best suited to WebI and CR. The AOLAP content can be exported as an Analysis View and then this becomes a data source for WebI and CR.
Our previous product Voyager used to allow member selection from mixed levels without the context of parent members but it caused a lot of confusion and misinterpretation of the data, which is why we deliberately do not have it in AOLAP.
Worth noting that BI4.1 was a big release for AOLAP with many enhancements. One is "Expand to Level". So instead of having to click 7 times to expand the hierarchy, it now just requires one mouse right-click to do the same thing.
Regards
Ian -
Display Recursive Columns in JTREE
I'm having a problem displaying a recursive relationship like
EmpNo & MgrNo in a Jtree to show a management hirerarchy.
I'm using JDeveloper2.0 and trying to load the model with
the data from the two columns....
Is there an example in the documentation that I could follow???
Any help would be greatly appreciated!
--RD
nullokay, I was able to access the file system and display the tree, but i still need some help.
What I did was to create a split panes and on the left side i display the file system , and when the user click on the files it should open the selected file in the right side. At this point i can display the file system on the left side , but i can not display the files. The following is the part of the code which i am working on it.
public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
if (node == null) return;
Object nodeInfo = node.getUserObject();
if (node.isLeaf()) {
i don't know what to put in side of if loop to open the selected file.
I appreciate any help or suggestions -
Menu option under recursive tree item/folder & checkbox in tree
Hi,
I want to present a checkbox next to an item or folder in a recursive tree.
I didn't see any option to do it so I tried to add a menu and a menu option type checkbox under the node item and note type.
The issue it does nothing.
Any ideas?
THanks,
ItayHi Akshay,
Everything mentioned here step by step:
0. You cannot use check-boxes inside tree, so you have to emulate them with images (or use Table with Tree-like master column -- not discussed in this message)
1. Create boolean attribute <b>isChecked</b> in node
2. Create calculated read-only string attribute cbIcon, write following in generated getter function:
return element.getIsChecked() ?
"~sapicons/b_okay.gif" : "~sapicons/b_canc.gif";
or whatever images you are using.
3. Create & bind action onAction for TreeNode / TreeItem.
-- apply parameters mapping in wdDoModifyView:
if ( firstTime )
final IWDTreeNodeType treeNode = (IWDTreeNodeType)
view.getElement("<your-tree-node-element-id>");
treeNode.mappingOfOnAction()
.addSourceMapping("path", "selectedElement");
<b>Your action must define parameter with type of your node element and name <i>selectedElement</i></b>
-- write the following code for handler:
selectedElement.setIsSelected( !selectedElement.getIsSelected() );
4. Bind cbIcon attribute as TreeNode / TreeItem image source, bind rest of attributes.
--Done.
VS -
Best way to Display a tree in Adobe Forms i.e. Classification
As I am new to Adobe interactive and do not have the experience that many of you have, I am posting a general question in that what is the best way to display a tree like structure of data in Adobe Forms so that a user can select a 'leaf' node easily.
I have looked at and coded drop downs that drive the data in the next drop down and it seems to work but it is not pretty and is a lot of work to handle the requirements for different levels of data. we have suggested that they select the Classification in a Webdynpro pop-up before they go into the form meaning that the classification will only work when they are on line. I looked briefly at using imbeded tables but they would be too big(should I look at them further?).... There could be upwards to 3000 rows in the classification table.
Example of data
Level 1
=== level 11
=== level 12
Level 2
=== Level 21
Level 3
=== Level 31
====== Level 311
====== Level 312
Thanks in advance for any ideas and learnings you may have.
GlennAfter talking to a number of people, I have determined the best way is to use dynamic dropdown lists to show the hierarchy.
Glenn -
Accordion creationPolicy="all" effect on tree expand
facing very strange problem
i have placed 2-3 tree component inside Accordion container.
On each tree's creationComplete i called function to expand first level.
when I set creationPolicy of Accordion to "all", tree expand is not working.
and if I removed creationPolicy from Accordion, all trees are expand to first level at creationComplete but only tree will not expanded.
and idea why this happen?Your trees' creationComplete routines are being called at an earlier time than they were before. So maybe something isn't set up yet that they depend on.
-
Hello!
I have made a view object with self referencing view link, dropped the data control onto page, added a rule, chosen attributes.
It works fine, but the tree initially displays all the table rows, since the tree uses a single view object and query is not limiting the data because if i limit it for selecting only root records, the children won't be seen, of course. How to construct a recursive tree, so that it would initially have only root records on top?
Thank you!This is in 11.1.1.4 btw.
Here's the stack trace if it helps:
java.lang.IllegalStateException: ADF_FACES-60025:Error trying to change index from: 0 to: 1 rowCount: 2.
at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel.setRowIndex(FlattenedTreeCollectionModel.java:171)
at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils$1.setRowIndex(TreeRendererUtils.java:568)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.renderDataBlockRows(TableRenderer.java:1860)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:613)
at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer.encodeAll(TreeTableRenderer.java:600)
Caused by: java.lang.IllegalStateException: ADFv: Not inside a container.
at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.exitContainer(FacesCtrlHierBinding.java:673)
at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel._scrollForward(FlattenedTreeCollectionModel.java:260)
at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel._scrollIndex(FlattenedTreeCollectionModel.java:221)
at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel._scrollRepeatedly(FlattenedTreeCollectionModel.java:190)
at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel._scrollFromTop(FlattenedTreeCollectionModel.java:183)
at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel.setRowIndex(FlattenedTreeCollectionModel.java:152)
We have a copy of the adf 11.1.1.4 source and I checked FlattenedTreeCollectionModel.setRowIndex(FlattenedTreeCollectionModel.java:171) but it doesn't reveal anything. I see the part that rethrows the IllegalStateException, e.g.:
try
//more code here
catch (IllegalStateException e)
IllegalStateException exp =
new IllegalStateException(LoggerUtils.getMessage(
LOG, LoggerBundle.EXCCHANGE_INDEX, new Object[]{_index,index,_rowCount}));
exp.initCause(e);
throw exp;
But I can't find the part that actually throws the IllegalStateException. I'm looking for an explanation as to why this is happening. I understand the solutions above worked for some people but there never was an explanation about what the error is about (e.g. why did the exception happen). The error message is far too cryptic and does not really establish what could be wrong which is just annoying as hell. -
Implementing tree control in third level navigation
Hello
1. Is it possible to Implement a tree control inside third level navigation ?
2. How can I make selecting one of the nodes change the display in another iview on the same page ?
(How do they pass data to one another)
3. Is it possible to select several nodes at once ?
P.S
Is there a how to guid out there ?
Thanks
Ziv.Hi,
I undestand you want to hide/show tree nodes on demand.
in the standard DTN (detailed navigation) it isn't possible.
There are two options -
1. As suggested you can modify the DTN provided by SAP - all the code is under com.sap.portal.navigation.detailedtree.par and the iView name is also com.sap.portal.detailedNavigationTree
2. create this tree from scratch, and put it on the left side instead of the DTN or as a dynamic navigation iView.
For creating navigation iViews by yourself, you can start from here:
http://help.sap.com/saphelp_nw70/helpdata/EN/43/0174a642406db7e10000000a422035/frameset.htm
Regards,
Tal.
Edited by: Tal Haviv on Aug 15, 2008 12:55 PM -
Af:tree expand/collapse customization
hi all,
i have problem with af:tree expand and collapse.
I want to expand only one node in each level.
i mean let say i have 3 node in same level.
i expand first one then i expand second node again. at that time, first one should be collapsed automatically.
So, user can expand only one node in each level at one time.
is it possible?
With Regards,
WPhi Sireesha,
it is really helpful. but it is still something wrong for child node.
only root node is working as i want.
but when i click on child node, it go back to default and every node is collapse.
if i found the following logic is not working for child node.
discloseRowKeySet.add(firstKey);
eg. let say fristkey is (2,0) then it should open 2 and then second level 0. but it can't open any node.
do u have any idea?
With Regards,
WP -
CLOSED- Recursive Tree with Recursive Table and seperate Relationship table
Hi All,
I am trying to achieve a adf recursive tree with recursive table but relationships are stored in separate table like
Table A:
id name
1 Val1
2 Val2
3 Val3
4 Val4
5 Val5
Table B:
fromid rel_type toid
1 Parent-of 2
2 Parent-of 3
3 Parent-of 4
1 Parent-of 5
I did lots of reading from forum and various posts but couldn't make it work.
Any suggestion what would be best approach and/or sample code for this ?
ThanksI think that you can get this done by defining a VO that fetches all the top level nodes and have a view link to a VO that has all the details with a self recursive viewlink
Query for the top level
Select A.id, A.name
from A
Where A.id not in (select disctinct toid from B)
Query for the detail level
Select A.id, A.name, B.from, B.to
from A,b
where a.id = b.toid;
ViewLink is going to be:
detail.from=master.id
and another viewlink for the recursive relationship
detail.from=detail.to -
Help with displaying a tree...
Hello,
I created a window program that displays some data in a tree structure. I have two versions of the program. One that works and one that doesn't. The one that does, builds the tree in the constructor method of my window class, creates a scrollPane for it, and adds the scrollPane to the window. Again, this version displays the tree fine.
The second version, what I want to accomplish is load the tree when a button is pressed. When the button is pressed, I execute exactly the same steps that I do in the constructor but now these steps are in the actionPerformed method associated to the button. The thing is that the program does not display the tree. I have tried the repaint methods at the contentPane level, at the tree level, reloading the treeModel, but cannot get the tree to show. I would very appreciate any ideas on this...
Thanks
AntonioHey...
Thanks for the tip...that did the trick. What does the validate() method do exactly? The documentation doesn't say much....Thanks again...
Antonio
Maybe you are looking for
-
I'll get right to it. I was listening to a podcast (Dane Cook Baby!) when my iPod suddenly froze. All input from me was ignored. Instinctivly, I hit select and menu to reset it. The black screen with the apple came up, but after a few seconds it chan
-
Why can't I import .jpg files into PRE 9 slideshow project?
I have a Windows 7 computer and use Photoshop Elements 9 and Premiere Elements 9. I recently completed a slideshow for my father's 90th birthday in Photoshop Elements that contains about 360 photos, 12 songs/partial songs, and lasts 24 minutes. My
-
So whenever i try to start skype my computer starts freezing and skype stops responding after a few moments. When i try to end the process in task manager it wont close. And after a few minutes everything stops responding and freezes including task m
-
hi, I'm using weblogic 7.0 server to replace my weblogic 5.0. I've got an error during login to the server: <server failed during initialization Exception: java.lang.securityException: Authentification for user denied..> could you help me and tell me
-
Indesign Document to Ibooks format?
What is the best method to take a document/catalog created in indesign cs5 to the new ibooks format (using the new software) Are any users doing this? Robert