0% found this document useful (0 votes)
278 views109 pages

Tree Control in WEB UI

This document describes methods in a custom controller class for handling tree control in a WEB UI. The do_prepare_output method initializes data and clears collections when refreshing the view. Selection methods like eh_onnodeselect get the selected node and entity, clear collections, and refresh the tree display. Other methods like eh_onsku expand nodes when an item is selected.

Uploaded by

nizamshaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
278 views109 pages

Tree Control in WEB UI

This document describes methods in a custom controller class for handling tree control in a WEB UI. The do_prepare_output method initializes data and clears collections when refreshing the view. Selection methods like eh_onnodeselect get the selected node and entity, clear collections, and refresh the tree display. Other methods like eh_onsku expand nodes when an item is selected.

Uploaded by

nizamshaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Tree Control in WEB UI

method do_prepare_output.
data: l_v_comp type crmt_genil_appl.
data: l_i_category_guid type comt_guid_sort_tab,
l_s_category_guid like line of l_i_category_guid.
data: l_o_core type ref to cl_crm_bol_core,
l_o_entity type ref to cl_crm_bol_entity,
l_o_ppr_collection type ref to cl_bsp_wd_collection_wrapper.
gr_cuco ?= me->get_custom_controller !glb!cl_cgtgd_list_constants=>lstitm_cuco ".
if !glb!cl_crmcmp_l_lstmainw_impl=>gv_new = abap_true.
l_o_ppr_collection = gr_cuco->typed_conte#t->ppritem->get_collection_wrapper ".
l_o_ppr_collection->clear ".
endif.
if !glb!cl_crmcmp_l_lstmainw_impl=>gv_new = abap_true or !glb!cl_crmcmp_l_condrec_impl=>g
v_overview = abap_true or !$%&!'%_'()_'*+,(-''*+.-,_/)0%=>g_v_hier_change = abap_true.
clear !glb!cl_lst_ppri_cucomain_impl=>gt_categlisted_guids.
clear !glb!cl_lst_ppri_cucomain_impl=>g_i_base_categ_guid.
clear !glb!cl_lst_ppri_cucomain_impl=>gt_lsited_prod_guids.
clear !glb!cl_lst_ppri_cucomain_impl=>gt_lsited_prod_guids_read.
clear typed_conte#t->hierarchy->gt_selrow_key_table.
get_buttons ".
me->typed_conte#t->hierarchy->collection_wrapper->clear ".
typed_conte#t->hierarchy->refresh ".
typed_conte#t->hierarchy->build_table ".
gr_cuco->e#ecute_smartsearch ".
endif.
if !glb!cl_lst_ppri_cucomain_impl=>gt_category_guids is not initial and gv_list is init
ial.
l_i_category_guid = !glb!cl_lst_ppri_cucomain_impl=>gt_category_guids.
loop at l_i_category_guid into l_s_category_guid.
** Get the instance of bol core services
try.
l_o_core = cl_crm_bol_core=>get_instance ".
l_v_comp = te#t-112.
l_o_core->load_component_set iv_component_set_name = l_v_comp ".
catch c#_crm_genil_general_error.
endtry.
try.
* create a category object from the guid.
l_o_entity = l_o_core->get_root_entity
iv_ob3ect_name = if_prcat_ap_bol_model=>gc_category_ob3
iv_ob3ect_guid = l_s_category_guid ".
catch c#_crm_genil_model_error.
endtry.
check l_o_entity is bound.
* Add the hierarchy to the hierarchy collection wrapper
me->typed_conte#t->hierarchy->collection_wrapper->add l_o_entity ".
* Read the whole tree structure
typed_conte#t->hierarchy->refresh ".
* Build the table used by the ui tag
typed_conte#t->hierarchy->build_table ".
endloop.
endif.
clear gv_list.
endmethod.
/GLB/CL_LST_PPRI_CUCOMAIN_IMPL is the class of Custom Controller
method eh_ontvnavigator.
gv_list = abap_true.
!glb!cl_lst_itemlisted_impl=>gv_listop = abap_true.
endmethod.
method eh_onsku.
data: l_i_nodes type crmt_bsp_treetable_node_tab,
l_s_node like line of l_i_nodes,
l_s_key type string ,
l_o_node type bsp_wd_tree_node_ref,
l_i_child_ref type bsp_wd_tree_node_tab,
l_s_child_ref like line of l_i_child_ref.
if typed_conte#t->hierarchy->gt_selrow_key_table is initial.
l_i_nodes = me->typed_conte#t->hierarchy->node_tab.
loop at l_i_nodes into l_s_node.
if l_s_node-is_e#panded = abap_false and l_s_node-is_leaf = abap_false.
typed_conte#t->hierarchy->e#pand_node l_s_node-node_key ".
endif.
endloop.
else.
loop at typed_conte#t->hierarchy->gt_selrow_key_table into l_s_key.
l_o_node = typed_conte#t->hierarchy->get_node_by_key l_s_key ".
if l_o_node is bound .
l_o_node->e#pand_node ".
if l_o_node->get_node_name " e4 if_prcat_ap_bol_model=>gc_category_ob3.
l_i_child_ref = typed_conte#t->hierarchy->get_children_sku l_o_node ".
endif.
loop at l_i_child_ref into l_s_child_ref.
if l_s_child_ref->is_e#panded " = abap_false.
l_s_child_ref->e#pand_node ".
endif.
endloop.
endif.
endloop.
endif.
* Build the table used by the ui tag
typed_conte#t->hierarchy->build_table ".
gv_list = abap_true.
!glb!cl_lst_itemlisted_impl=>gv_listop = abap_true.
* Deselect the hierarchy node
clear typed_conte#t->hierarchy->gt_selrow_key_table.
endmethod.
)-56*, eh_onnodeselect.
,757: l_v_inde# 580- sytabi#,
l_v_hit 580- abap_bool.
data: l_o_tree_event 580- (-. 5* cl_thtmlb_tree,
l_o_category 580- (-. 5* cl_crm_bol_entity,
l_o_tree_node 580- (-. 5* cl_bsp_wd_tree_node_pro#y.
5(8.
l_o_tree_event ?= htmlb_event_e#.
me->typed_conte#t->hierarchy->eh_on_row_selection iv_htmlb_event_e# = l_o_tree_event
".
* Get the selected row index
l_v_inde# = l_o_tree_event->row_inde#.
* f the index is valid
/. l_v_inde# /9 +*5 /+/5/7% 7+, l_v_inde# > 1.
* get node by index
5(8.
l_o_tree_node ?= me->typed_conte#t->hierarchy->get_node_by_inde# l_v_inde# ".
* get the hit information
'7%% )-56*, l_o_tree_node->:$-5_9-7('6_(-9;%5:"
-<0*(5/+$
attribute_path = ::
(-'-/=/+$
value = l_v_hit.
'75'6 c#_sy_dyn_call_illegal_method c#_sy_move_cast_error.
* nothing !" l#v#hit initial.
-+,5(8.
/. l_v_hit /9 /+/5/7%.
* Deselect
me->typed_conte#t->hierarchy->deselect_all ".
-%9-.
* Get the corresponding category
l_o_category ?= me->typed_conte#t->hierarchy->get_bo_by_inde# l_v_inde# ".
'6-'> l_o_category /9 &*;+,.
/. l_o_category->get_name " -? if_prcat_ap_bol_model=>gc_category_ob3 or l_o_categ
ory->get_name " -? if_prcat_ap_bol_model=>$'_6/-(7('68_*&@ .
* $lear the hierarchy collection wrapper
me->typed_conte#t->hierarchy->collection_wrapper->clear ".
* Reset the tree
typed_conte#t->hierarchy->refresh ".
-%9-.
* Deselect the hierarchy node
me->typed_conte#t->hierarchy->deselect_all ".
-+,/..
-+,/..
-+,/..
'75'6 c#_sy_move_cast_error. %&'$ () *A(D+'R.
-+,5(8.
-+,)-56*,.
)-56*, eh_onnodee#pand.
,757: l_o_event 580- (-. 5* cl_thtmlb_tree.
l_o_event ?= htmlb_event_e#.
typed_conte#t->hierarchy->e#pand_node l_o_event->row_key ".
typed_conte#t->hierarchy->build_table ".
gv_list = abap_true.
-+,)-56*,.
)-56*, eh_onnodecollapse.
,757: l_o_event 580- (-. 5* cl_thtmlb_tree.
l_o_event ?= htmlb_event_e#.
typed_conte#t->hierarchy->collapse_node l_o_event->row_key ".
typed_conte#t->hierarchy->build_table ".
gv_list = abap_true.
-+,)-56*,.
method eh_onne#tlevel.
,757: l_o_node 580- bsp_wd_tree_node_ref.
,757: l_i_nodes 580- crmt_bsp_treetable_node_tab,
l_s_node %/>- %/+- *. l_i_nodes,
l_i_node_collapse 580- crmt_bsp_treetable_node_tab,
l_s_node_collapse %/>- %/+- *. l_i_node_collapse,
l_i_child_ref 580- bsp_wd_tree_node_tab,
l_s_child_ref %/>- %/+- *. l_i_child_ref.
l_i_nodes = me->typed_conte#t->hierarchy->node_tab.
%**0 75 l_i_nodes /+5* l_s_node A6-(- is_e#panded = abap_false 7+, is_leaf = abap_false.
typed_conte#t->hierarchy->e#pand_node l_s_node-node_key ".
700-+, l_s_node 5* l_i_node_collapse.
-+,%**0.
*collapse the next level nodes.
'6-'> l_i_node_collapse /9 +*5 /+/5/7%.
%**0 75 l_i_node_collapse /+5* l_s_node_collapse.
l_o_node = typed_conte#t->hierarchy->get_node_by_key l_s_node_collapse-node_key ".
/. l_o_node /9 &*;+,.
l_i_child_ref = typed_conte#t->hierarchy->get_children_nl l_o_node ".
%**0 75 l_i_child_ref /+5* l_s_child_ref.
/. l_s_child_ref->is_e#panded " = abap_true.
l_s_child_ref->collaps_node ".
-+,/..
-+,%**0.
-+,/..
-+,%**0.
* Build the table used by the ui tag
typed_conte#t->hierarchy->build_table ".
gv_list = abap_true.
!glb!cl_lst_itemlisted_impl=>gv_listop = abap_true.
endmethod.
method eh_onmultiselect.
data: l_v_inde# type sytabi#,
l_v_key type string.
data: l_s_nodetab type crmt_bsp_treetable_node .
data: l_o_tree_event type ref to cl_thtmlb_tree,
l_o_tree_node type ref to cl_bsp_wd_tree_node_pro#y.
try.
l_o_tree_event ?= htmlb_event_e#.
* Get the selected row index
l_v_inde# = l_o_tree_event->row_inde#.
* f the index is valid
if l_v_inde# is not initial and l_v_inde# > 1.
* get node by index
try.
l_o_tree_node ?= me->typed_conte#t->hierarchy->get_node_by_inde# l_v_inde# ".
* get the hit information
catch c#_sy_dyn_call_illegal_method c#_sy_move_cast_error.
endtry.
l_v_key = l_o_tree_node->if_bsp_wd_tree_nodeBnode_key .
read table typed_conte#t->hierarchy->gt_selrow_key_table
from l_v_key transporting no fields .
if sy-subrc e4 1 .
delete typed_conte#t->hierarchy->gt_selrow_key_table inde# sy-tabi# .
else.
append l_v_key to typed_conte#t->hierarchy->gt_selrow_key_table .
endif.
else.
* index is ,- chec. the /AR0A++ 1 2(/AR0A++ $A3'
if l_o_tree_event->gv_markall e4 cl_thtmlb_table_view=>c_rows_unmark_all.
* unmar. everything.
clear typed_conte#t->hierarchy->gt_selrow_key_table .
elseif l_o_tree_event->gv_markall e4 cl_thtmlb_table_view=>c_rows_mark_all .
loop at typed_conte#t->hierarchy->node_tab into l_s_nodetab.
append l_s_nodetab-node_key to typed_conte#t->hierarchy->gt_selrow_key_table
.
endloop.
endif.
endif.
catch c#_sy_move_cast_error. %&'$ () *A(D+'R.
endtry.
gv_list = abap_true.
!glb!cl_lst_itemlisted_impl=>gv_listop = abap_true.
endmethod.
)-56*, eh_onlist.
* to retrieve the selected entities in the result tree
,757:l_v_category_guid 580- comt_hierarchy_guid,
l_v_prod_guid 580- comt_product_guid,
l_v_siCe 580- i.
,757: l_s_key 580- string ,
l_i_nodes 580- bsp_wd_tree_node_tab,
l_v_node %/>- %/+- *. l_i_nodes,
l_s_products 580- lstruc_categ_prod,
l_i_category 580- comt_category_api_e#p_tab,
l_s_category %/>- %/+- *. l_i_category.
,757:l_o_category 580- (-. 5* cl_crm_bol_entity,
l_o_model_ent 580- (-. 5* cl_crm_bol_entity,
l_o_ppritem 580- (-. 5* cl_crm_bol_entity,
l_o_cuco 580- (-. 5* !glb!cl_lst_ppri_cucomain_impl.
'%-7( typed_conte#t->hierarchy->gt_products.
%**0 75 typed_conte#t->hierarchy->gt_selrow_key_table /+5* l_s_key.
* Get the corresponding entity
l_o_category ?= me->typed_conte#t->hierarchy->get_bo l_s_key ".
'6-'> l_o_category /9 &*;+,.
/. l_o_category->get_name " -? if_prcat_ap_bol_model=>gc_category_ob3.
'7%% )-56*, l_o_category->get_property_as_value
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>category_guid
/)0*(5/+$
ev_result = l_v_category_guid.
(-7, 57&%- !glb!cl_lst_itemnotlisted_cn11=>gt_children 5(7+90*(5/+$ +* ./-%,9 A/56 57
&%- >-8 table_line = l_v_category_guid.
/. sy-subrc D> 1.
l_v_node = typed_conte#t->hierarchy->get_node_by_key l_s_key ".
/. l_v_node /9 &*;+,.
700-+, l_v_node 5* l_i_nodes.
typed_conte#t->hierarchy->get_children l_i_nodes ".
-+,/..
'7%% .;+'5/*+ :'*)_'75-$*(8_(-7,_6/$6-(%-=-%9:
-<0*(5/+$
iv_category_guid = l_v_category_guid
iv_langu = sy-langu
/)0*(5/+$
et_category = l_i_category
-<'-05/*+9
wrong_call = 2
category_not_found = E
inconsistent_data = F
*56-(9 = G.
l_v_siCe = %/+-9 l_i_category " - 2.
(-7, 57&%- l_i_category /+5* l_s_category /+,-< l_v_siCe.
l_v_category_guid = l_s_category-category_guid.
700-+, l_v_category_guid 5* !glb!cl_lst_ppri_cucomain_impl=>gt_categlisted_guids.
-+,/..
-%9-/. l_o_category->get_name " -? if_prcat_ap_bol_model=>gc_product_ob3.
'7%% )-56*, l_o_category->get_property_as_value
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>product_guid
/)0*(5/+$
ev_result = l_v_prod_guid.
(-7, 57&%- typed_conte#t->hierarchy->gt_products 5(7+90*(5/+$ +* ./-%,9 A/56 >-8 pro
duct_guid = l_v_prod_guid.
/. sy-subrc D> 1.
l_v_node = typed_conte#t->hierarchy->get_node_by_key l_s_key ".
/. l_v_node /9 &*;+,.
700-+, l_v_node 5* l_i_nodes.
typed_conte#t->hierarchy->get_children l_i_nodes ".
-+,/..
-+,/..
-+,/..
-+,%**0.
gv_list = abap_true.
** get custom controller for header entity
l_o_cuco ?= me->get_custom_controller !glb!cl_cgtgd_list_constants=>lstitm_cuco ". %&'$
()4'54
l_o_ppritem ?= l_o_cuco->typed_conte#t->ppritem->collection_wrapper->get_current ".
/. l_o_ppritem /9 /+/5/7%.
l_o_cuco->handle_new_ppr_header ".
l_o_ppritem ?= l_o_cuco->typed_conte#t->ppritem->collection_wrapper->get_current ". %&
'$ ()4'54
-+,/..
9*(5 typed_conte#t->hierarchy->gt_products.
,-%-5- 7,@7'-+5 ,;0%/'75-9 .(*) typed_conte#t->hierarchy->gt_products.
%**0 75 typed_conte#t->hierarchy->gt_products /+5* l_s_products.
(-7, 57&%- !glb!cl_lst_ppri_cucomain_impl=>gt_lsited_prod_guids 5(7+90*(5/+$ +* ./-%,9
A/56 57&%- >-8 table_line = l_s_products-product_guid.
/. sy-subrc D> 1.
* create new entity for target node
l_o_model_ent = l_o_ppritem->create_related_entity !glb!cl_cgtgd_list_constants=>ppr
itemrel ". %&'$ ()4'54
'6-'> l_o_model_ent /9 &*;+,.
l_o_model_ent->set_property -<0*(5/+$ iv_attr_name = !glb!cl_cgtgd_list_constants=>p
roduct_ref_guid
iv_value = l_s_products-product_guid ". %&
'$ ()4'54
l_o_cuco->typed_conte#t->ppritemprod->collection_wrapper->add l_o_model_ent ".
700-+, l_s_products-product_guid 5* !glb!cl_lst_ppri_cucomain_impl=>gt_lsited_prod_gu
ids.
-+,/..
-+,%**0.
/. !glb!cl_lst_ppri_cucomain_impl=>g_i_base_categ_guid /9 +*5 /+/5/7%.
%**0 75 !glb!cl_lst_ppri_cucomain_impl=>g_i_base_categ_guid /+5* l_v_category_guid.
700-+, l_v_category_guid 5* !glb!cl_lst_ppri_cucomain_impl=>gt_categlisted_guids.
-+,%**0.
-+,/..
9*(5 !glb!cl_lst_ppri_cucomain_impl=>gt_lsited_prod_guids.
,-%-5- 7,@7'-+5 ,;0%/'75-9 .(*) !glb!cl_lst_ppri_cucomain_impl=>gt_lsited_prod_guids.
9*(5 !glb!cl_lst_ppri_cucomain_impl=>gt_categlisted_guids.
,-%-5- 7,@7'-+5 ,;0%/'75-9 .(*) !glb!cl_lst_ppri_cucomain_impl=>gt_categlisted_guids.
me->typed_conte#t->hierarchy->refresh ".
me->typed_conte#t->hierarchy->build_table ".
* deselect the hierarchy node
'%-7( typed_conte#t->hierarchy->gt_selrow_key_table.
-+,)-56*,.
)-56*, eh_oncollapse.
,757: l_i_nodes 580- crmt_bsp_treetable_node_tab,
l_s_node %/>- %/+- *. l_i_nodes.
l_i_nodes = me->typed_conte#t->hierarchy->node_tab.
%**0 75 l_i_nodes /+5* l_s_node A6-(- parent_key = abap_false.
typed_conte#t->hierarchy->collapse_node l_s_node-node_key ".
-+,%**0.
* Build the table used by the ui tag
typed_conte#t->hierarchy->build_table ".
gv_list = abap_true.
!glb!cl_lst_itemlisted_impl=>gv_listop = abap_true.
endmethod.
method $-5_=6_);%5/_)*,-.
rv_vh_ms_mode = abap_true.
endmethod.
method get_buttons.
data: l_s_button type crmt_thtmlb_button,
l_s_attributes type !2cn!ws_ed_22Elst112.
clear g_i_button.
clear l_s_button.
l_s_button-te#t = te#t-11G.
l_s_button-on_click = te#t-11H.
l_s_button-enabled = abap_true.
append l_s_button to g_i_button.
clear l_s_button.
l_s_button-te#t = te#t-11E.
l_s_button-on_click = te#t-11E.
l_s_button-enabled = abap_true.
append l_s_button to g_i_button.
clear l_s_button.
l_s_button-te#t = te#t-11F.
l_s_button-on_click = te#t-11I.
l_s_button-enabled = abap_true.
append l_s_button to g_i_button.
endmethod.
Class ! /GLB/CL_C"TMLB_#ML_PRO$I%&R
method '7%';%75-_5(--_/+,-+5.
data: lv_node type crmt_thtmlb_treetable_node,
lv_original type crmt_thtmlb_treetable_node,
lv_parent type crmt_thtmlb_treetable_node,
lv_indent type string.
* read node .ey
read table ir_tree_model->node_tab inde# iv_inde# into lv_node.
lv_original = lv_node.
while lv_node-parent_key is not initial.
* go up in the tree to the root node
concatenate lv_indent :--: into lv_indent respecting blanks.
read table ir_tree_model->node_tab into lv_parent
with key node_key = lv_node-parent_key.
lv_node = lv_parent.
endwhile.
if lv_original-is_leaf is initial.
if lv_original-is_e#panded is initial.
concatenate lv_indent :>: into lv_indent.
else.
concatenate lv_indent :v: into lv_indent.
endif.
else.
concatenate lv_indent :o: into lv_indent.
endif.
concatenate J J lv_indent into lv_indent.
rv_return = lv_indent.
endmethod.
method $-5_<)%_,8+7)/'.
,757: %=_(**5_+*,- 580- 95(/+$.
,757: %=_,757_6-7,-( 580- (-. 5* '%_7&70_,757,-9'(.
,757: %=_,757_,-9'( 580- (-. 5* '%_7&70_580-,-9'(.
,757: %=_57&%-_,-9'( 580- (-. 5* '%_7&70_57&%-,-9'(.
,757: %=_(-0%7'-( 580- 95(/+$.
,757: %=_'0_+7)- 580- 5-<521EG.
,757: %=_'*+=_*;5 580- (-. 5* '%_7&70_'*+=_*;5_'-.
,757: %=_'*+= 580- (-. 5* '%_7&70_'*+=_<E<_'-.
,757: %=_<)%_&/+ 580- <95(/+$.
,757: %=_<)% 580- 95(/+$.
,757: %=_5*_(-0%7'- 580- 95(/+$.
,757: %=_(-95 580- 95(/+$.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
%=_(**5_+*,- = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- iv_name ".
* !" create name for root element
'*+'75-+75-
%=_(**5_+*,-
$'_/5-)9
/+5* %=_(**5_+*,-.
* !" create 5/ 6in system codepage7
* 68A+2'#*A(D+(G disables validty chec. for values in iv#data and prevents 5/+#$)(8'R3)
(#()#(2/B'R exception7
'7%% 5(7+9.*()75/*+ /,
*05/*+9 =7%;-_67+,%/+$ = :)*=-:
9*;('- ,757 = /=_,757
(-9;%5 <)% %=_<)%.
* !" prepare for utf!9 conversion: replace the original encoding statement which
* says 5/+ is in system codepage
%=_(-0%7'-( = JD?#ml version=K2.1K encoding=Kutf-IK?>J. %&'$ ()4'54
90%/5 %=_<)% 75 JK?>J /+5* %=_5*_(-0%7'- %=_(-95.
'*+'75-+75- %=_(-0%7'-( %=_(-95 /+5* %=_<)%.
'*+'75-+75- JDJ %=_(**5_+*,- J>J /+5* %=_(-0%7'-(.
(-0%7'- JDas#:abap #mlns:as#=Khttp:!![Link]!abap#mlK version=K2.1K>Das#:values>D,757>J
/+ %=_<)%
A/56 %=_(-0%7'-(. %&'$ ()4'54
'*+'75-+75- JD!J %=_(**5_+*,- J>J /+5* %=_(-0%7'-(.
(-0%7'- JD!,757>D!as#:values>D!as#:abap>J
/+ %=_<)%
A/56 %=_(-0%7'-(.
* !" convert to 24;!9
%=_'*+=_*;5 = '%_7&70_'*+=_*;5_'-=>'(-75- ".
%=_'*+=_*;5->A(/5- -<0*(5/+$ ,757 = %=_<)% ".
%=_<)%_&/+ = %=_'*+=_*;5->$-5_&;..-( ".
%=_'*+= = '%_7&70_'*+=_<E<_'-=>'(-75-
*;5_-+'*,/+$ = :;5.-I:
/$+*(-_'-(( = :<:
/+0;5 = %=_<)%_&/+ ".
%=_'*+=->'*+=-(5_' ".
%=_<)%_&/+ = %=_'*+=->$-5_*;5_&;..-( ".
-=_<)% = %=_<)%_&/+.
endmethod.
)-56*, '(-75-_<9,.
580--0**%9: 7&70.
,757: %5_./-%,/+.* 580- 57&%- *. ./-%,/+.*.
,757: %=_'(%. 580- 7&70_'(_%. =7%;- '%_7&70_'67(_;5/%/5/-9=>'(_%..
,757: %=_<9, 580- 95(/+$.
,757: %=_,,/'_95(;' 580- 57&+7)-.
,757: %=_-+'*,/+$ 580- 5-<521EG.
,757: %=_,,/'_95(;'_95( 580- 95(/+$.
,757: %=_+7)- 580- 95(/+$.
,757: %=_./-%,+7)- 580- 95(/+$.
./-%,-98)&*%9: D%9_./-%,/+.*> 580- ./-%,/+.*.
%=_,,/'_95(;' = /=_95(;'+7)-.
* !" get field of ddic structure
'7%% .;+'5/*+ :,,/'_,757_,-9'(/05/*+_9'7+:
-<0*(5/+$
/_95(;'5;(- = %=_,,/'_95(;'
57&%-9
5_./-%,/+.* = %5_./-%,/+.*
-<'-05/*+9
57&%-_+*5_-</959 = 2
*56-(9 = E.
/. /=_+*_<)%_,-'%7(75/*+ /9 /+/5/7%.
* !" create xml declaration
'*+'75-+75-
JD?#ml version=K2.1K encoding=KJ
Jutf-IJ
JK?>J
%=_'(%.
/+5* %=_<9,.
-+,/..
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
%=_,,/'_95(;'_95( = %=_,,/'_95(;'.
%=_,,/'_95(;'_95( = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_,,/'_95(;'_95( ".
* !" create xsd header
'*+'75-+75-
%=_<9,
JD#s:schema #mlns:#s=Khttp:!![Link]!E112!<)%9chemaKJ %&'$ ()4'54
J>J
%=_'(%.
/+5* %=_<9,.
/. +*5 /=_,--0_95(;'5;(- /9 /+/5/7%.
'*+'75-+75-
%=_<9,
J D#s:element name=KJ
%=_,,/'_95(;'_95(
$'_/5-)9
JK>J
%=_'(%.
J D#s:comple#5ype>J
%=_'(%.
J D#s:se4uence>J
%=_'(%.
J D#s:element name=KJ
%=_,,/'_95(;'_95(
JK>J
%=_'(%.
J D#s:comple#5ype>J
%=_'(%.
J D#s:se4uence>J
/+5* %=_<9,. %&'$ ()4'54
-+,/..
* !" create xsd elements for each field
%**0 75 %5_./-%,/+.* 799/$+/+$ D%9_./-%,/+.*>.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
%=_+7)- = D%9_./-%,/+.*>-+7)-.
%=_+7)- = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_+7)- ".
%=_./-%,+7)- = D%9_./-%,/+.*>-./-%,+7)-.
%=_./-%,+7)- = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_./-%,+7)- ".
/. +*5 /=_,--0_95(;'5;(- /9 /+/5/7%.
* !!" %deep% 53D !" field tags are children of structure tag
'*+'75-+75-
%=_<9,
J D#s:element name=KJ
%=_./-%,+7)-
JK type=K#s:stringK>J
J D!#s:element>J
%=_'(%.
/+5* %=_<9,.
-%9-.
* !!" create %flat% 53D
'*+'75-+75-
%=_<9,
J D#s:element name=KJ
%=_+7)-
J-J
%=_./-%,+7)-
JK type=K#s:stringK>J
J D!#s:element>J
%=_'(%.
/+5* %=_<9,.
-+,/..
-+,%**0.
/. +*5 /=_,--0_95(;'5;(- /9 /+/5/7%.
'*+'75-+75-
%=_<9,
J D!#s:se4uence>J
%=_'(%.
J D!#s:comple#5ype>J
%=_'(%.
J D!#s:element>J
%=_'(%.
J D!#s:se4uence>J
%=_'(%.
J D!#s:comple#5ype>J
%=_'(%.
J D!#s:element>J
%=_'(%.
/+5* %=_<9,. %&'$ ()4'54
-+,/..
* !" xsd bottom
'*+'75-+75-
%=_<9,
JD!#s:schema>J
%=_'(%.
/+5* %=_<9,.
-=_<9, = %=_<9,.
-+,)-56*,.
)-56*, '(-75-_<9,_,8+7)/'.
580--0**%9: 7&70.
,757: %5_./-%,/+.* 580- 57&%- *. ./-%,/+.*.
,757: %=_'(%. 580- 7&70_'(_%. =7%;- '%_7&70_'67(_;5/%/5/-9=>'(_%..
,757: %=_<9, 580- 95(/+$.
,757: %=_,,/'_95(;' 580- 57&+7)-.
,757: %=_-+'*,/+$ 580- 5-<521EG.
,757: %=_,,/'_95(;'_95( 580- 95(/+$.
,757: %=_+7)- 580- 95(/+$.
,757: %=_./-%,+7)- 580- 95(/+$.
./-%,-98)&*%9: D%9_./-%,/+.*> 580- '%_7&70_95(;'5,-9'(=>'*)0*+-+5.
%=_,,/'_95(;' = /=_95(;'+7)-.
** !" get field of ddic structure
* $A++ ;2($4)( <DD$#DA4A#D'3$R=4)(#3$A(<
* '5=)R4(G
* #34R2$42R' > +8#DD$#34R2$
* 4AB+'3
* 4#;'+D(;) > +4#;'+D(;)
* '5$'=4)(3
* 4AB+'#()4#'5343 > ?
* )4*'R3 > @.
*
/. /=_+*_<)%_,-'%7(75/*+ /9 /+/5/7%.
* !" create xml declaration
'*+'75-+75-
JD?#ml version=K2.1K encoding=KJ
Jutf-IJ
JK?>J
%=_'(%.
/+5* %=_<9,.
-+,/..
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
%=_,,/'_95(;'_95( = %=_,,/'_95(;'.
%=_,,/'_95(;'_95( = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_,,/'_95(;'_95( ".
* !" create xsd header
'*+'75-+75-
%=_<9,
JD#s:schema #mlns:#s=Khttp:!![Link]!E112!<)%9chemaKJ %&'$ ()4'54
J>J
%=_'(%.
/+5* %=_<9,.
/. +*5 /=_,--0_95(;'5;(- /9 /+/5/7%.
'*+'75-+75-
%=_<9,
J D#s:element name=KJ
%=_,,/'_95(;'_95(
$'_/5-)9
JK>J
%=_'(%.
J D#s:comple#5ype>J
%=_'(%.
J D#s:se4uence>J
%=_'(%.
J D#s:element name=KJ
* +8#DD$#34R2$#34R
JitemJ
JK>J
%=_'(%.
J D#s:comple#5ype>J
%=_'(%.
J D#s:se4uence>J
/+5* %=_<9,. %&'$ ()4'54
-+,/..
* !" create xsd elements for each field
%**0 75 it_structdescr 799/$+/+$ D%9_./-%,/+.*>.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
%=_+7)- = D%9_./-%,/+.*>-+7)-.
%=_+7)- = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_+7)- ".
%=_./-%,+7)- = D%9_./-%,/+.*>-+7)-.
%=_./-%,+7)- = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_./-%,+7)- ".
/. +*5 /=_,--0_95(;'5;(- /9 /+/5/7%.
* !!" %deep% 53D !" field tags are children of structure tag
'*+'75-+75-
%=_<9,
J D#s:element name=KJ
%=_./-%,+7)-
JK type=K#s:stringK>J
J D!#s:element>J
%=_'(%.
/+5* %=_<9,.
-%9-.
* !!" create %flat% 53D
'*+'75-+75-
%=_<9,
J D#s:element name=KJ
%=_+7)-
J-J
%=_./-%,+7)-
JK type=K#s:stringK>J
J D!#s:element>J
%=_'(%.
/+5* %=_<9,.
-+,/..
-+,%**0.
/. +*5 /=_,--0_95(;'5;(- /9 /+/5/7%.
'*+'75-+75-
%=_<9,
J D!#s:se4uence>J
%=_'(%.
J D!#s:comple#5ype>J
%=_'(%.
J D!#s:element>J
%=_'(%.
J D!#s:se4uence>J
%=_'(%.
J D!#s:comple#5ype>J
%=_'(%.
J D!#s:element>J
%=_'(%.
/+5* %=_<9,. %&'$ ()4'54
-+,/..
* !" xsd bottom
'*+'75-+75-
%=_<9,
JD!#s:schema>J
%=_'(%.
/+5* %=_<9,.
-=_<9, = %=_<9,.
-+,)-56*,.
)-56*, '(-75-_-<'-%_5-)0%75-_<)%.
,757: %=_'(%. 580- 7&70_'(_%. =7%;- '%_7&70_'67(_;5/%/5/-9=>'(_%..
,757: %5_./-%,/+.* 580- 57&%- *. ./-%,/+.*.
,757: %=_,,/'_95(;' 580- 57&+7)-.
,757: %=_<)% 580- 95(/+$.
,757: %=_<9, 580- 95(/+$.
,757: %=_/+,-< 580- 95(/+$.
,757: %=_/, 580- 95(/+$.
,757: %=_'*%;)+9 580- 95(/+$.
,757: %=_-+'*,/+$ 580- 5-<5211.
,757: %=_,,/'_95(;'_95( 580- 95(/+$.
,757: %=_+7)- 580- 95(/+$.
,757: %=_./-%,+7)- 580- 95(/+$.
./-%,-98)&*%9: D%9_./-%,> 580- ./-%,/+.*.
%=_,,/'_95(;' = /=_95(;'+7)-.
5(7+9%75- %=_,,/'_95(;' 5* ;00-( '79-. %&'$ 4RA(3+A(G
* !" create top level 5/+
'*+'75-+75-
JD?#ml version=K2.1K encoding=KJ
Jutf-IJ
JK?>J
%=_'(%.
JD?mso-application progid=K-#cel.9heetK?>J
%=_'(%.
JDAorkbook #mlns=Kurn:schemas-microsoft-com:office:spreadsheetKJ
J #mlns:o=Kurn:schemas-microsoft-com:office:officeKJ
J #mlns:#=Kurn:schemas-microsoft-com:office:e#celKJ
J #mlns:ss=Kurn:schemas-microsoft-com:office:spreadsheetKJ
J #mlns:html=Khttp:!![Link]!5(!(-'-htmlG1KJ
J #mlns:#E=Khttp:!![Link]!office!e#cel!E11F!#mlKJ
J #mlns:#sd=Khttp:!![Link]!E112!<)%9chemaK>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
/. +*5 /=_$-+-(75-_6-7,-( /9 /+/5/7%.
* !" get field of ddic structure
'7%% .;+'5/*+ :,,/'_,757_,-9'(/05/*+_9'7+:
-<0*(5/+$
/_95(;'5;(- = %=_,,/'_95(;'
57&%-9
5_./-%,/+.* = %5_./-%,/+.*
-<'-05/*+9
57&%-_+*5_-</959 = 2
*56-(9 = E.
-+,/..
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
%=_,,/'_95(;'_95( = %=_,,/'_95(;'.
%=_,,/'_95(;'_95( = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_,,/'_95(;'_95( ".
'*+'75-+75-
%=_<)%
JDAorksheet ss:+ame=K9heet2K>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
/. +*5 /=_$-+-(75-_6-7,-( /9 /+/5/7%.
* !" create column headers from field names
%=_'*%;)+9 = %/+-9 %5_./-%,/+.* ".
'*+,-+9- %=_'*%;)+9 +*-$709.
'*+'75-+75-
%=_<)%
J D5able ss:-#panded'olumn'ount=KJ
%=_'*%;)+9
JK ss:-#panded(ow'ount=KEK #:.ull'olumns=K2K #:.ull(ows=K2K>J
%=_'(%.
J D(ow>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
%**0 75 %5_./-%,/+.* 799/$+/+$ D%9_./-%,>.
'*+'75-+75-
%=_<)%
J D'ell>D,ata ss:5ype=K9tringK>J
D%9_./-%,>-9'(5-<5_%
JD!,ata>D!'ell>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
-+,%**0.
'*+'75-+75-
%=_<)%
J D!(ow>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
'*+'75-+75-
%=_<)%
J D!5able>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
-+,/..
'*+'75-+75-
%=_<)%
J DAorksheet*ptions #mlns=Kurn:schemas-microsoft-com:office:e#celK>J
%=_'(%.
J D9elected!>J
%=_'(%.
J D0anes>J
%=_'(%.
J D0ane>J
%=_'(%.
J D+umber>2D!+umber>J
%=_'(%.
J D7ctive'ol>2D!7ctive'ol>J
%=_'(%.
J D!0ane>J
%=_'(%.
J D!0anes>J
%=_'(%.
J D0rotect*b3ects>.alseD!0rotect*b3ects>J
%=_'(%.
J D0rotect9cenarios>.alseD!0rotect9cenarios>J
%=_'(%.
J D!Aorksheet*ptions>J
%=_'(%.
J D!Aorksheet>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
* !" include 5/+ schema from structure
%=_<9, = '%_chtmlb_<)%_0(*=/,-(=>'(-75-_<9, /=_95(;'+7)- = /=_95(;'+7)-
/=_+*_<)%_,-'%7(75/*+ = :<: ".
'*+'75-+75-
%=_<)%
J D#E:)ap/nfo #E:6ide/nactive%ist&order=KfalseK>J
%=_'(%.
J D#E:9chema #E:/,=K9chema2K #E:+amespace=KK>J
%=_'(%.
%=_<9,
%=_'(%.
J D!#E:9chema>J
%=_'(%.
J D#E:)ap #E:/,=KJ
%=_,,/'_95(;'_95(
$'_/5-)9
J_)apK #E:9chema/,=K9chema2K #E:(oot-lement=KJ
%=_,,/'_95(;'_95(
$'_/5-)9
JK>J
/+5* %=_<)%. %&'$ ()4'54
%=_/, = 2.
'*+,-+9- %=_/,.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
%=_+7)- = D%9_./-%,>-+7)-.
%=_+7)- = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_+7)- ".
'*+'75-+75-
%=_<)%
* ABx@:'ntry x@:4ype>%single% x@:D>%A
JD#E:-ntry #E:5ype=KtableK #E:/,=KJ
%=_/,
JK>J
%=_'(%.
JD#E:(ange>J
* A3heet?CR@$A
* +8#(D'5
J9heet2L(E'2:(E1'J %=_'*%;)+9
JD!#E:(ange>J
JD#E:6eader(ange>(2'2D!#E:6eader(ange>J %only for table range
%=_'(%.
JD#:.ilter*n>5rueD!#:.ilter*n>J
%=_'(%.
JD#E:<0ath>!J
%=_+7)- $'_/5-)9
J!J
%=_+7)-
JD!#E:<0ath>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
%**0 75 %5_./-%,/+.* 799/$+/+$ D%9_./-%,>.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
%=_./-%,+7)- = D%9_./-%,>-./-%,+7)-.
%=_./-%,+7)- = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_./-%,+7)- ".
%=_/+,-< = 98-57&/<.
* !" define range for a table mapping
,757: %=_(7+$- 580- 95(/+$.
/. %=_/+,-< = 2.
%=_(7+$- = :(':.
-%9-.
,757: %=_/+,-<E 580- 95(/+$.
%=_/+,-<E = %=_/+,-< - 2.
'*+,-+9- %=_/+,-<E.
'*+'75-+75-
:('M:
%=_/+,-<E
:N:
/+5* %=_(7+$-.
-+,/..
%=_/, = 98-57&/<.
'*+,-+9- %=_/+,-< +*-$709.
'*+,-+9- %=_/, +*-$709.
'*+'75-+75-
%=_<)%
JD#E:.ield #E:/,=KJ
%=_./-%,+7)-
JK>J
%=_'(%.
JD#E:(ange>J %only for table mappings
%=_(7+$-
JD!#E:(ange>J
%=_'(%.
JD#E:<0ath>J
%=_./-%,+7)-
JD!#E:<0ath>J
%=_'(%.
J D#E:<9,5ype>stringD!#E:<9,5ype>J
%=_'(%.
J Dss:'ell>J
%=_'(%.
J D!ss:'ell>J
%=_'(%.
J D#E:7ggregate>+oneD!#E:7ggregate>J
%=_'(%.
JD!#E:.ield>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
-+,%**0.
'*+'75-+75-
%=_<)%
JD!#E:-ntry>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
'*+'75-+75-
%=_<)%
J D!#E:)ap>J
%=_'(%.
J D!#E:)ap/nfo>J
%=_'(%.
JD!Aorkbook>J
%=_'(%.
/+5* %=_<)%. %&'$ ()4'54
* !" convert to 24;!9
,757: %=_'*+=_*;5 580- (-. 5* '%_7&70_'*+=_*;5_'-.
,757: %=_'*+= 580- (-. 5* '%_7&70_'*+=_<E<_'-.
,757: %=_<)%_&/+ 580- <95(/+$.
%=_'*+=_*;5 = '%_7&70_'*+=_*;5_'-=>'(-75- ".
%=_'*+=_*;5->A(/5- -<0*(5/+$ ,757 = %=_<)% ".
%=_<)%_&/+ = %=_'*+=_*;5->$-5_&;..-( ".
%=_'*+= = '%_7&70_'*+=_<E<_'-=>'(-75-
*;5_-+'*,/+$ = :;5.-I:
/$+*(-_'-(( = :<:
/+0;5 = %=_<)%_&/+ ".
%=_'*+=->'*+=-(5_' ".
-=_<)%_&/+ = %=_'*+=->$-5_*;5_&;..-( ".
-+,)-56*,.
method '(-75-_-<'-%_5-)0%5_<)%_,8+.
data: lv_crlf type abap_cr_lf value cl_abap_char_utilities=>cr_lf.
data: lt_fieldinfo type table of fieldinfo.
data: lv_ddic_struc type tabname.
data: lv_#ml type string.
data: lv_#sd type string.
data: lv_inde# type string.
data: lv_id type string.
data: lv_columns type string.
data: lv_encoding type te#t211.
data: lv_ddic_struc_str type string.
data: lv_name type string.
data: lv_fieldname type string.
field-symbols: Dls_field> type cl_abap_structdescr=>component.
lv_ddic_struc = iv_strucname.
translate lv_ddic_struc to upper case. %&'$ 4RA(3+A(G
* !" create top level 5/+
concatenate
JD?#ml version=K2.1K encoding=KJ
Jutf-IJ
JK?>J
lv_crlf
JD?mso-application progid=K-#cel.9heetK?>J
lv_crlf
JDAorkbook #mlns=Kurn:schemas-microsoft-com:office:spreadsheetKJ
J #mlns:o=Kurn:schemas-microsoft-com:office:officeKJ
J #mlns:#=Kurn:schemas-microsoft-com:office:e#celKJ
J #mlns:ss=Kurn:schemas-microsoft-com:office:spreadsheetKJ
J #mlns:html=Khttp:!![Link]!5(!(-'-htmlG1KJ
J #mlns:#E=Khttp:!![Link]!office!e#cel!E11F!#mlKJ
J #mlns:#sd=Khttp:!![Link]!E112!<)%9chemaK>J
lv_crlf
into lv_#ml. %&'$ ()4'54
if not iv_generate_header is initial.
* !" get field of ddic structure
* $A++ ;2($4)( <DD$#DA4A#D'3$R=4)(#3$A(<
* '5=)R4(G
* #34R2$42R' > +8#DD$#34R2$
* 4AB+'3
* 4#;'+D(;) > +4#;'+D(;)
* '5$'=4)(3
* 4AB+'#()4#'5343 > ?
* )4*'R3 > @.
endif.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
lv_ddic_struc_str = lv_ddic_struc.
lv_ddic_struc_str = cl_abap_#ml_name_converter=>to_#ml_name lv_ddic_struc_str ".
concatenate
lv_#ml
JDAorksheet ss:+ame=K9heet2K>J
lv_crlf
into lv_#ml. %&'$ ()4'54
if not iv_generate_header is initial.
* !" create column headers from field names
lv_columns = lines it_structdescr ".
condense lv_columns no-gaps.
concatenate
lv_#ml
J D5able ss:-#panded'olumn'ount=KJ
lv_columns
JK ss:-#panded(ow'ount=KEK #:.ull'olumns=K2K #:.ull(ows=K2K>J
lv_crlf
J D(ow>J
lv_crlf
into lv_#ml. %&'$ ()4'54
loop at it_structdescr assigning Dls_field>.
concatenate
lv_#ml
J D'ell>D,ata ss:5ype=K9tringK>J
Dls_field>-name
JD!,ata>D!'ell>J
lv_crlf
into lv_#ml. %&'$ ()4'54
endloop.
concatenate
lv_#ml
J D!(ow>J
lv_crlf
into lv_#ml. %&'$ ()4'54
concatenate
lv_#ml
J D!5able>J
lv_crlf
into lv_#ml. %&'$ ()4'54
endif.
concatenate
lv_#ml
J DAorksheet*ptions #mlns=Kurn:schemas-microsoft-com:office:e#celK>J
lv_crlf
J D9elected!>J
lv_crlf
J D0anes>J
lv_crlf
J D0ane>J
lv_crlf
J D+umber>2D!+umber>J
lv_crlf
J D7ctive'ol>2D!7ctive'ol>J
lv_crlf
J D!0ane>J
lv_crlf
J D!0anes>J
lv_crlf
J D0rotect*b3ects>.alseD!0rotect*b3ects>J
lv_crlf
J D0rotect9cenarios>.alseD!0rotect9cenarios>J
lv_crlf
J D!Aorksheet*ptions>J
lv_crlf
J D!Aorksheet>J
lv_crlf
into lv_#ml. %&'$ ()4'54
* !" include 5/+ schema from structure
lv_#sd = cl_chtmlb_#ml_provider=>create_#sd_dynamic iv_strucname = iv_strucname
iv_no_#ml_declaration = :<:
it_structdescr = it_structdescr ".
concatenate
lv_#ml
J D#E:)ap/nfo #E:6ide/nactive%ist&order=KfalseK>J
lv_crlf
J D#E:9chema #E:/,=K9chema2K #E:+amespace=KK>J
lv_crlf
lv_#sd
lv_crlf
J D!#E:9chema>J
lv_crlf
J D#E:)ap #E:/,=KJ
lv_ddic_struc_str
gc_items
J_)apK #E:9chema/,=K9chema2K #E:(oot-lement=KJ
lv_ddic_struc_str
gc_items
JK>J
into lv_#ml. %&'$ ()4'54
lv_id = 2.
condense lv_id.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
lv_name = lv_ddic_struc_str.
* +8#(A/' > $+#ABA=#5/+#(A/'#$)(8'R4'R>"4)#5/+#(A/'6 +8#(A/' 7.
concatenate
lv_#ml
* ABx@:'ntry x@:4ype>%single% x@:D>%A
JD#E:-ntry #E:5ype=KtableK #E:/,=KJ
lv_id
JK>J
lv_crlf
JD#E:(ange>J
* A3heet?CR@$A
* +8#(D'5
J9heet2L(E'2:(E1'J lv_columns
JD!#E:(ange>J
JD#E:6eader(ange>(2'2D!#E:6eader(ange>J %only for table range
lv_crlf
JD#:.ilter*n>5rueD!#:.ilter*n>J
lv_crlf
JD#E:<0ath>!J
lv_name gc_items
J!J
* +8#(A/'
JitemJ
JD!#E:<0ath>J
lv_crlf
into lv_#ml. %&'$ ()4'54
loop at it_structdescr assigning Dls_field>.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
lv_fieldname = Dls_field>-name.
lv_fieldname = cl_abap_#ml_name_converter=>to_#ml_name lv_fieldname ".
lv_inde# = sy-tabi#.
* !" define range for a table mapping
data: lv_range type string.
if lv_inde# = 2.
lv_range = :(':.
else.
data: lv_inde#E type string.
lv_inde#E = lv_inde# - 2.
condense lv_inde#E.
concatenate
:('M:
lv_inde#E
:N:
into lv_range.
endif.
lv_id = sy-tabi#.
condense lv_inde# no-gaps.
condense lv_id no-gaps.
concatenate
lv_#ml
JD#E:.ield #E:/,=KJ
lv_fieldname
JK>J
lv_crlf
JD#E:(ange>J %only for table mappings
lv_range
JD!#E:(ange>J
lv_crlf
JD#E:<0ath>J
lv_fieldname
JD!#E:<0ath>J
lv_crlf
J D#E:<9,5ype>stringD!#E:<9,5ype>J
lv_crlf
J Dss:'ell>J
lv_crlf
J D!ss:'ell>J
lv_crlf
J D#E:7ggregate>+oneD!#E:7ggregate>J
lv_crlf
JD!#E:.ield>J
lv_crlf
into lv_#ml. %&'$ ()4'54
endloop.
concatenate
lv_#ml
JD!#E:-ntry>J
lv_crlf
into lv_#ml. %&'$ ()4'54
concatenate
lv_#ml
J D!#E:)ap>J
lv_crlf
J D!#E:)ap/nfo>J
lv_crlf
JD!Aorkbook>J
lv_crlf
into lv_#ml. %&'$ ()4'54
* !" convert to 24;!9
data: lv_conv_out type ref to cl_abap_conv_out_ce.
data: lv_conv type ref to cl_abap_conv_#E#_ce.
data: lv_#ml_bin type #string.
lv_conv_out = cl_abap_conv_out_ce=>create ".
lv_conv_out->write e#porting data = lv_#ml ".
lv_#ml_bin = lv_conv_out->get_buffer ".
lv_conv = cl_abap_conv_#E#_ce=>create
out_encoding = :;5.-I:
ignore_cerr = :<:
input = lv_#ml_bin ".
lv_conv->convert_c ".
ev_#ml_bin = lv_conv->get_out_buffer ".
endmethod.
)-56*, $-5_<)%.
,757: %=_(**5_+*,- 580- 95(/+$.
,757: %=_,757_6-7,-( 580- (-. 5* '%_7&70_,757,-9'(.
,757: %=_,757_,-9'( 580- (-. 5* '%_7&70_580-,-9'(.
,757: %=_57&%-_,-9'( 580- (-. 5* '%_7&70_57&%-,-9'(.
,757: %=_(-0%7'-( 580- 95(/+$.
,757: %=_'0_+7)- 580- 5-<521EG.
,757: %=_'*+=_*;5 580- (-. 5* '%_7&70_'*+=_*;5_'-.
,757: %=_'*+= 580- (-. 5* '%_7&70_'*+=_<E<_'-.
,757: %=_<)%_&/+ 580- <95(/+$.
,757: %=_<)% 580- 95(/+$.
,757: %=_5*_(-0%7'- 580- 95(/+$.
,757: %=_(-95 580- 95(/+$.
* !" get DD$ name of table- structure- ...
%=_,757_,-9'( = '%_7&70_580-,-9'(=>,-9'(/&-_&8_,757 /=_,757 ".
'79- %=_,757_,-9'(->580-_>/+,.
A6-+ '%_7&70_,757,-9'(=>580->/+,_57&%-.
* !!" passed data is table
%=_57&%-_,-9'( ?= %=_,757_,-9'(.
%=_,757_6-7,-( = %=_57&%-_,-9'(->$-5_57&%-_%/+-_580- ".
%=_(**5_+*,- = %=_,757_6-7,-(->$-5_(-%75/=-_+7)- ".
-+,'79-.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
%=_(**5_+*,- = '%_7&70_<)%_+7)-_'*+=-(5-(=>5*_<)%_+7)- %=_(**5_+*,- ".
* !" create name for root element
'*+'75-+75-
%=_(**5_+*,-
$'_/5-)9
/+5* %=_(**5_+*,-.
* !" create 5/ 6in system codepage7
* 68A+2'#*A(D+(G disables validty chec. for values in iv#data and prevents 5/+#$)(8'R3)
(#()#(2/B'R exception7
'7%% 5(7+9.*()75/*+ /,
*05/*+9 =7%;-_67+,%/+$ = :)*=-:
9*;('- ,757 = /=_,757
(-9;%5 <)% %=_<)%.
* !" prepare for utf!9 conversion: replace the original encoding statement which
* says 5/+ is in system codepage
%=_(-0%7'-( = JD?#ml version=K2.1K encoding=Kutf-IK?>J. %&'$ ()4'54
90%/5 %=_<)% 75 JK?>J /+5* %=_5*_(-0%7'- %=_(-95.
'*+'75-+75- %=_(-0%7'-( %=_(-95 /+5* %=_<)%.
'*+'75-+75- JDJ %=_(**5_+*,- J>J /+5* %=_(-0%7'-(.
(-0%7'- JDas#:abap #mlns:as#=Khttp:!![Link]!abap#mlK version=K2.1K>Das#:values>D,757>J
/+ %=_<)%
A/56 %=_(-0%7'-(. %&'$ ()4'54
'*+'75-+75- JD!J %=_(**5_+*,- J>J /+5* %=_(-0%7'-(.
(-0%7'- JD!,757>D!as#:values>D!as#:abap>J
/+ %=_<)%
A/56 %=_(-0%7'-(.
* !" convert to 24;!9
%=_'*+=_*;5 = '%_7&70_'*+=_*;5_'-=>'(-75- ".
%=_'*+=_*;5->A(/5- -<0*(5/+$ ,757 = %=_<)% ".
%=_<)%_&/+ = %=_'*+=_*;5->$-5_&;..-( ".
%=_'*+= = '%_7&70_'*+=_<E<_'-=>'(-75-
*;5_-+'*,/+$ = :;5.-I:
/$+*(-_'-(( = :<:
/+0;5 = %=_<)%_&/+ ".
%=_'*+=->'*+=-(5_' ".
%=_<)%_&/+ = %=_'*+=->$-5_*;5_&;..-( ".
-=_<)% = %=_<)%_&/+.
-+,)-56*,.
)-56*, -</95-+'-_'6-'>.
-=_-</959 = :<:.
-+,)-56*,.
)-56*, $-5_'9=_.(*)_<)% .
580-9: &/+_95(;'_580-21EG" 580- <.
,757:
%(_<9%5_0(*'-99*( 580- (-. 5* '%_<9%5_0(*'-99*(,
%(_/<)% 580- (-. 5* /._/<)%,
%(_95(-7)_.7'5*(8 580- (-. 5* /._/<)%_95(-7)_.7'5*(8,
%(_(-9;%5_95(-7) 580- (-. 5* /._/<)%_*95(-7),
%5_&/+ 580- 57&%- *. &/+_95(;'_580-,
%(_/95(-7) 580- (-. 5* /._/<)%_/95(-7),
%=_9/O- 580- /.
* !" transforms an 5/+ string which is of the 5/+ schema defined in this
* classes G'4#5/+ method into a csv string
5(8.
* !" create binary table from xstring
'7%% .;+'5/*+ :9')9_<95(/+$_5*_&/+7(8:
-<0*(5/+$
&;..-( = /=_<)%
/)0*(5/+$
*;50;5_%-+$56 = %=_9/O-
57&%-9
&/+7(8_57& = %5_&/+.
* !" create xml source stream
'(-75- *&@-'5 %(_<9%5_0(*'-99*(.
%(_/<)% = '%_/<)%=>'(-75- ".
%(_95(-7)_.7'5*(8 = %(_/<)%->'(-75-_95(-7)_.7'5*(8 ".
%(_/95(-7) = %(_95(-7)_.7'5*(8->'(-75-_/95(-7)_/57&%-
57&%- = %5_&/+
9/O- = %=_9/O- ".
%(_<9%5_0(*'-99*(->9-5_9*;('-_95(-7) 95(-7) = %(_/95(-7) " .
%(_(-9;%5_95(-7) = %(_95(-7)_.7'5*(8->'(-75-_*95(-7)_'95(/+$
95(/+$ = -=_'9= ".
%(_<9%5_0(*'-99*(->9-5_(-9;%5_95(-7) 95(-7) = %(_(-9;%5_95(-7) ".
* !" carry out 53+4 transformation
%(_<9%5_0(*'-99*(->(;+ 0(*$+7)- = :'()_<)%_5*_'9=: ".
-+,5(8.
-+,)-56*,.
method '(-75-_-<'-%_5-)0%75-_<)%_'*+.
data: lv_crlf type abap_cr_lf value cl_abap_char_utilities=>cr_lf.
data: lt_fieldinfo type table of fieldinfo.
data: lv_ddic_struc type tabname.
data: lv_#ml type string.
data: lv_#sd type string.
data: lv_inde# type string.
data: lv_id type string.
data: lv_columns type string.
data: lv_encoding type te#t211.
data: lv_ddic_struc_str type string.
data: lv_name type string.
data: lv_fieldname type string.
data: lt_structdescr type cl_abap_structdescr=>component_table.
data: ls_structdescr type abap_componentdescr.
field-symbols: Dls_field> type chtmlb_tv_comp_descr.
lv_ddic_struc = iv_strucname.
translate lv_ddic_struc to upper case. %&'$ 4RA(3+A(G
* !" create top level 5/+
concatenate JD?#ml version=K2.1K encoding=Kutf-IK?>J
lv_crlf
JD?mso-application progid=K-#cel.9heetK?>J
lv_crlf
JDAorkbook #mlns=Kurn:schemas-microsoft-com:office:spreadsheetKJ
J #mlns:o=Kurn:schemas-microsoft-com:office:officeKJ
J #mlns:#=Kurn:schemas-microsoft-com:office:e#celKJ
J #mlns:ss=Kurn:schemas-microsoft-com:office:spreadsheetKJ
J #mlns:html=Khttp:!![Link]!5(!(-'-htmlG1KJ
J #mlns:#E=Khttp:!![Link]!office!e#cel!E11F!#mlKJ
J #mlns:#sd=Khttp:!![Link]!E112!<)%9chemaK>J
lv_crlf
into lv_#ml. %&'$ ()4'54
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
lv_ddic_struc_str = lv_ddic_struc.
lv_ddic_struc_str = cl_abap_#ml_name_converter=>to_#ml_name lv_ddic_struc_str ".
concatenate lv_#ml
JDAorksheet ss:+ame=K9heet2K>J
lv_crlf
into lv_#ml. %&'$ ()4'54
* !" create column headers from field names
lv_columns = lines it_structdescr ".
condense lv_columns no-gaps.
concatenate
lv_#ml
J D5able ss:-#panded'olumn'ount=KJ
lv_columns
JK ss:-#panded(ow'ount=KEK #:.ull'olumns=K2K #:.ull(ows=K2K>J
lv_crlf
J D(ow>J
lv_crlf
into lv_#ml. %&'$ ()4'54
* column title
loop at it_structdescr assigning Dls_field>.
append Dls_field>-abap to lt_structdescr.
concatenate
lv_#ml
J D'ell>D,ata ss:5ype=K9tringK>J
Dls_field>-column_title
JD!,ata>D!'ell>J
lv_crlf
into lv_#ml. %&'$ ()4'54
endloop.
concatenate
lv_#ml
J D!(ow>J
lv_crlf
into lv_#ml. %&'$ ()4'54
concatenate
lv_#ml
J D!5able>J
lv_crlf
into lv_#ml. %&'$ ()4'54
concatenate
lv_#ml
J DAorksheet*ptions #mlns=Kurn:schemas-microsoft-com:office:e#celK>J
lv_crlf
J D9elected!>J
lv_crlf
J D0anes>J
lv_crlf
J D0ane>J
lv_crlf
J D+umber>2D!+umber>J
lv_crlf
J D7ctive'ol>2D!7ctive'ol>J
lv_crlf
J D!0ane>J
lv_crlf
J D!0anes>J
lv_crlf
J D0rotect*b3ects>.alseD!0rotect*b3ects>J
lv_crlf
J D0rotect9cenarios>.alseD!0rotect9cenarios>J
lv_crlf
J D!Aorksheet*ptions>J
lv_crlf
J D!Aorksheet>J
lv_crlf
into lv_#ml. %&'$ ()4'54
* !" include 5/+ schema from structure
lv_#sd = cl_chtmlb_#ml_provider=>create_#sd_dynamic iv_strucname = iv_strucname
iv_no_#ml_declaration = :<:
it_structdescr = lt_structdescr
".
concatenate
lv_#ml
J D#E:)ap/nfo #E:6ide/nactive%ist&order=KfalseK>J
lv_crlf
J D#E:9chema #E:/,=K9chema2K #E:+amespace=KK>J
lv_crlf
lv_#sd
lv_crlf
J D!#E:9chema>J
lv_crlf
J D#E:)ap #E:/,=KJ
lv_ddic_struc_str
gc_items
J_)apK #E:9chema/,=K9chema2K #E:(oot-lement=KJ
lv_ddic_struc_str
gc_items
JK>J
into lv_#ml. %&'$ ()4'54
lv_id = 2.
condense lv_id.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
lv_name = lv_ddic_struc_str.
* +8#(A/' > $+#ABA=#5/+#(A/'#$)(8'R4'R>"4)#5/+#(A/'6 +8#(A/' 7.
concatenate
lv_#ml
* ABx@:'ntry x@:4ype>%single% x@:D>%A
JD#E:-ntry #E:5ype=KtableK #E:/,=KJ
lv_id
JK>J
lv_crlf
JD#E:(ange>J
* A3heet?CR@$A
* +8#(D'5
J9heet2L(E'2:(E1'J lv_columns
JD!#E:(ange>J
JD#E:6eader(ange>(2'2D!#E:6eader(ange>J %only for table range
lv_crlf
JD#:.ilter*n>5rueD!#:.ilter*n>J
lv_crlf
JD#E:<0ath>!J
lv_name gc_items
J!J
* +8#(A/'
JitemJ
JD!#E:<0ath>J
lv_crlf
into lv_#ml. %&'$ ()4'54
loop at it_structdescr assigning Dls_field>.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
lv_fieldname = Dls_field>-name.
lv_fieldname = cl_abap_#ml_name_converter=>to_#ml_name lv_fieldname ".
lv_inde# = sy-tabi#.
* !" define range for a table mapping
data: lv_range type string.
if lv_inde# = 2.
lv_range = :(':.
else.
data: lv_inde#E type string.
lv_inde#E = lv_inde# - 2.
condense lv_inde#E.
concatenate
:('M:
lv_inde#E
:N:
into lv_range.
endif.
lv_id = sy-tabi#.
condense lv_inde# no-gaps.
condense lv_id no-gaps.
concatenate lv_#ml
JD#E:.ield #E:/,=KJ
lv_fieldname
JK>J
lv_crlf
JD#E:(ange>J %only for table mappings
lv_range
JD!#E:(ange>J
lv_crlf
JD#E:<0ath>J
lv_fieldname
JD!#E:<0ath>J
lv_crlf
J D#E:<9,5ype>stringD!#E:<9,5ype>J
lv_crlf
J Dss:'ell>J
lv_crlf
J D!ss:'ell>J
lv_crlf
J D#E:7ggregate>+oneD!#E:7ggregate>J
lv_crlf
JD!#E:.ield>J
lv_crlf
into lv_#ml. %&'$ ()4'54
endloop.
concatenate lv_#ml
JD!#E:-ntry>J
lv_crlf
into lv_#ml. %&'$ ()4'54
concatenate lv_#ml
J D!#E:)ap>J
lv_crlf
J D!#E:)ap/nfo>J
lv_crlf
JD!Aorkbook>J
lv_crlf
into lv_#ml. %&'$ ()4'54
* !" convert to 24;!9
data: lv_conv_out type ref to cl_abap_conv_out_ce.
data: lv_conv type ref to cl_abap_conv_#E#_ce.
data: lv_#ml_bin type #string.
lv_conv_out = cl_abap_conv_out_ce=>create ".
lv_conv_out->write e#porting data = lv_#ml ".
lv_#ml_bin = lv_conv_out->get_buffer ".
lv_conv = cl_abap_conv_#E#_ce=>create out_encoding = :;5.-I:
ignore_cerr = :<:
input = lv_#ml_bin ".
lv_conv->convert_c ".
ev_#ml_bin = lv_conv->get_out_buffer ".
endmethod.
method get_#ml_from_model.
data: lv_root_node type string.
data: lv_tab_siCe type i,
lv_tab_siCe_nl type i,
lv_tab_siCe_list type i.
data: lv_field_name type string,
lv_field_name_#ml type string.
data: lv_inde# type i.
data: lv_cell_value type string.
data: lv_#ml type string.
data: lv_field_type type string,
lv_tooltip type string.
data: lr_valuehelp_descr type ref to if_bsp_wd_valuehelp_descriptor,
lr_picklist_descr type ref to if_bsp_wd_valuehelp_pldescr,
lt_picklist_values type bsp_wd_dropdown_table.
data: lv_conv_out type ref to cl_abap_conv_out_ce.
data: lv_conv type ref to cl_abap_conv_#E#_ce.
data: lv_#ml_bin type #string.
data: lv_pl_binding_string type string,
lv_pl_value_path type string,
lv_pl_model_name type string,
lv_pl_mod type ref to if_bsp_model_binding,
lv_pl_ob3ect type ref to cl_bsp_wd_conte#t_node_ddlb,
lt_pl_entries type ref to bsp_wd_dropdown_table,
lv_is_tree type abap_bool,
lv_is_tree_list type abap_bool,
lv_tree_indent type string,
lv_field_inde# type i.
data: lr_entity type ref to cl_crm_bol_entity,
lv_prod_guid type comt_product_guid,
lr_cuco type ref to !glb!cl_lst_ppri_cucomain_impl,
lr_coll_prod type ref to cl_bsp_wd_collection_wrapper,
lr_iterator type ref to if_bol_bo_col_iterator,
lr_prod_it type ref to cl_crm_bol_entity,
l_o_ppritemproduct type ref to if_bsp_wd_e#t_property_access,
l_o_model_ent 580- (-. 5* cl_crm_bol_entity.
field-symbols: Dls_config> type bsp_dlc_column_descr,
Dls_ddlb_line> type bsp_wd_dropdown_line,
Dlt_entries> type bsp_wd_dropdown_table.
* !" change to 5/l name convention 6 e.g. %1% becomes %#!% 7
lv_root_node = cl_abap_#ml_name_converter=>to_#ml_name iv_name ".
* !" create name for root element
concatenate
lv_root_node
gc_items
into lv_root_node.
* !" create start of 5/+ 6not yet 24;!9 encoded but will be later7
lv_#ml = JD?#ml version=K2.1K encoding=Kutf-IK?>J.
concatenate
lv_#ml
JDJ
lv_root_node
J>J
into lv_#ml.
* !" get table siDe
data lr_model_tree type ref to cl_bsp_wd_conte#t_node_tree.
try.
lr_model_tree ?= iv_table_model.
* tree
lv_is_tree = abap_true.
lv_tab_siCe_nl = lines lr_model_tree->node_tab ".
catch: c#_root. %&'$ $A4$*#A++
* table
lv_is_tree = abap_false.
lv_tab_siCe_nl = iv_table_model->get_table_siCe ".
endtry.
data lr_model_tree_list type ref to cl_bsp_wd_conte#t_node_tree.
try.
lr_model_tree_list ?= !glb!cl_lst_itemlisted_cn11=>gv_table_model.
* tree
lv_is_tree_list = abap_true.
lv_tab_siCe_list = lines lr_model_tree_list->node_tab ".
catch: c#_root. %&'$ $A4$*#A++
* table
lv_is_tree_list = abap_false.
lv_tab_siCe_list = iv_table_model->get_table_siCe ".
endtry.
if lv_tab_siCe_nl > lv_tab_siCe_list.
lv_tab_siCe = lv_tab_siCe_nl.
else.
lv_tab_siCe = lv_tab_siCe_list.
endif.
lv_cell_value = :+ot %isted and %isted /tems:.
lv_cell_value = cl_bsp_utility=>encode_string in = lv_cell_value
encoding = if_bsp_writer=>co_html
".
check !glb!cl_lst_itemnotlisted_impl=>gr_cuco is bound.
lr_cuco = !glb!cl_lst_itemnotlisted_impl=>gr_cuco.
if lr_cuco is bound.
lr_coll_prod = lr_cuco->typed_conte#t->ppritemprod->collection_wrapper.
if lr_coll_prod is bound.
lr_iterator = lr_coll_prod->if_bol_bo_colBget_iterator ".
endif.
endif.
do lv_tab_siCe times.
* !" create 5/+ for each table row
lv_inde# = sy-inde#.
concatenate
lv_#ml
JDitem>J
into lv_#ml.
if lv_inde# D= lv_tab_siCe_list.
lr_entity ?= lr_model_tree_list->get_bo_by_inde# lv_inde# ".
clear gr_settype.
if lr_entity->get_name " e4 if_prcat_ap_bol_model=>gc_product_ob3.
call method lr_entity->get_property_as_value
e#porting
iv_attr_name = :0(*,;'5_$;/,:
importing
ev_result = lv_prod_guid.
if lr_iterator is bound.
try.
lr_prod_it ?= lr_iterator->find_by_property iv_attr_name = :0(*,;'5_(-._$;/,:
iv_value = lv_prod_guid ".
if lr_prod_it is bound.
gr_settype = lr_prod_it->get_related_entity :0pr9t7tt9800(_9-5_5802(el: ".
endif.
catch c#_sy_move_cast_error.
l_o_ppritemproduct ?= lr_iterator->find_by_property iv_attr_name = :0(*,;'5_(-
._$;/,: iv_value = lv_prod_guid ".
if lr_prod_it is bound.
l_o_model_ent ?= l_o_ppritemproduct->get_model_node ".
gr_settype = l_o_model_ent->get_related_entity :0pr9t7tt9800(_9-5_5802(el: "
.
endif.
endtry.
endif.
endif.
endif.
* for (ot +isted tems
loop at it_config assigning Dls_config>.
lv_field_inde# = sy-tabi#.
case Dls_config>-title.
when :!!6/-(7('68!'75-$*(8_5-<5: or :!!6/-(7('68!'75-$*(8_/,:.
* chec. for indent if we export a tree
if lv_field_inde# = 2.
if lv_is_tree = abap_true.
lv_tree_indent = calculate_tree_indent ir_tree_model = lr_model_tree
iv_inde# = lv_inde# ".
endif.
endif.
* !" get data for each cell
lv_field_name = Dls_config>-name.
lv_field_name_#ml = cl_abap_#ml_name_converter=>to_#ml_name lv_field_name ".
try.
lv_cell_value = iv_table_model->get_t_table attribute_path = ::
inde# = lv_inde#
component = lv_field_name ".
catch c#_root.
concatenate lv_field_name J not boundJ into lv_cell_value. %&'$ ()4'54
endtry.
* !" remove line brea.s
replace all occurrences of cl_abap_char_utilities=>cr_lf in lv_cell_value with : :.
* !" put tree indent in front if first row in tree
if lv_field_inde# = 2.
if lv_is_tree = abap_true.
lv_tree_indent = cl_bsp_utility=>encode_string in = lv_tree_indent
encoding = if_bsp_writer=>co_htm
l ". %@,,E!,F!@, cpl: problems with cross side scripting
concatenate
lv_#ml
JD/+,-+5>J
lv_tree_indent
JD!/+,-+5>J
into lv_#ml.
endif.
endif.
* !!" cell 5/+
lv_cell_value = cl_bsp_utility=>encode_string in = lv_cell_value
encoding = if_bsp_writer=>co_html ".
%@,,E!,F!@, cpl: problems with cross side scripting
concatenate
lv_#ml
JDJ
lv_field_name_#ml
J>J
lv_cell_value
JD!J
lv_field_name_#ml
J>J
into lv_#ml.
* for listed items
when others.
* chec. for indent if we export a tree
if lv_field_inde# = F.
if lv_is_tree_list = abap_true.
lv_tree_indent = calculate_tree_indent ir_tree_model = lr_model_tree_list
iv_inde# = lv_inde# ".
endif.
endif.
* !" get data for each cell
lv_field_name = Dls_config>-name.
lv_field_name_#ml = cl_abap_#ml_name_converter=>to_#ml_name lv_field_name ".
try.
lv_cell_value = !glb!cl_lst_itemlisted_cn11=>gv_table_model->get_t_table attri
bute_path = ::
inde# = lv_inde#
component = lv_field_name ".
catch c#_root.
concatenate lv_field_name J not boundJ into lv_cell_value. %&'$ ()4'54
endtry.
* !" remove line brea.s
replace all occurrences of cl_abap_char_utilities=>cr_lf in lv_cell_value with : :.
* !" put tree indent in front if first row in tree
if lv_field_inde# = F.
if lv_is_tree_list = abap_true.
lv_tree_indent = cl_bsp_utility=>encode_string in = lv_tree_indent
encoding = if_bsp_writer=>co_htm
l ". %@,,E!,F!@, cpl: problems with cross side scripting
concatenate
lv_#ml
JD/+,-+5>J
lv_tree_indent
JD!/+,-+5>J
into lv_#ml.
endif.
endif.
* !!" cell 5/+
lv_cell_value = cl_bsp_utility=>encode_string in = lv_cell_value
encoding = if_bsp_writer=>co_html
". %@,,E!,F!@, cpl: problems with cross side scripting
concatenate
lv_#ml
JDJ
lv_field_name_#ml
J>J
lv_cell_value
JD!J
lv_field_name_#ml
J>J
into lv_#ml.
endcase.
endloop.
* !" end line.
concatenate
lv_#ml
JD!item>J
into lv_#ml.
enddo.
* !" end 5/+
concatenate
lv_#ml
JD!J
lv_root_node
J>J
into lv_#ml.
* !" convert to 24;!9
lv_conv_out = cl_abap_conv_out_ce=>create ".
lv_conv_out->write e#porting data = lv_#ml ".
lv_#ml_bin = lv_conv_out->get_buffer ".
lv_conv = cl_abap_conv_#E#_ce=>create
out_encoding = :;5.-I:
ignore_cerr = :<:
input = lv_#ml_bin ".
lv_conv->convert_c ".
lv_#ml_bin = lv_conv->get_out_buffer ".
ev_#ml = lv_#ml_bin.
endmethod.
method if_bsp_wd_model_tv_e#cel_e#prtBget_data_#ml.
data: lt_config_tab type bsp_dlc_column_descr_tab,
lv_string type string. %&'$ (''D'D
field-symbols Dls_config_data> type bsp_dlc_column_descr.
* Get configuration data.
if iv_config_table is not supplied.
lt_config_tab = cl_bsp_dlc_table_utility=>get_table_from_config_#ml iv_config_#ml ".
else.
lt_config_tab = iv_config_table.
endif.
loop at lt_config_tab assigning Dls_config_data>.
* )nly consider data if it was not removed by personaliDation.
if Dls_config_data>-hidden is not initial.
delete lt_config_tab inde# sy-tabi#.
continue.
endif.
while Dls_config_data>-name ca :.:.
split Dls_config_data>-name at :.: into lv_string Dls_config_data>-name.
endwhile.
endloop.
!glb!cl_lst_itemnotlisted_cn11=>gv_e#cel = abap_true.
* ;orward to 5/+ generator.
rv_content_bin = !glb!cl_chtmlb_#ml_provider=>get_#ml_from_model it_config = lt_confi
g_tab
iv_table_model = me
iv_name = me-
>structure_name
iv_view_controller = iv_view_c
ontroller ".
!glb!cl_lst_itemnotlisted_cn11=>gv_e#cel = abap_false.
endmethod.
method if_bsp_wd_model_tv_e#cel_e#prtBget_csv.
data: lv_content_bin type #string.
data: lt_config_tab type bsp_dlc_column_descr_tab,
lv_config_data type bsp_dlc_column_descr,
lt_comp_tab type cl_chtmlb_#ml_provider=>chtmlb_tv_comp_descr_tab, %&'$ (
''D'D
lv_comp type cl_chtmlb_#ml_provider=>chtmlb_tv_comp_descr,
lv_string type string, %&'$ (''D'D
lr_view_descriptor type ref to if_bsp_dlc_view_descriptor,
lr_view_descriptor_cl type ref to cl_bsp_dlc_view_descriptor,
lv_title type bsp_dlc_element_id,
lv_csv_head type string,
lv_csv_head_bin type #string,
lv_csv_head_ret type string,
lv_conv_out type ref to cl_abap_conv_out_ce,
lv_conv_in type ref to cl_abap_conv_in_ce,
lv_conv type ref to cl_abap_conv_#E#_ce,
lv_first_column type abap_bool,
lv_cr type abap_cr_lf value cl_abap_char_utilities=>cr_lf,
lv_content type string,
lv_content_ret type string,
lv_utf_2P_headerE" type #,
lv_utf_FE_headerG" type #,
lv_is_unicode_system type trpari-flag,
lv_codepage type abap_encoding,
lv_use_utf2P type abap_bool,
lv_use_utfFE type abap_bool,
lv_use_sep_row type abap_bool,
lv_codepage_cQ1" type c,
lv_codepage_s type string,
lv_use_sep_row_not_c type c,
l_v_dummy type string,
l_v_field type name_komp,
l_v_value type string,
l_s_fields like line of !glb!cl_crmcmp_l_fview_control=>g_i_fields,
l_o_ent type ref to if_bol_bo_property_access,
l_o_cuco type ref to !glb!cl_lst_ppri_cucomain_impl,
cr_converter type ref to !glb!cl_crmcmp_l_field_convert,
ls_hiernodes type !glb!cgtgds_hiernode_details.
call function :5(_$-5_/9_;+/'*,-_9895-):
importing
ev_is_unicode_system = lv_is_unicode_system.
* collect codepage and seprow
get parameter id :'()_'9=_-<0*(5_'0: field lv_codepage_c.
lv_codepage_s = lv_codepage_c.
if lv_codepage_s is initial.
lv_codepage = :G21F:. % no codepage given !" use 24;?E
else.
* chec. if this is a cpcodepage 6G digits7
select single cpcodepage from tcp11 into lv_codepage
where cpcodepage = lv_codepage_s.
if sy-subrc D> 1.
* codepage not found- search for name
select single cpcodepage from tcp11 into lv_codepage
where cpcomment = lv_codepage_s. %&'$ *
if sy-subrc D> 1.
* codepage not found- use standard
lv_codepage = :G21F:.
endif.
endif.
endif.
lv_use_sep_row = abap_true.
get parameter id :'()_'9=_-<0*(5_9-0%+: field lv_use_sep_row_not_c.
if lv_use_sep_row_not_c = :<:.
lv_use_sep_row = abap_false.
endif.
* read column names from configuration
if iv_view_descriptor is not bound.
create ob3ect lr_view_descriptor_cl
e#porting
iv_component = iv_component
iv_viewname = iv_viewname.
lr_view_descriptor ?= lr_view_descriptor_cl.
else.
lr_view_descriptor = iv_view_descriptor.
endif.
*;or *eader Details
l_o_cuco = !glb!cl_lst_itemnotlisted_impl=>gr_cuco.
if l_o_cuco is bound.
l_o_ent = l_o_cuco->typed_conte#t->lsthdr->collection_wrapper->get_current ".
endif.
concatenate :sep=R: lv_cr into lv_csv_head.
concatenate lv_csv_head :K%/95/+$ ,-57/%9KR: lv_cr into lv_csv_head.
loop at !glb!cl_crmcmp_l_fview_control=>g_i_fields into l_s_fields.
split l_s_fields-field_name at :!!'*+,(-'*(,!: into l_v_dummy l_v_field.
if l_v_field is initial and l_v_dummy is not initial.
translate l_s_fields-field_label to upper case. %&'$ 4RA(3+A(G
clear l_v_value.
else.
try.
l_v_value = l_o_ent->get_property_as_string iv_attr_name = l_v_field ".
catch c#_crm_cic_parameter_error.
endtry.
case l_v_field.
when !glb!cl_cgtgd_list_constants=>status.
call method cl_crmcmp_c_icon_mapper=>get_icon_url_and_te#t
e#porting
iv_val = l_v_value
importing
ev_te#t = l_v_value.
when !glb!cl_cgtgd_list_constants=>kschl.
create ob3ect cr_converter
e#porting
ir_node = l_o_cuco->typed_conte#t->lsthdr.
call method cr_converter->get
e#porting
getter = :$-5_>9'6%:
attribute_path = :>9'6%:
current = l_o_ent
iv_owner = !glb!cl_crm_condrecconfed_cn11=>gr_owner
receiving
value = l_v_value.
when !glb!cl_cgtgd_list_constants=>hier_node_search_term.
read table !glb!cl_crm_condrecconfed_impl=>g_i_hier_node into ls_hiernodes with key
node_id = l_v_value. %&'$ *
if sy-subrc = 1.
l_v_value = ls_hiernodes-description.
endif.
endcase.
endif.
concatenate lv_csv_head lv_cr :K: l_s_fields-field_label :KR: into lv_csv_head.
concatenate lv_csv_head :K: l_v_value :KR: into lv_csv_head.
endloop.
* get configuration in a table format
if iv_config_table is not supplied.
lt_config_tab = cl_bsp_dlc_table_utility=>get_table_from_config_#ml iv_config_#ml ".
else.
lt_config_tab = iv_config_table.
endif.
lv_first_column = abap_true.
loop at lt_config_tab into lv_config_data.
clear lv_comp.
* column removed by personaliDation
if lv_config_data-hidden is not initial.
delete lt_config_tab inde# sy-tabi#.
continue.
endif.
* read column name
if lv_config_data-titleE" D> :!!:.
if lv_config_data-title is not initial.
lv_comp-column_title = lv_config_data-title.
else.
lv_comp-column_title = lv_config_data-name.
endif.
else.
if lr_view_descriptor is bound.
* get field label
lv_title = lv_config_data-title.
lv_comp-column_title = lr_view_descriptor->get_field_label
iv_element_id = lv_title
iv_conte#t_node = me ".
endif.
endif.
* remove <34R2$4<
while lv_config_data-name ca :.:.
split lv_config_data-name at :.: into lv_string lv_config_data-name.
endwhile.
lv_comp-name = lv_config_data-name.
if lv_comp-column_title is initial.
lv_comp-column_title = lv_config_data-name.
endif.
if lv_first_column = abap_false.
concatenate lv_csv_head :R: into lv_csv_head.
if lv_comp-column_title cs :0roduct:.
concatenate lv_csv_head :K>KR: into lv_csv_head.
endif.
else.
if lv_use_sep_row = abap_true.
concatenate lv_csv_head lv_cr into lv_csv_head.
concatenate lv_csv_head :K%/95/+$ /5-) )7/+5-+7+'-KR: into lv_csv_head.
concatenate lv_csv_head lv_cr into lv_csv_head.
concatenate lv_csv_head :K+*5%/95-,KRRR: :K%/95-,KR: into lv_csv_head.
endif.
concatenate lv_csv_head lv_cr into lv_csv_head.
concatenate lv_csv_head :K>KR: into lv_csv_head.
endif.
lv_first_column = abap_false.
concatenate lv_csv_head :K: lv_comp-column_title :K: into lv_csv_head.
endloop.
concatenate lv_csv_head lv_cr into lv_csv_head.
* chec. for codepage setting
if lv_codepage is initial.
lv_codepage = :G21F:.
endif.
lv_use_utf2P = abap_false.
lv_use_utfFE = abap_false.
case lv_codepage.
when :G21E:.
lv_use_utf2P = abap_true.
lv_utf_2P_header = :.-..:.
when :G21F:.
lv_use_utf2P = abap_true.
lv_utf_2P_header = :...-:.
when :G21G:.
lv_use_utfFE = abap_true.
lv_utf_FE_header = :1111.-..:.
when :G21Q:.
lv_use_utfFE = abap_true.
lv_utf_FE_header = :...-1111:.
endcase.
* !" convert to 24;!?E
lv_conv_out = cl_abap_conv_out_ce=>create ".
lv_conv_out->write e#porting data = lv_csv_head ".
lv_csv_head_bin = lv_conv_out->get_buffer ".
lv_conv = cl_abap_conv_#E#_ce=>create
out_encoding = lv_codepage
ignore_cerr = :<:
input = lv_csv_head_bin ".
lv_conv->convert_c ".
lv_csv_head_bin = lv_conv->get_out_buffer ".
if lv_use_utf2P = abap_true.
concatenate lv_utf_2P_header lv_csv_head_bin into lv_csv_head_bin in byte mode.
endif.
if lv_use_utfFE = abap_true.
concatenate lv_utf_FE_header lv_csv_head_bin into lv_csv_head_bin in byte mode.
endif.
if lv_is_unicode_system = abap_false.
lv_conv_in = cl_abap_conv_in_ce=>create ".
lv_conv_in->convert e#porting input = lv_csv_head_bin
importing data = lv_csv_head_ret ".
else.
lv_csv_head_ret = cl_rt_rep_toolkit=>#Es lv_csv_head_bin ".
endif.
call method me->get_data_#ml
e#porting
* iv#config#xml > iv#config#xml
iv_config_table = lt_config_tab
iv_view_controller = iv_view_controller
receiving
rv_content_bin = lv_content_bin.
lv_content = cl_chtmlb_#ml_provider=>get_csv_from_#ml lv_content_bin ".
lv_conv_out = cl_abap_conv_out_ce=>create ".
lv_conv_out->write e#porting data = lv_content ".
lv_content_bin = lv_conv_out->get_buffer ".
lv_conv = cl_abap_conv_#E#_ce=>create
out_encoding = lv_codepage
ignore_cerr = :<:
input = lv_content_bin ".
lv_conv->convert_c ".
lv_content_bin = lv_conv->get_out_buffer ".
lv_content_ret = cl_rt_rep_toolkit=>#Es lv_content_bin ".
concatenate lv_csv_head_ret lv_content_ret into rv_content.
endmethod.
method get_table_components.
*Data declaration
data: ls_result type bsp_dlc_column_descr.
data: l_v_cond type crmt_prp_type,
l_v_salesorg type string,
l_v_distch type string.
data: l_s_column type tableviewcontrol, %&'$ (''D'D
l_i_saflds type standard table of !glb!cgtt_saflds,
l_s_saflds like line of l_i_saflds,
l_i_prp_reftypes type crmt_prp_reftype_tab,
l_s_prp_reftypes like line of l_i_prp_reftypes.
data: l_o_cuco type ref to !glb!cl_lst_ppri_cucomain_impl,
l_o_lsthdr type ref to cl_crm_bol_entity.
call method super->get_table_components
receiving
rt_result = rt_result.
ls_result-name = !glb!cl_cgtgd_list_constants=>category_te#t. %<$A4'G)RH#4'54<.
ls_result-title = te#t-11F. %<=roduct $ategory 1 302<.
append ls_result to rt_result.
ls_result-name = !glb!cl_cgtgd_list_constants=>category_id . %<$A4'G)RH#D<.
ls_result-title = te#t-11Q. %<0ey<.
append ls_result to rt_result.
*for dynamic fields only
l_o_cuco = !glb!cl_lst_itemnotlisted_impl=>gr_cuco.
check l_o_cuco is bound.
l_o_lsthdr ?= l_o_cuco->typed_conte#t->lsthdr->collection_wrapper->get_current ".
check l_o_lsthdr is bound.
l_o_lsthdr->get_property_as_value e#porting iv_attr_name = !glb!cl_cgtgd_list_constants=>k
schl
importing ev_result = l_v_cond ".
l_v_salesorg = l_o_lsthdr->get_property_as_string iv_attr_name = !glb!cl_cgtgd_list_cons
tants=>sales_org ".
l_v_distch = l_o_lsthdr->get_property_as_string iv_attr_name = !glb!cl_cgtgd_list_consta
nts=>dis_channel ".
check l_v_cond cp !glb!cl_cgtgd_list_constants=>C112.
call function :'()_0(0_9-5580-9_.*(_0(0_580-:
e#porting
iv_prp_type = l_v_cond
iv_language = sy-langu
importing
et_prp_reftypes = l_i_prp_reftypes.
read table l_i_prp_reftypes into l_s_prp_reftypes inde# 2.
check l_s_prp_reftypes-settype_id = te#t-112.
select S from !glb!cgtt_saflds into table l_i_saflds where sales_org = l_v_salesorg and d
istchan = l_v_distch and active = abap_true.
loop at l_i_saflds into l_s_saflds.
case l_s_saflds-additionalfields.
when !glb!cl_cgtgd_list_constants=>ccode.%<$234)/'R$)D'<.
ls_result-name = l_s_saflds-additionalfields.
ls_result-title = te#t-11P .%<$ustomer$ode<.
append ls_result to rt_result.
when !glb!cl_cgtgd_list_constants=>lgrd.%<+34(GGRAD'<.
ls_result-name = l_s_saflds-additionalfields.
ls_result-title = te#t-11H. %<+istingGrade<.
append ls_result to rt_result.
when !glb!cl_cgtgd_list_constants=>retpric.%<R'4A+=R$'<.
ls_result-name = l_s_saflds-additionalfields.
ls_result-title = te#t-11I. %<RecRetail=rice<.
append ls_result to rt_result.
when !glb!cl_cgtgd_list_constants=>retprmg.%<R'4A+=R/ARG(<.
ls_result-name = l_s_saflds-additionalfields.
ls_result-title = te#t-11T. %<Retail/argin<.
append ls_result to rt_result.
when !glb!cl_cgtgd_list_constants=>npspcase.%<(=3='R$A3'<.
ls_result-name = l_s_saflds-additionalfields.
ls_result-title = te#t-121. %<(=3=er$ase<.
append ls_result to rt_result.
when !glb!cl_cgtgd_list_constants=>npspunit.%<(=3='R2(4<.
ls_result-name = l_s_saflds-additionalfields.
ls_result-title = te#t-122. %<(=3=er2nit<6,??7.
append ls_result to rt_result.
endcase.
endloop.
endmethod.
method $-5_57&%-_%/+-_97)0%-.
580-9: &-$/+ *. line,
'75-$*(8_/, 580- '*)5_'75-$*(8_/,,
'75-$*(8_5-<5 580- '*)5_'75-$*(8_5-<5,
6/-(7('68_/, 580- '*)5_6/-(7('68_/,,
6/-(7('68_5-<5 580- '*)5_6/-(7('68_5-<5,
9-7('6_(-9;%5 580- '()5_&**%-7+,
-+, *. line.
'(-75- ,757 rv_sample 580- line.
endmethod.
)-56*, refresh.
,757: l_o_entity 580- (-. 5* cl_crm_bol_entity,
l_o_iterator 580- (-. 5* if_bol_bo_col_iterator,
l_o_root 580- (-. 5* if_bsp_wd_tree_node.
super->refresh ".
5(8.
l_o_iterator = me->collection_wrapper->get_iterator ".
l_o_entity ?= l_o_iterator->get_first ".
A6/%- l_o_entity /9 &*;+,.
l_o_root = me->node_factory->get_pro#y
iv_bo = l_o_entity
iv_pro#y_type = :!$%&!'%_%95_/5-)+*5%/95-,_'+12: ".
* iv#proxy#type > 1glb1cl#cgtgd#list#constants>"itmnotlist#cn,? 7.
l_o_root->node_key = add_root_node l_o_root ".
l_o_root->e#pand_node ".
l_o_entity ?= l_o_iterator->get_ne#t ".
-+,A6/%-.
'75'6 c#_sy_move_cast_error c#_sy_ref_is_initial.
-+,5(8.
-+,)-56*,.
method $-5_)_6/-(7('68_/,.
,757: attr 580- '*)5_6/-(7('68_/,.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :6/-(7('68_/,: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_)_6/-(7('68_5-<5.
,757: attr 580- '*)5_6/-(7('68_5-<5.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :6/-(7('68_5-<5: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_)_%7+$;.
,757: attr 580- 90(79.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :%7+$;: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_)_%7+$;_5-<5.
,757: attr 580- '67(2P.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :%7+$;_5-<5: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_)_(**5_'75_$;/,.
,757: attr 580- '*)5_'75-$*(8_$;/,.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :(**5_'75_$;/,: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_(**5_'75_$;/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value =
:0r'ategory6ierarchy not bound:. %&'$ ()4'54
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
5(8.
dref = current->get_property :(**5_'75_$;/,: ".%&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
value = :0r'ategory6ierarchy!(**5_'75_$;/, not bound:.%&'$ ()4'54
(-5;(+.
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> type ,757.
assign dref->S to Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method 9-5_6/-(7('68_$;/,.
,757:
current 580- (-. 5* if_bol_bo_property_access,
dref 580- (-. 5* data,
copy 580- (-. 5* data.
./-%,-98)&*%9:
Dnval> 580- 7+8,
Doval> 580- 7+8.
* get current entity
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
* get old value and dataref to appropriate type
5(8.
5(8.
dref = current->get_property :6/-(7('68_$;/,: ".%&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
* assure that attribue exists
'6-'> dref /9 &*;+,.
* set Boval" to old value
799/$+ dref->S 5* Doval>.
* create a copy for new value
'(-75- ,757 copy %/>- Doval>.
* set Bnval" to new value
799/$+ copy->S 5* Dnval>.
* fill new value using the right conversion
5(8.
'7%% )-56*, if_bsp_model_utilBconvert_from_string
-<0*(5/+$
data_ref = copy
value = value.
'75'6 c#_sy_conversion_error.
(7/9- -<'-05/*+ 580- c#_bsp_conv_failed
-<0*(5/+$
name = :6/-(7('68_$;/,:. %&'$ ()4'54
-+,5(8.
* only set new value if value has changed
/. Dnval> D> Doval>.
current->set_property
iv_attr_name = :6/-(7('68_$;/,: %&'$ ()4'54
iv_value = Dnval> ".
-+,/..
endmethod.
method 9-5_6/-(7('68_/,.
,757:
current 580- (-. 5* if_bol_bo_property_access,
dref 580- (-. 5* data,
copy 580- (-. 5* data.
./-%,-98)&*%9:
Dnval> 580- 7+8,
Doval> 580- 7+8.
* get current entity
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
* get old value and dataref to appropriate type
5(8.
5(8.
dref = current->get_property :6/-(7('68_/,: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
* assure that attribue exists
'6-'> dref /9 &*;+,.
* set Boval" to old value
799/$+ dref->S 5* Doval>.
* create a copy for new value
'(-75- ,757 copy %/>- Doval>.
* set Bnval" to new value
799/$+ copy->S 5* Dnval>.
* fill new value using the right conversion
5(8.
'7%% )-56*, if_bsp_model_utilBconvert_from_string
-<0*(5/+$
data_ref = copy
value = value.
'75'6 c#_sy_conversion_error.
(7/9- -<'-05/*+ 580- c#_bsp_conv_failed
-<0*(5/+$
name = :6/-(7('68_/,:. %&'$ ()4'54
-+,5(8.
* only set new value if value has changed
/. Dnval> D> Doval>.
current->set_property
iv_attr_name = :6/-(7('68_/,: %&'$ ()4'54
iv_value = Dnval> ".
-+,/..
endmethod.
method 9-5_6/-(7('68_5-<5.
,757:
current 580- (-. 5* if_bol_bo_property_access,
dref 580- (-. 5* data,
copy 580- (-. 5* data.
./-%,-98)&*%9:
Dnval> 580- 7+8,
Doval> 580- 7+8.
* get current entity
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
* get old value and dataref to appropriate type
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$ ()4'54
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
5(8.
dref = current->get_property :6/-(7('68_5-<5: ".%&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
* assure that attribue exists
'6-'> dref /9 &*;+,.
* set Boval" to old value
799/$+ dref->S 5* Doval>.
* create a copy for new value
'(-75- ,757 copy %/>- Doval>.
* set Bnval" to new value
799/$+ copy->S 5* Dnval>.
* fill new value using the right conversion
5(8.
'7%% )-56*, if_bsp_model_utilBconvert_from_string
-<0*(5/+$
data_ref = copy
value = value.
'75'6 c#_sy_conversion_error.
(7/9- -<'-05/*+ 580- c#_bsp_conv_failed
-<0*(5/+$
name = :6/-(7('68_5-<5:. %&'$ ()4'54
-+,5(8.
* only set new value if value has changed
/. Dnval> D> Doval>.
current->set_property
iv_attr_name = :6/-(7('68_5-<5: %&'$ ()4'54
iv_value = Dnval> ".
-+,/..
endmethod.
method 9-5_%7+$;.
,757:
current 580- (-. 5* if_bol_bo_property_access,
dref 580- (-. 5* data,
copy 580- (-. 5* data.
./-%,-98)&*%9:
Dnval> 580- 7+8,
Doval> 580- 7+8.
* get current entity
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
* get old value and dataref to appropriate type
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$ ()4'54
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
5(8.
dref = current->get_property :%7+$;: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
* assure that attribue exists
'6-'> dref /9 &*;+,.
* set Boval" to old value
799/$+ dref->S 5* Doval>.
* create a copy for new value
'(-75- ,757 copy %/>- Doval>.
* set Bnval" to new value
799/$+ copy->S 5* Dnval>.
* fill new value using the right conversion
5(8.
'7%% )-56*, if_bsp_model_utilBconvert_from_string
-<0*(5/+$
data_ref = copy
value = value.
'75'6 c#_sy_conversion_error.
(7/9- -<'-05/*+ 580- c#_bsp_conv_failed
-<0*(5/+$
name = :%7+$;:. %&'$ ()4'54
-+,5(8.
* only set new value if value has changed
/. Dnval> D> Doval>.
current->set_property
iv_attr_name = :%7+$;: %&'$ ()4'54
iv_value = Dnval> ".
-+,/..
endmethod.
method 9-5_%7+$;_5-<5.
,757:
current 580- (-. 5* if_bol_bo_property_access,
dref 580- (-. 5* data,
copy 580- (-. 5* data.
./-%,-98)&*%9:
Dnval> 580- 7+8,
Doval> 580- 7+8.
* get current entity
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
* get old value and dataref to appropriate type
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$ ()4'54
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
5(8.
dref = current->get_property :%7+$;_5-<5: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
* assure that attribue exists
'6-'> dref /9 &*;+,.
* set Boval" to old value
799/$+ dref->S 5* Doval>.
* create a copy for new value
'(-75- ,757 copy %/>- Doval>.
* set Bnval" to new value
799/$+ copy->S 5* Dnval>.
* fill new value using the right conversion
5(8.
'7%% )-56*, if_bsp_model_utilBconvert_from_string
-<0*(5/+$
data_ref = copy
value = value.
'75'6 c#_sy_conversion_error.
(7/9- -<'-05/*+ 580- c#_bsp_conv_failed
-<0*(5/+$
name = :%7+$;_5-<5:. %&'$ ()4'54
-+,5(8.
* only set new value if value has changed
/. Dnval> D> Doval>.
current->set_property
iv_attr_name = :%7+$;_5-<5: %&'$ ()4'54
iv_value = Dnval> ".
-+,/..
endmethod.
method 9-5_(**5_'75_$;/,.
,757:
current 580- (-. 5* if_bol_bo_property_access,
dref 580- (-. 5* data,
copy 580- (-. 5* data.
./-%,-98)&*%9:
Dnval> 580- 7+8,
Doval> 580- 7+8.
* get current entity
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
* get old value and dataref to appropriate type
5(8.
5(8.
dref = current->get_property :(**5_'75_$;/,: ".%&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
* assure that attribue exists
'6-'> dref /9 &*;+,.
* set Boval" to old value
799/$+ dref->S 5* Doval>.
* create a copy for new value
'(-75- ,757 copy %/>- Doval>.
* set Bnval" to new value
799/$+ copy->S 5* Dnval>.
* fill new value using the right conversion
5(8.
'7%% )-56*, if_bsp_model_utilBconvert_from_string
-<0*(5/+$
data_ref = copy
value = value.
'75'6 c#_sy_conversion_error.
(7/9- -<'-05/*+ 580- c#_bsp_conv_failed
-<0*(5/+$
name = :(**5_'75_$;/,:. %&'$ ()4'54
-+,5(8.
* only set new value if value has changed
/. Dnval> D> Doval>.
current->set_property
iv_attr_name = :(**5_'75_$;/,: %&'$ ()4'54
iv_value = Dnval> ".
-+,/..
endmethod.
method $-5_6/-(7('68_$;/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value =
:0r'ategory6ierarchy not bound:. %&'$ ()4'54
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
5(8.
dref = current->get_property :6/-(7('68_$;/,: ".%&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
value = :0r'ategory6ierarchy!6/-(7('68_$;/, not bound:.%&'$ ()4'54
(-5;(+.
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> type ,757.
assign dref->S to Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_6/-(7('68_/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value =
:0r'ategory6ierarchy not bound:. %&'$ ()4'54
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
5(8.
dref = current->get_property :6/-(7('68_/,: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
value = :0r'ategory6ierarchy!6/-(7('68_/, not bound:. %&'$ ()4'54
(-5;(+.
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> type ,757.
assign dref->S to Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_6/-(7('68_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value =
:0r'ategory6ierarchy not bound:. %&'$ ()4'54
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$ ()4'54
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
5(8.
dref = current->get_property :6/-(7('68_5-<5: ".%&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
value =
:0r'ategory6ierarchy!0r'ategory6ierarchy,escr... not bound:.%&'$ ()4'54
(-5;(+.
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> type ,757.
assign dref->S to Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_/_6/-(7('68_$;/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
/. current->is_property_readonly
:6/-(7('68_$;/,: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_/_6/-(7('68_/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
/. current->is_property_readonly
:6/-(7('68_/,: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_/_6/-(7('68_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$ ()4'54
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
/. current->is_property_readonly
:6/-(7('68_5-<5: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_/_%7+$;.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$ ()4'54
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
/. current->is_property_readonly
:%7+$;: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_/_%7+$;_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$ ()4'54
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
/. current->is_property_readonly
:%7+$;_5-<5: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_/_(**5_'75_$;/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
/. current->is_property_readonly
:(**5_'75_$;/,: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_%7+$;.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value =
:0r'ategory6ierarchy not bound:. %&'$ ()4'54
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$ ()4'54
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
5(8.
dref = current->get_property :%7+$;: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
value =
:0r'ategory6ierarchy!0r'ategory6ierarchy,escr... not bound:.%&'$ ()4'54
(-5;(+.
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> type ,757.
assign dref->S to Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_%7+$;_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value =
:0r'ategory6ierarchy not bound:. %&'$ ()4'54
if iterator is bound.
current = iterator->get_current ".
else.
current = collection_wrapper->get_current ".
endif.
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$ ()4'54
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
5(8.
dref = current->get_property :%7+$;_5-<5: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
value =
:0r'ategory6ierarchy!0r'ategory6ierarchy,escr... not bound:.%&'$ ()4'54
(-5;(+.
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> type ,757.
assign dref->S to Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_)_6/-(7('68_$;/,.
,757: attr 580- '*)5_6/-(7('68_$;/,.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :6/-(7('68_$;/,: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
)-56*, map_key_to_id#_table.
* maps the select nodes 6!" .eys7 to 2 indices.
* just before 2 display
,757 lt_sel_id#_table 580- intG_table.
,757 ls_key 580- string.
%**0 75 gt_selrow_key_table /+5* ls_key .
(-7, 57&%- me->node_tab A/56 >-8 node_key = ls_key
5(7+90*(5/+$ +* ./-%,9 .
/. sy-subrc -? 1 .
700-+, sy-tabi# 5* lt_sel_id#_table .
-+,/..
-+,%**0.
* if after loop lt#sel#idx#table is initial add initial value
/. lt_sel_id#_table /9 /+/5/7%.
700-+, -2 5* lt_sel_id#_table .
-+,/..
rt_selinde#_table = lt_sel_id#_table .
-+,)-56*,.
method get_children.
data:ls_node like line of it_nodes,
ls_node_entry type crmt_bsp_treetable_node,
lr_category type ref to cl_crm_bol_entity,
lr_prod_category type ref to cl_crm_bol_entity,
lv_category_guid type comt_category_guid,
lv_prodcat_guid type comt_category_guid,
lv_prod_guid type comt_product_guid,
ls_node_tab type crmt_bsp_treetable_node,
ls_products type lstruc_categ_prod,
l_i_category_level type comt_category_api_e#p_tab,
l_s_category_level type comt_category_api_e#p,
l_v_siCe type intG.
* build hierarchy table
clear me->gt_node_tab.
* clear gt#children.
loop at it_nodes into ls_node.
ls_node_entry-node_key = ls_node->node_key.
ls_node_entry-icon = ls_node->get_icon ".
ls_node_entry-tooltip = ls_node->get_icon_tooltip ".
ls_node_entry-is_e#panded = ls_node->is_e#panded ".
ls_node_entry-is_leaf = ls_node->is_leaf.
append ls_node_entry to me->gt_node_tab.
lr_category ?= get_bo ls_node->node_key ".
check lr_category is bound.
if lr_category->get_name " e4 if_prcat_ap_bol_model=>gc_category_ob3.
call method lr_category->get_property_as_value
e#porting
iv_attr_name = :'75-$*(8_$;/,:
importing
ev_result = lv_category_guid.
insert lv_category_guid into table gt_children.
elseif lr_category->get_name " e4 if_prcat_ap_bol_model=>gc_product_ob3.
call method lr_category->get_property_as_value
e#porting
iv_attr_name = :0(*,;'5_$;/,:
importing
ev_result = lv_prod_guid.
* get the corresponding category guid as well.
read table node_tab into ls_node_tab with key node_key = ls_node->node_key.
lr_prod_category ?= get_bo ls_node_tab-parent_key ".
call method lr_prod_category->get_property_as_value
e#porting
iv_attr_name = :'75-$*(8_$;/,:
importing
ev_result = lv_prodcat_guid.
ls_products-category_guid = lv_prodcat_guid.
ls_products-product_guid = lv_prod_guid.
append ls_products to gt_products.
* read higher levels and chec. whether the category guid id
call function :'*)_'75-$*(8_(-7,_6/$6-(%-=-%9:
e#porting
iv_category_guid = lv_prodcat_guid
importing
et_category = l_i_category_level
e#ceptions
others = 1.
l_v_siCe = lines l_i_category_level " - 2 .
loop at l_i_category_level into l_s_category_level.
if sy-tabi# = l_v_siCe .
read table l_i_category_level into l_s_category_level inde# l_v_siCe.
append l_s_category_level-category_guid to !glb!cl_lst_ppri_cucomain_impl=>gt_categ
listed_guids.
endif.
read table gt_children transporting no fields with table key table_line = l_s_catego
ry_level-category_guid.
if sy-subrc = 1.
e#it.
endif.
endloop.
endif.
if ls_node->is_leaf = abap_false.
* process subnodes
add_children_nodes ls_node ".
endif.
endloop.
endmethod.
method add_children_nodes .
data: lt_nodes type bsp_wd_tree_node_tab,
lv_node type bsp_wd_tree_node_ref,
ls_node_entry type crmt_bsp_treetable_node.
field-symbols: Dnode_entry> type crmt_bsp_treetable_node.
data: lr_category type ref to cl_crm_bol_entity,
lr_prod_category type ref to cl_crm_bol_entity.
data:lv_category_guid type comt_category_guid,
lv_prodcat_guid type comt_category_guid,
lv_prod_guid type comt_product_guid,
ls_products type lstruc_categ_prod.
rv_no_children = abap_false.
lt_nodes = me->get_child_nodes iv_node ".
loop at lt_nodes into lv_node.
ls_node_entry-node_key = lv_node->node_key.
ls_node_entry-parent_key = iv_node->node_key.
ls_node_entry-icon = lv_node->get_icon ".
ls_node_entry-tooltip = lv_node->get_icon_tooltip ".
ls_node_entry-is_e#panded = lv_node->is_e#panded ".
ls_node_entry-is_leaf = lv_node->is_leaf.
lr_category ?= get_bo lv_node->node_key ".
check lr_category is bound.
if lr_category->get_name " e4 if_prcat_ap_bol_model=>gc_category_ob3.
call method lr_category->get_property_as_value
e#porting
iv_attr_name = :'75-$*(8_$;/,:
importing
ev_result = lv_category_guid.
insert lv_category_guid into table gt_children.
elseif lr_category->get_name " e4 if_prcat_ap_bol_model=>gc_product_ob3.
call method lr_category->get_property_as_value
e#porting
iv_attr_name = :0(*,;'5_$;/,:
importing
ev_result = lv_prod_guid.
* get the corresponding category guid as well.
lr_prod_category ?= get_bo iv_node->node_key ".
call method lr_prod_category->get_property_as_value
e#porting
iv_attr_name = :'75-$*(8_$;/,:
importing
ev_result = lv_prodcat_guid.
ls_products-category_guid = lv_prodcat_guid.
ls_products-product_guid = lv_prod_guid.
append ls_products to gt_products.
endif.
append ls_node_entry to me->gt_node_tab assigning Dnode_entry>.
if ls_node_entry-is_leaf = abap_false.
* process subnodes
Dnode_entry>-is_leaf = add_children_nodes lv_node ".
endif.
endloop.
if lt_nodes is initial.
rv_no_children = abap_true.
endif.
endmethod.
method $-5_'6/%,(-+_+%.
rt_children_node = me->get_child_nodes ir_tree_node ".
endmethod.
method get_children_sku.
data: lt_children_node type bsp_wd_tree_node_tab,
lt_child_node type bsp_wd_tree_node_tab,
lt_child_ref_buf type bsp_wd_tree_node_tab,
l_s_children_ref like line of lt_children_node,
l_s_child_ref like line of lt_children_node,
l_o_model_ent type ref to cl_crm_bol_entity, %&'$ (''D'D
l_v_lines type i,
l_v_line type i value 2.
lt_children_node = me->get_child_nodes ir_tree_node ".
l_v_lines = lines lt_children_node ".
while l_v_lines is not initial.
read table lt_children_node into l_s_children_ref inde# l_v_line.
if l_s_children_ref is bound and l_s_children_ref->get_node_name " e4 if_prcat_ap_bol_mo
del=>gc_category_ob3.
lt_child_node = me->get_child_nodes l_s_children_ref ".
append l_s_children_ref to rt_children_node.
endif.
loop at lt_child_node into l_s_child_ref .
if l_s_child_ref is bound and l_s_child_ref->get_node_name " e4 if_prcat_ap_bol_model=
>gc_category_ob3.
append l_s_child_ref to lt_child_ref_buf.
endif.
endloop.
clear lt_child_node.
l_v_line = l_v_line U 2.
l_v_lines = l_v_lines - 2.
if l_v_lines D 2.
lt_children_node = lt_child_ref_buf .
clear lt_child_ref_buf.
check lt_children_node is not initial.
l_v_lines = lines lt_children_node ".
l_v_line = 2.
endif.
endwhile.
endmethod.
)-56*, if_bsp_wd_tree_nodeBget_children.
,757: l_v_parent_guid 580- comt_category_guid ,
l_v_category_guid 580- comt_category_guid,
l_v_hit_string 580- string,
l_v_e#panded 580- comt_boolean,
l_v_e#panded_child 580- comt_boolean.
,757: l_o_coll 580- (-. 5* if_bol_bo_col,
l_o_entity 580- (-. 5* cl_crm_bol_entity,
l_o_child_typed 580- (-. 5* !glb!cl_lst_itemnotlisted_cn1E,
l_o_bo 580- (-. 5* if_bol_bo_property_access,
l_o_bo_child 580- (-. 5* if_bol_bo_property_access,
l_o_core 580- (-. 5* cl_crm_bol_core ,
l_o_coll_child 580- (-. 5* if_bol_bo_col,
l_o_coll_children 580- (-. 5* if_bol_bo_col,
l_o_coll_childrens 580- (-. 5* if_bol_bo_col,
l_o_cuco type ref to !glb!cl_lst_ppri_cucomain_impl,
l_v_sales_org type crmt_sales_org,
l_o_lsthdr type ref to cl_crm_bol_entity,
l_v_leaf type crmt_boolean.
5(8.
'7%% )-56*, me->bo->get_property_as_value
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>category_guid
/)0*(5/+$
ev_result = l_v_parent_guid.
* $A++ /'4*)D me!"3#()D'#+'A;
* '5=)R4(G
* #8#$A4'G)RH#G2D > l#v#parent#guid
* /=)R4(G
* '#8#+'A; > l#v#leaf
* .
* l#o#cuco > 1glb1cl#lst#itemnotlisted#impl>"gr#cuco.
* l#o#lsthdr J> l#o#cuco!"typed#context!"lsthdr!"collection#wrapper!"get#current6 7
.
* try.
* l#o#lsthdr!"get#property#as#value6 exporting
* iv#attr#name > 1glb1cl#cgtgd#list#constants>"sales#org
* importing
* ev#result > l#v#sales#org 7.
* catch cx#crm#cic#parameter#error.
* endtry.
*
* if l#v#leaf eI abap#true or l#v#sales#org is initial.
*
*********************(estle 3pecific $oding******************
/. !glb!cl_cgtgd_cat_smart_search=>check_auth_for_smart_search " -? abap_true.
/. !glb!cl_lst_ppri_cucomain_impl=>gv_smart_search -? abap_true.
,757 : lr_smart_search 580- (-. 5* !glb!cl_cgtgd_cat_smart_search.
lr_smart_search = !glb!cl_cgtgd_cat_smart_search=>get_instance ".
'7%% )-56*, lr_smart_search->get_children_for_guid
-<0*(5/+$
iv_parent_guid = l_v_parent_guid
/)0*(5/+$
et_children = l_o_coll.
-+,/..
-+,/..
*********************(estle 3pecific $oding******************
** Get the instance of bol core services
*
l_o_bo = l_o_coll->get_first ".
A6/%- l_o_bo /9 &*;+,.
* get the info from the bo:
'7%% )-56*, l_o_bo->get_property_as_value
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>category_guid
/)0*(5/+$
ev_result = l_v_category_guid.
'7%% )-56*, l_o_bo->get_property_as_string
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>hit
(-'-/=/+$
rv_result = l_v_hit_string.
l_o_core = cl_crm_bol_core=>get_instance ".
* create a category object from the guid.
l_o_entity = l_o_core->get_root_entity
iv_ob3ect_name = if_prcat_ap_bol_model=>gc_category_ob3
iv_ob3ect_guid = l_v_category_guid ".
'7%% )-56*, me->/9_+*,-_%-7.
-<0*(5/+$
/_=_'75-$*(8_$;/, = l_v_category_guid
/)0*(5/+$
-_=_%-7. = l_v_leaf
.
l_o_cuco = !glb!cl_lst_itemnotlisted_impl=>gr_cuco.
l_o_lsthdr ?= l_o_cuco->typed_conte#t->lsthdr->collection_wrapper->get_current ".
try.
l_o_lsthdr->get_property_as_value e#porting
iv_attr_name = !glb!cl_cgtgd_list_constants=>sales_org
importing
ev_result = l_v_sales_org ".
catch c#_crm_cic_parameter_error.
endtry.
if l_v_leaf e4 abap_true or l_v_sales_org is initial.
5(8.
l_o_child_typed ?= me->node_factory->get_pro#y
iv_bo = l_o_entity
iv_pro#y_type = :!$%&!'%_%95_/5-)+*5%/95-,_'+1E:
iv_parent_pro#y = me ".
l_o_child_typed->if_bsp_wd_tree_nodeBe#pand_node ".
*******************(estle 3pecific $oding******************
/. !glb!cl_cgtgd_cat_smart_search=>check_auth_for_smart_search " -? abap_true.
/. !glb!cl_lst_ppri_cucomain_impl=>gv_smart_search -? abap_true.
lr_smart_search = !glb!cl_cgtgd_cat_smart_search=>get_instance ".
'7%% )-56*, lr_smart_search->get_children_for_guid
-<0*(5/+$
iv_parent_guid = l_v_category_guid
/)0*(5/+$
et_children = l_o_coll_child
ev_e#pandable = l_v_e#panded_child.
/. l_o_coll_child /9 &*;+, 7+, l_o_coll_child->siCe " > 1 .%A(D l#v#expande
d#$*+D 'K <5< .
l_o_child_typed->if_bsp_wd_tree_nodeBe#pand_node ".
-%9-.
l_o_child_typed->if_bsp_wd_tree_nodeBcollaps_node ".
/. l_o_coll_child /9 +*5 &*;+,.
'7%% )-56*, l_o_child_typed->set_node_is_leaf
-<0*(5/+$
iv_is_leaf = abap_true.
-+,/..
-+,/..
'%-7( l_v_e#panded_child.
.(-- l_o_coll_child.
-+,/..
-+,/..
********************(estle 3pecific $oding******************
5(8.
'7%% )-56*, l_o_child_typed->set_search_result
-<0*(5/+$
attribute_path = ::
value = l_v_hit_string.
'75'6 c#_sy_dyn_call_illegal_method.
-+,5(8.
700-+, l_o_child_typed 5* rt_children.
'75'6 c#_sy_move_cast_error.
-+,5(8.
endif.
l_o_bo = l_o_coll->get_ne#t ".
-+,A6/%- .
* endif.
'75'6 c#_sy_move_cast_error c#_sy_ref_is_initial
c#_crm_genil_model_error c#_crm_cic_parameter_error .
-+,5(8.
-+,)-56*,.
method $-5_'75-$*(8_/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value = ::. %&'$ ()4'54
current = bo.
*
* 4RH.
*
* 4RH.
* dref > current!"get#property6 <$A4'G)RH#4'54< 7. %&'$ ()4'54
* $A4$* cx#crm#cic#parameter#error.
* '(D4RH.
*
* $A4$* cx#sy#ref#is#initial cx#sy#move#cast#error
* cx#crm#genil#model#error.
* R'42R(.
* '(D4RH.
/. dref /9 +*5 &*;+,.
5(8.
dref = current->get_property :'75-$*(8_/,: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
/. dref /9 +*5 &*;+,.
value = ::.
(-5;(+.
-+,/..
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> 580- data.
799/$+ dref->S 5* Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_'75-$*(8_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value = ::. %&'$ ()4'54
current = bo.
5(8.
5(8.
dref = current->get_property :'75-$*(8_5-<5: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
5(8.
dref = current->get_property :'75-$*(8_/,: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
/. dref /9 +*5 &*;+,.
value = ::.
(-5;(+.
-+,/..
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> 580- data.
799/$+ dref->S 5* Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_/_'75-$*(8_/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
current = bo.
5(8.
/. current->is_property_readonly
:'75-$*(8_/,: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_/_'75-$*(8_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
current = bo.
5(8.
/. current->is_property_readonly
:'75-$*(8_5-<5: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_)_'75-$*(8_/,.
,757: attr 580- '*)5_'75-$*(8_/,.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :'75-$*(8_/,: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_)_'75-$*(8_5-<5.
,757: attr 580- '*)5_'75-$*(8_5-<5.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :'75-$*(8_5-<5: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_6/-(7('68_/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value = ::. %&'$ ()4'54
current = bo.
5(8.
5(8.
dref = current->get_property :6/-(7('68_/,: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
value = ::. %&'$ ()4'54
(-5;(+.
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> type ,757.
assign dref->S to Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_)_6/-(7('68_/,.
,757: attr 580- comt_hierarchy_id.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :6/-(7('68_/,: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_/_6/-(7('68_/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
current = bo.
5(8.
/. current->is_property_readonly
:6/-(7('68_/,: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_6/-(7('68_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value = ::. %&'$ ()4'54
current = bo.
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity,
lv_language 580- sylangu.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = if_prcat_ap_bol_model=>gc_hierarchy_descr_rel ".%&'$
* +ogic for displaying the hierarchy description in the current language
current = coll->get_first ".
A6/%- current /9 &*;+,.
current->get_property_as_value
-<0*(5/+$
iv_attr_name = :%7+$;:
/)0*(5/+$
ev_result = lv_language ".
/. lv_language -? sy-langu.
-</5.
-+,/..
current = coll->get_ne#t ".
-+,A6/%-.
/. current /9 +*5 &*;+,.
5(8.
dref = entity->get_property :6/-(7('68_/,: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
-%9-.
5(8.
dref = current->get_property :6/-(7('68_5-<5: ".%&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
value = ::. %&'$ ()4'54
(-5;(+.
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> 580- data.
799/$+ dref->S 5* Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_/_6/-(7('68_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
current = bo.
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
/. current->is_property_readonly
:6/-(7('68_5-<5: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_)_6/-(7('68_5-<5.
,757: attr 580- comt_hierarchy_te#t.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :6/-(7('68_5-<5: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_9-7('6_(-9;%5.
value = abap_false.
endmethod.
method $-5_0_9-7('6_(-9;%5.
'79- iv_property.
A6-+ if_bsp_wd_model_setter_getter=>fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>field_type_checkbo#.
-+,'79-.
endmethod.
method $-5_/_9-7('6_(-9;%5.
rv_disabled = :5(;-:.
endmethod.
method $-5_)_9-7('6_(-9;%5.
,757: attr 580- crmt_boolean.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :9-7('6_(-9;%5: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method /9_+*,-_%-7..
data: l_v_e#panded type comt_boolean,
l_v_e#panded_child type comt_boolean,
l_v_added type abap_bool,
l_v_status type yyvmsta,
l_v_sales_org type crmt_sales_org,
l_v_dist_chan type crmt_distribution_channel,
l_v_category_guid type comt_category_guid ,
l_v_hit_string type string.
data: l_i_product_list type comt_product_selection_tab,
l_s_product_list like line of l_i_product_list.
data: l_o_coll type ref to if_bol_bo_col,
l_o_entity type ref to cl_crm_bol_entity,
l_o_child_typed type ref to !glb!cl_lst_itemnotlisted_cn1E,
l_o_prod_typed type ref to !glb!cl_lst_itemnotlisted_cn1F,
l_o_prod_entity type ref to cl_crm_bol_entity,
l_o_bo type ref to if_bol_bo_property_access,
l_o_bo2 type ref to if_bol_bo_property_access,
l_o_core type ref to cl_crm_bol_core ,
l_o_coll_child type ref to if_bol_bo_col,
l_o_cuco type ref to !glb!cl_lst_ppri_cucomain_impl,
l_o_root type ref to if_bsp_wd_tree_node,
l_o_lsthdr type ref to cl_crm_bol_entity,
l_v_leaf type crmt_boolean.
constants: l_c_C2 type yyvmsta value :O2:,
l_c_C# type yyvmsta value :O<:.
%_=_%-7. = 7&70_.7%9-.
if !glb!cl_cgtgd_cat_smart_search=>check_auth_for_smart_search " e4 abap_true.
if !glb!cl_lst_ppri_cucomain_impl=>gv_smart_search e4 abap_true.
data : lr_smart_search type ref to !glb!cl_cgtgd_cat_smart_search.
lr_smart_search = !glb!cl_cgtgd_cat_smart_search=>get_instance ".
call method lr_smart_search->get_children_for_guid
-<0*(5/+$
iv_parent_guid = i_v_category_guid
/)0*(5/+$
et_children = l_o_coll.
endif.
endif.
if l_o_coll is bound and l_o_coll->siCe " > 1 .
l_o_core = cl_crm_bol_core=>get_instance ".
l_o_bo = l_o_coll->get_first ".
while l_o_bo is bound.
call method l_o_bo->get_property_as_value
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>category_guid
/)0*(5/+$
ev_result = l_v_category_guid.
'7%% )-56*, me->/9_+*,-_%-7.
-<0*(5/+$
/_=_'75-$*(8_$;/, = l_v_category_guid
/)0*(5/+$
-_=_%-7. = l_v_leaf
.
-_=_%-7. = %_=_%-7..
l_o_bo = l_o_coll->get_ne#t ".
endwhile.
else.
if !glb!cl_lst_ppri_cucomain_impl=>g_v_sa_flag is not initial.
check !glb!cl_lst_itemnotlisted_impl=>gr_cuco is bound.
l_o_cuco = !glb!cl_lst_itemnotlisted_impl=>gr_cuco.
l_o_lsthdr ?= l_o_cuco->typed_conte#t->lsthdr->collection_wrapper->get_current ".
try.
l_o_lsthdr->get_property_as_value e#porting
iv_attr_name = !glb!cl_cgtgd_list_constants=>sales_org
importing
ev_result = l_v_sales_org ".
l_o_lsthdr->get_property_as_value e#porting
iv_attr_name = !glb!cl_cgtgd_list_constants=>dis_channel
importing
ev_result = l_v_dist_chan ".
catch c#_crm_cic_parameter_error.
endtry.
call function :'()_0(*,;'5_$-5_A/56_97%-9_'75:
-<0*(5/+$
iv_salescat_guid = i_v_category_guid
iv_sales_org = l_v_sales_org
iv_distr_channel = l_v_dist_chan
iv_read_short_desc = abap_false
iv_langu = sy-langu
/)0*(5/+$
et_product = l_i_product_list.
else.
call function :'*)_0(*,'75_70/_$-5_0(*,;'59:
-<0*(5/+$
iv_category_guid = i_v_category_guid
iv_langu = sy-langu
/)0*(5/+$
et_product_list = l_i_product_list
-<'-05/*+9
wrong_call = 2
others = E.
if sy-subrc D> 1.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv2 sy-msgvE sy-msgvF sy-msgvG.
endif.
endif.
if l_i_product_list is not initial.
-_=_%-7. = 7&70_5(;-.
endif.
endif.
endmethod.
method if_bsp_wd_tree_nodeBget_children.
data: l_v_e#panded type comt_boolean,
l_v_e#panded_child type comt_boolean,
l_v_added type abap_bool,
l_v_status type yyvmsta,
l_v_sales_org type crmt_sales_org,
l_v_dist_chan type crmt_distribution_channel,
l_v_category_guid type comt_category_guid ,
l_v_hit_string type string.
data: l_i_product_list type comt_product_selection_tab,
l_s_product_list like line of l_i_product_list.
data: l_o_coll type ref to if_bol_bo_col,
l_o_entity type ref to cl_crm_bol_entity,
l_o_child_typed type ref to !glb!cl_lst_itemnotlisted_cn1E,
l_o_prod_typed type ref to !glb!cl_lst_itemnotlisted_cn1F,
l_o_leaf_child type ref to !glb!cl_lst_itemnotlisted_cn12,
l_o_prod_entity type ref to cl_crm_bol_entity,
l_o_bo type ref to if_bol_bo_property_access,
l_o_bo2 type ref to if_bol_bo_property_access,
l_o_core type ref to cl_crm_bol_core ,
l_o_coll_child type ref to if_bol_bo_col,
l_o_cuco type ref to !glb!cl_lst_ppri_cucomain_impl,
l_o_root type ref to if_bsp_wd_tree_node,
l_o_lsthdr type ref to cl_crm_bol_entity,
l_v_leaf type crmt_boolean.
constants: l_c_C2 type yyvmsta value :O2:,
l_c_C# type yyvmsta value :O<:.
field-symbols: Dl_fs_frg_rod> like line of !glb!cl_lst_ppri_cucomain_impl=>g_ih_frg_rod,
%store set guid and attributes
Dl_fs_yysalesset> like line of !glb!cl_lst_ppri_cucomain_impl=>g_i_yysalesse
t. %store set guid and status
try.
call method me->bo->get_property_as_value
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>category_guid
/)0*(5/+$
ev_result = l_v_category_guid.
if !glb!cl_cgtgd_cat_smart_search=>check_auth_for_smart_search " e4 abap_true.
if !glb!cl_lst_ppri_cucomain_impl=>gv_smart_search e4 abap_true.
data : lr_smart_search type ref to !glb!cl_cgtgd_cat_smart_search.
lr_smart_search = !glb!cl_cgtgd_cat_smart_search=>get_instance ".
call method lr_smart_search->get_children_for_guid
-<0*(5/+$
iv_parent_guid = l_v_category_guid
/)0*(5/+$
et_children = l_o_coll.
endif.
endif.
* Get the instance of bol core services
l_o_core = cl_crm_bol_core=>get_instance ".
if l_o_coll is bound.
l_o_bo = l_o_coll->get_first ".
while l_o_bo is bound.
* get the info from the bo:
call method l_o_bo->get_property_as_value
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>category_guid
/)0*(5/+$
ev_result = l_v_category_guid.
call method l_o_bo->get_property_as_string
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>hit
(-'-/=/+$
rv_result = l_v_hit_string.
* create a category object from the guid.
l_o_entity = l_o_core->get_root_entity
iv_ob3ect_name = if_prcat_ap_bol_model=>gc_category_ob3
iv_ob3ect_guid = l_v_category_guid ".
'7%% )-56*, )-->/9_+*,-_%-7.
-<0*(5/+$
/_=_'75-$*(8_$;/, = l_v_category_guid
/)0*(5/+$
-_=_%-7. = l_v_leaf.
l_o_cuco = !glb!cl_lst_itemnotlisted_impl=>gr_cuco.
l_o_lsthdr ?= l_o_cuco->typed_conte#t->lsthdr->collection_wrapper->get_current ".
try.
l_o_lsthdr->get_property_as_value e#porting
iv_attr_name = !glb!cl_cgtgd_list_constants=>sales_org
importing
ev_result = l_v_sales_org ".
catch c#_crm_cic_parameter_error.
endtry.
if l_v_leaf e4 abap_true or l_v_sales_org is initial.
l_o_child_typed ?= me->node_factory->get_pro#y
iv_bo = l_o_entity
iv_pro#y_type = :!$%&!'%_%95_/5-)+*5%/95-,_'+1E:
iv_parent_pro#y = me ".
l_o_child_typed->if_bsp_wd_tree_nodeBe#pand_node ".
if !glb!cl_cgtgd_cat_smart_search=>check_auth_for_smart_search " e4 abap_true.
lr_smart_search = !glb!cl_cgtgd_cat_smart_search=>get_instance ".
call method lr_smart_search->get_children_for_guid
-<0*(5/+$
iv_parent_guid = l_v_category_guid
/)0*(5/+$
et_children = l_o_coll_child
ev_e#pandable = l_v_e#panded_child.
if l_o_coll_child is bound and l_o_coll_child->siCe " > 1 .
* and l#v#expanded#child eI <5<.
l_o_child_typed->if_bsp_wd_tree_nodeBe#pand_node ".
else.
******[Link] changes*******************************
* l#o#child#typed!"if#bsp#wd#tree#nodeLexpand#node6 7.
l_o_child_typed->if_bsp_wd_tree_nodeBcollaps_node ".
*
*
*
*
******end of [Link] changes*******************************
endif.
clear l_v_e#panded_child.
free l_o_coll_child.
endif.
try.
call method l_o_child_typed->set_search_result
-<0*(5/+$
attribute_path = ::
value = l_v_hit_string.
catch c#_sy_dyn_call_illegal_method.
endtry.
if l_v_added = abap_false.
append l_o_child_typed to rt_children.
else.
clear l_v_added.
endif.
-+,/..
l_o_bo = l_o_coll->get_ne#t ".
endwhile.
else.
if !glb!cl_lst_ppri_cucomain_impl=>g_v_sa_flag is not initial.
check !glb!cl_lst_itemnotlisted_impl=>gr_cuco is bound.
l_o_cuco = !glb!cl_lst_itemnotlisted_impl=>gr_cuco.
l_o_lsthdr ?= l_o_cuco->typed_conte#t->lsthdr->collection_wrapper->get_current ".
try.
l_o_lsthdr->get_property_as_value e#porting
iv_attr_name = !glb!cl_cgtgd_list_constants=>sales_org
importing
ev_result = l_v_sales_org ".
l_o_lsthdr->get_property_as_value e#porting
iv_attr_name = !glb!cl_cgtgd_list_constants=>dis_channel
importing
ev_result = l_v_dist_chan ".
catch c#_crm_cic_parameter_error.
endtry.
call function :'()_0(*,;'5_$-5_A/56_97%-9_'75:
-<0*(5/+$
iv_salescat_guid = l_v_category_guid
iv_sales_org = l_v_sales_org
iv_distr_channel = l_v_dist_chan
iv_read_short_desc = abap_false
iv_langu = sy-langu
/)0*(5/+$
et_product = l_i_product_list.
else.
call function :'*)_0(*,'75_70/_$-5_0(*,;'59:
-<0*(5/+$
iv_category_guid = l_v_category_guid
iv_langu = sy-langu
/)0*(5/+$
et_product_list = l_i_product_list
-<'-05/*+9
wrong_call = 2
others = E.
if sy-subrc D> 1.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv2 sy-msgvE sy-msgvF sy-msgvG.
endif.
endif.
if l_i_product_list is not initial.
loop at l_i_product_list into l_s_product_list.
* looping to get d!chain spec status.
loop at !glb!cl_lst_ppri_cucomain_impl=>g_ih_frg_rod assigning Dl_fs_frg_rod> whe
re sales_org = l_v_sales_org
and distr_chan = l_v_dist_chan
and product_guid = l_s_product_list-product_guid.
read table !glb!cl_lst_ppri_cucomain_impl=>g_i_yysalesset assigning Dl_fs_yysa
lesset> with key frg_guid = Dl_fs_frg_rod>-fragment_guid..
if sy-subrc is initial.
l_v_status = Dl_fs_yysalesset>-CC1121.
endif.
endloop.
* .
if l_v_status = :: or l_v_status = l_c_C2 or l_v_status = l_c_C#.
read table !glb!cl_lst_ppri_cucomain_impl=>gt_lsited_prod_guids transporting no
fields with key table_line = l_s_product_list-product_guid.
if sy-subrc D> 1.
l_o_core = cl_crm_bol_core=>get_instance ".
* create a product object from the guid.
l_o_prod_entity = l_o_core->get_root_entity
iv_ob3ect_name = if_prcat_ap_bol_model=>gc_product_ob3
iv_ob3ect_guid = l_s_product_list-product_guid ".
l_o_prod_typed ?= me->node_factory->get_pro#y
iv_bo = l_o_prod_entity
iv_pro#y_type = :!$%&!'%_%95_/5-)+*5%/95-,_'+1F:
iv_parent_pro#y = me ".
call method l_o_prod_typed->set_node_is_leaf
-<0*(5/+$
iv_is_leaf = abap_true.
append l_o_prod_typed to rt_children.
endif.
endif.
endloop.
endif.
endif.
catch c#_sy_move_cast_error c#_sy_ref_is_initial
c#_crm_genil_model_error.
endtry.
endmethod.
method $-5_'75-$*(8_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value = ::. %&'$ ()4'54
current = bo.
5(8.
5(8.
dref = current->get_property :'75-$*(8_5-<5: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
5(8.
dref = current->get_property :'75-$*(8_/,: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
/. dref /9 +*5 &*;+,.
value = ::.
(-5;(+.
-+,/..
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> 580- data.
799/$+ dref->S 5* Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_/_'75-$*(8_/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
current = bo.
5(8.
/. current->is_property_readonly
:'75-$*(8_/,: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_/_'75-$*(8_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
current = bo.
5(8.
/. current->is_property_readonly
:'75-$*(8_5-<5: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_)_'75-$*(8_/,.
,757: attr 580- '*)5_'75-$*(8_/,.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :'75-$*(8_/,: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_)_'75-$*(8_5-<5.
,757: attr 580- '*)5_'75-$*(8_5-<5.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :'75-$*(8_5-<5: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_6/-(7('68_/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value = ::. %&'$ ()4'54
current = bo.
5(8.
5(8.
dref = current->get_property :6/-(7('68_/,: ". %&'$ ()4'54
'75'6 c#_crm_cic_parameter_error.
-+,5(8.
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
/. dref /9 +*5 &*;+,.
value = ::. %&'$ ()4'54
(-5;(+.
-+,/..
5(8.
value = if_bsp_model_utilBconvert_to_string data_ref = dref
attribute_path = attribute_path ".
'75'6 c#_bsp_conv_illegal_ref.
./-%,-98)&*%9: Dl_data> 580- data.
799/$+ dref->S 5* Dl_data>.
* please implement here some B) specific handler coding
* conversion of currency1Iuantity field failed caused by missing
* unit relation
* $oding sample:
* provide currency- decimals- and reference type
* value > cl#bsp#utility>"ma.e#string6
* value > Bl#data"
* reference#value > c#currency
* num#decimals > decimals
* reference#type > reference#type
* 7.
'*+'75-+75- Dl_data> :-';((!?;7+5 '*+= .7/%-,-: /+5* value
9-07(75-, &8 space. %&'$ ()4'54
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_)_6/-(7('68_/,.
,757: attr 580- comt_hierarchy_id.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :6/-(7('68_/,: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_/_6/-(7('68_/,.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
current = bo.
5(8.
/. current->is_property_readonly
:6/-(7('68_/,: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_6/-(7('68_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
,757: dref 580- (-. 5* data.
value = ::. %&'$ ()4'54
current = bo.
5(8.
,757: lv_hierarchy_guid 580- comt_hierarchy_guid,
ls_hierarchy_te#t 580- comt_hierarchyt .
'7%% )-56*, current->get_property_as_value
-<0*(5/+$
iv_attr_name = :6/-(7('68_$;/,:
/)0*(5/+$
ev_result = lv_hierarchy_guid.
'7%% .;+'5/*+ :'*)_6/-(7('68_(-7,_5-<5:
-<0*(5/+$
iv_hierarchy_guid = lv_hierarchy_guid
/)0*(5/+$
es_hierarchyt = ls_hierarchy_te#t
-<'-05/*+9
*56-(9 = 1.
value = ls_hierarchy_te#t-hierarchy_te#t .
'75'6 c#_root.
value = :-'*+=-(9/*+ .7/%-,-:. %&'$ ()4'54
-+,5(8.
endmethod.
method $-5_/_6/-(7('68_5-<5.
,757: current 580- (-. 5* if_bol_bo_property_access.
rv_disabled = :5(;-:.
current = bo.
5(8.
,757: coll 580- (-. 5* if_bol_entity_col.
,757: entity 580- (-. 5* cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities
iv_relation_name = :0r'ategory6ierarchy,escr(el: ".%&'$
current = coll->get_current ".
/. current /9 +*5 &*;+,.
(-5;(+.
-+,/..
/. current->is_property_readonly
:6/-(7('68_5-<5: " = abap_false. %&'$ ()4'54
rv_disabled = :.7%9-:.
-+,/..
'75'6 c#_sy_ref_is_initial c#_sy_move_cast_error
c#_crm_genil_model_error.
(-5;(+.
-+,5(8.
endmethod.
method $-5_)_6/-(7('68_5-<5.
,757: attr 580- comt_hierarchy_te#t.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :6/-(7('68_5-<5: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
method $-5_9-7('6_(-9;%5.
value = search_result.
endmethod.
method 9-5_9-7('6_(-9;%5.
search_result = value.
endmethod.
method $-5_0_9-7('6_(-9;%5.
'79- iv_property.
A6-+ if_bsp_wd_model_setter_getter=>fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>field_type_checkbo#.
-+,'79-.
endmethod.
method $-5_/_9-7('6_(-9;%5.
rv_disabled = :5(;-:.
endmethod.
method $-5_)_9-7('6_(-9;%5.
,757: attr 580- crmt_boolean.
,757: dref 580- (-. 5* data.
$-5 (-.-(-+'- *. attr /+5* dref.
metadata ?= if_bsp_model_bindingBget_attribute_metadata
attribute_ref = dref
attribute_path = attribute_path
name = :9-7('6_(-9;%5: %&'$ ()4'54
* $)/=)('(4 >
no_getter = 2 ".
endmethod.
)-56*, 9-5_+*,-_/9_%-7..
* 3et is leaf flag
if_bsp_wd_tree_nodeBis_leaf = iv_is_leaf.
-+,)-56*,.
method /9_+*,-_%-7..
data: l_v_e#panded type comt_boolean,
l_v_e#panded_child type comt_boolean,
l_v_added type abap_bool,
l_v_status type yyvmsta,
l_v_sales_org type crmt_sales_org,
l_v_dist_chan type crmt_distribution_channel,
l_v_category_guid type comt_category_guid ,
l_v_hit_string type string.
data: l_i_product_list type comt_product_selection_tab,
l_s_product_list like line of l_i_product_list.
data: l_o_coll type ref to if_bol_bo_col,
l_o_entity type ref to cl_crm_bol_entity,
l_o_child_typed type ref to !glb!cl_lst_itemnotlisted_cn1E,
l_o_prod_typed type ref to !glb!cl_lst_itemnotlisted_cn1F,
l_o_prod_entity type ref to cl_crm_bol_entity,
l_o_bo type ref to if_bol_bo_property_access,
l_o_bo2 type ref to if_bol_bo_property_access,
l_o_core type ref to cl_crm_bol_core ,
l_o_coll_child type ref to if_bol_bo_col,
l_o_cuco type ref to !glb!cl_lst_ppri_cucomain_impl,
l_o_root type ref to if_bsp_wd_tree_node,
l_o_lsthdr type ref to cl_crm_bol_entity,
l_v_leaf type crmt_boolean.
constants: l_c_C2 type yyvmsta value :O2:,
l_c_C# type yyvmsta value :O<:.
%_=_%-7. = 7&70_.7%9-.
if !glb!cl_cgtgd_cat_smart_search=>check_auth_for_smart_search " e4 abap_true.
if !glb!cl_lst_ppri_cucomain_impl=>gv_smart_search e4 abap_true.
data : lr_smart_search type ref to !glb!cl_cgtgd_cat_smart_search.
lr_smart_search = !glb!cl_cgtgd_cat_smart_search=>get_instance ".
call method lr_smart_search->get_children_for_guid
-<0*(5/+$
iv_parent_guid = i_v_category_guid
/)0*(5/+$
et_children = l_o_coll.
endif.
endif.
if l_o_coll is bound and l_o_coll->siCe " > 1 .
l_o_core = cl_crm_bol_core=>get_instance ".
l_o_bo = l_o_coll->get_first ".
while l_o_bo is bound.
call method l_o_bo->get_property_as_value
-<0*(5/+$
iv_attr_name = !glb!cl_cgtgd_list_constants=>category_guid
/)0*(5/+$
ev_result = l_v_category_guid.
'7%% )-56*, me->/9_+*,-_%-7.
-<0*(5/+$
/_=_'75-$*(8_$;/, = l_v_category_guid
/)0*(5/+$
-_=_%-7. = l_v_leaf
.
-_=_%-7. = %_=_%-7..
l_o_bo = l_o_coll->get_ne#t ".
endwhile.
else.
if !glb!cl_lst_ppri_cucomain_impl=>g_v_sa_flag is not initial.
check !glb!cl_lst_itemnotlisted_impl=>gr_cuco is bound.
l_o_cuco = !glb!cl_lst_itemnotlisted_impl=>gr_cuco.
l_o_lsthdr ?= l_o_cuco->typed_conte#t->lsthdr->collection_wrapper->get_current ".
try.
l_o_lsthdr->get_property_as_value e#porting
iv_attr_name = !glb!cl_cgtgd_list_constants=>sales_org
importing
ev_result = l_v_sales_org ".
l_o_lsthdr->get_property_as_value e#porting
iv_attr_name = !glb!cl_cgtgd_list_constants=>dis_channel
importing
ev_result = l_v_dist_chan ".
catch c#_crm_cic_parameter_error.
endtry.
call function :'()_0(*,;'5_$-5_A/56_97%-9_'75:
-<0*(5/+$
iv_salescat_guid = i_v_category_guid
iv_sales_org = l_v_sales_org
iv_distr_channel = l_v_dist_chan
iv_read_short_desc = abap_false
iv_langu = sy-langu
/)0*(5/+$
et_product = l_i_product_list.
else.
call function :'*)_0(*,'75_70/_$-5_0(*,;'59:
-<0*(5/+$
iv_category_guid = i_v_category_guid
iv_langu = sy-langu
/)0*(5/+$
et_product_list = l_i_product_list
-<'-05/*+9
wrong_call = 2
others = E.
if sy-subrc D> 1.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv2 sy-msgvE sy-msgvF sy-msgvG.
endif.
endif.
if l_i_product_list is not initial.
-_=_%-7. = 7&70_5(;-.
endif.
endif.
endmethod.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="crm_bsp_ic" prefix="crmic" %>
<%@extension name="bsp" prefix="bsp" %>
DV
data: l_v_nodete#t_col type string,
l_v_select_mode type string,
l_v_multi type abap_bool,
l_v_select_event type string.
l_v_nodete#t_col = :'75-$*(8_5-<5: .
l_v_multi = controller->$-5_=6_);%5/_)*,- ".
if l_v_multi e4 abap_true.
l_v_select_mode = 6/-(7('68->9-%)*,-_);%5/.
if 6/-(7('68->9-%-'5/*+_)*,- ne 6/-(7('68->9-%)*,-_);%5/.
6/-(7('68->set_selection_mode l_v_select_mode ".
endif.
l_v_select_event = :);%5/9-%-'5: .
else.
l_v_select_mode = 6/-(7('68->9-%)*,-_9/+$%- .
l_v_select_event = :node9elect:.
endif.
V>
DV
data lt_selid#_table type /+5G_57&%- .
lt_selid#_table = 6/-(7('68->)70_>-8_5*_/,<_57&%- " .
V>
Dchtmlb:config5ree id = K/tem+ot%istedK
node5able = KDV= 6/-(7('68->node_tab V>K
node5e#t'olumn = KDV= l_v_nodete#t_col V>K
on'ollapse+ode = Knode'ollapseK
on-#pand+ode = Knode-#pandK
on(ow9election = KDV= l_v_select_event V>K
header5e#t = K+ot %istedK
a3a#,elta6andling = K5(;-K
actions = KDV= controller->g_i_button V>K
selected(ow/nde#5able = KDV= lt_selid#_table V>K
selection)ode = KDV= l_v_select_mode V>K
type = KDV= '%_565)%&_5(--=>$'_580-_'*%;)+ V>K
table = K!!6/-(7('68!5ableK
scrollable = K5(;-K
fill;p-mpty(ows = K5(;-K
download5o-#cel = K.7%9-K
visible(ow'ount = KE1K
[Link] = K<K !>

You might also like