Professional Documents
Culture Documents
Concept
*-----------------------------------------------------------------------
* PROGRAM
* DESCRIPTION
*
* To view area types the Building structure and Measurement types are
* defined for business entity, building, property, rental object
*-----------------------------------------------------------------------
* Transaction:
*-----------------------------------------------------------------------
* Author:
* Date : 2015-02-25
*-----------------------------------------------------------------------
* Table Types
*-----------------------------------------------------------------------
types: begin of ty_data_st,
meassum type char4,
measured type char4,
end of ty_data_st,
gt_data_tt type standard table of ty_data_st,
begin of ty_text_st,
meas type rebdmeas,
text type rebdxmmeas,
end of Ty_text_st,
GT_text_tt type standard table of Ty_text_st.
*-----------------------------------------------------------------------
* Global variables
*-----------------------------------------------------------------------
data: gt_hier type gt_data_tt, " Tree hierarchy
gt_text type gt_text_tt, " Text table
gt_mesr type gt_data_tt,
gt_tree type gt_data_tt,
go_alv_tree type ref to cl_gui_alv_tree,
go_custom_container type ref to cl_gui_custom_container,
gv_flag type i value 1.
*-----------------------------------------------------------------------
* Selection screen.
*-----------------------------------------------------------------------
"Source Measurement Type for Transformation
parameters p_msrc type char4 obligatory.
*-----------------------------------------------------------------------
* INITIALIZATION
*-----------------------------------------------------------------------
initialization.
perform get_data changing gt_mesr
gt_text .
*-----------------------------------------------------------------------
* AT SELECTION SCREEN
*-----------------------------------------------------------------------
" Perform execute when User not taking any F4 help
" get the master data and text table data
end-of-selection.
leave list-processing.
return.
endif.
endif.
*&---------------------------------------------------------------------*
*& Module PBO OUTPUT
*&---------------------------------------------------------------------*
* process before output
*----------------------------------------------------------------------*
module pbo output.
data gv_title type string .
"set pf status
set pf-status 'MAIN100'.
" Set Dynamic Title of the screen
read table gt_text into data(gs_text) with key meas = p_msrc .
if sy-subrc eq 0.
concatenate p_msrc '-' gs_text-text ')' into gv_title separated by space.
endif.
if go_alv_tree is initial.
perform init_tree .
case sy-ucomm.
when 'EXIT' or 'BACK' or 'CANC'.
perform exit_program.
when others.
" Call dispatch to process toolbar functions
call method cl_gui_cfw=>dispatch.
endcase.
*&---------------------------------------------------------------------*
*& Form init_tree
*&---------------------------------------------------------------------*
form init_tree.
lv_tree_container_name = 'CCONTAINER1'.
"Header information
form create_hierarchy .
endloop.
else.
gv_flag = 0.
leave to screen 0.
endif.
endform. " create_hierarchy
*&---------------------------------------------------------------------*
*& Form Add_siblling
*&---------------------------------------------------------------------*
form add_siblling using ps_hier type ty_data_st
pv_relat_key type lvc_nkey
changing cv_node_key type lvc_nkey.
lv_node_text = ls_text-text..
endif.
*&---------------------------------------------------------------------*
*& Form PERPARE_CHAIN
*&---------------------------------------------------------------------*
if gt_mesr is initial.
" Get data
select meassum
meassrc
from tivbdmeassum
into table ct_mesr.
endif.
endif.
endif.
endif.