Posted: Mon Nov 05, 2007 3:37 pm Post subject: Demo: GFW with visible data container
Code:
REPORT GFW_DEMO_PRES .
***********************************************************************
* This is a program to demonstrate the functionality of the
* Graphical Framework (GFW).
* This is not a programming example. If you want to learn how to
* use the GFW in your own programs please take a closer look at our
* programming examples (with prefix GFW_PROG_).
***********************************************************************
* texts for example programs of GFW
include gfw_prog_text.
TYPE-POOLS: VRM . "//combobox
INCLUDE GFW_DC_PRES.
INTERFACE IF_DC_ACCESS LOAD.
CLASS CL_GUI_CFW DEFINITION LOAD.
CLASS CL_GFW_MUX DEFINITION LOAD.
* include hierarchy data container for docking example
INCLUDE GFW_DC_HIER.
CONTROLS: TAB_DC TYPE TABLEVIEW USING SCREEN 100.
DATA: OK_CODE TYPE SY-UCOMM,
PROD_ID TYPE VRM_VALUE-KEY,
FILTER TYPE VRM_VALUE-KEY,
G1FILTER(9), G2FILTER(9),
GFW_PROD_ID TYPE TGPN-PRODUKT, "//prevent type conflict at gp>Init
TMP_PROD_ID TYPE TGPN-PRODUKT, "//prevent type conflict at gp>Init
* prod TYPE vrm_value,
CB_ELEM TYPE VRM_VALUE, "//element/line of combobox
* Tables of Values for comboboxes
PROD_ID_LIST TYPE VRM_VALUE OCCURS 0,
FILTER_LIST TYPE VRM_VALUE OCCURS 0.
DATA: BEGIN OF G_TAB_DC OCCURS 0,
MARK TYPE C,
OBJID TYPE GFWOBJID,
GRPID TYPE GFWGRPID,
FILTER TYPE GFWFILTER,
X_VAL TYPE GFWXVAL,
Y_VAL(22) TYPE C, "//gfwyval -> does not match screen element
Z_VAL TYPE GFWZVAL,
TEXT TYPE GFWTEXT,
CU_STATUS TYPE GFWCUSTAT,
CU_REFOBJ TYPE GFWREFOBJ,
END OF G_TAB_DC.
DATA: ID TYPE DOKHL-ID,
LANGU TYPE DOKHL-LANGU,
OBJECT TYPE DOKHL-OBJECT,
DYNNR TYPE SY-DYNNR,
REPID TYPE SY-REPID,
NEXT_FREE_ID TYPE I VALUE 100,
SINGLE_OBJ TYPE GFWDCPRES.
DATA: DC TYPE REF TO lcl_dc_pres, "cl_gfw_dc_pres,
MY_ID_AT_DC TYPE I, RETVAL TYPE SYMSGNO,
PBG1_ON TYPE GFW_BOOLEAN VALUE GFW_FALSE,
GP1 TYPE REF TO CL_GUI_GP_PRES,
GP2 TYPE REF TO CL_GUI_GP_PRES,
GP3 TYPE REF TO CL_GUI_GP_PRES,
GP4 TYPE REF TO CL_GUI_GP_PRES,
GP5 TYPE REF TO CL_GUI_GP_PRES,
GP6 TYPE REF TO CL_GUI_GP_PRES,
GP7 TYPE REF TO CL_GUI_GP_PRES,
EVTCODE_LIST TYPE CNTL_SIMPLE_EVENTS,
SIMPLE_EVENT type CNTL_SIMPLE_EVENT,
GP_FILTER_LIST TYPE GFW_FILTER_LIST.
DATA: DIALOGBOX TYPE ref to cl_gui_dialogbox_container,
custom_container1 type ref to cl_gui_custom_container,
custom_container2 type ref to cl_gui_custom_container,
custom_container3 type ref to cl_gui_custom_container,
custom_container7 type ref to cl_gui_custom_container,
CUSTOM_CONTAINER_300 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
SUB_SPLITTER TYPE REF TO CL_GUI_EASY_SPLITTER_CONTAINER,
SPLITTER TYPE REF TO CL_GUI_EASY_SPLITTER_CONTAINER,
DOCKING TYPE ref to CL_GUI_DOCKING_CONTAINER,
TREE_GP TYPE REF TO CL_GUI_GP_HIER,
TREE_DC TYPE REF TO LCL_DC_HIER,
TREE_MY_ID_AT_DC TYPE I,
ITEM_LIST TYPE GFW_ITEM_ATTRIB_LIST,
item_name type gfw_item_attrib.
* to allow event handling build application class (main)
INCLUDE GFW_DEMO_PRES_MAIN.
DATA: MAIN TYPE REF TO LCL_DEMOGFWPRES.
DATA: LINE_COUNT TYPE I,
OBJ_DATA TYPE GFWDCPRES.
START-OF-SELECTION.
* fill table of event codes for graphics proxies
simple_event-appl_event = 'X'.
simple_event-EVENTID = IF_GRAPHIC_PROXY=>CO_EVT_VALUE_CHANGED.
APPEND simple_event TO EVTCODE_LIST.
simple_event-EVENTID = IF_GRAPHIC_PROXY=>CO_EVT_CUSTOM_CHANGED.
APPEND simple_event TO EVTCODE_LIST.
* no filters
REFRESH GP_FILTER_LIST. CLEAR GP_FILTER_LIST.
* clear combobox lists
CLEAR PROD_ID_LIST. CLEAR FILTER_LIST.
FIELD-SYMBOLS: <FILTER>.
* USAGE allowed in SAP internal test reports, only
include applg_auto_test_init.
* call first screen
CALL SCREEN 100.
* USAGE allowed in SAP internal test reports, only
include applg_auto_test_form.
*&---------------------------------------------------------------------*
*& Module PBO_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE PBO_0100 OUTPUT.
SET PF-STATUS '100'.
SET TITLEBAR '100'.
IF MAIN IS INITIAL.
CREATE OBJECT MAIN.
ENDIF.
IF PROD_ID_LIST[] IS INITIAL.
* fill list with products allowed
CB_ELEM-KEY = CL_GUI_GP_PRES=>CO_PROD_SAP.
CB_ELEM-TEXT = CO_GFW_PROG_PRODUCT1.
APPEND CB_ELEM TO PROD_ID_LIST.
CB_ELEM-KEY = CL_GUI_GP_PRES=>CO_PROD_CHART.
CB_ELEM-TEXT = CO_GFW_PROG_PRODUCT3.
APPEND CB_ELEM TO PROD_ID_LIST.
* set intellicube chart as default product
prod_id = CL_GUI_GP_PRES=>CO_PROD_CHART.
ENDIF.
IF FILTER_LIST[] IS INITIAL.
* fill list with filter combinations
CB_ELEM-KEY = '1'. CB_ELEM-TEXT = '1'.
APPEND CB_ELEM TO FILTER_LIST.
CB_ELEM-KEY = '2'. CB_ELEM-TEXT = '2'.
APPEND CB_ELEM TO FILTER_LIST.
CB_ELEM-KEY = '3'. CB_ELEM-TEXT = '3'.
APPEND CB_ELEM TO FILTER_LIST.
CB_ELEM-KEY = '12'. CB_ELEM-TEXT = '1, 2'.
APPEND CB_ELEM TO FILTER_LIST.
CB_ELEM-KEY = '13'. CB_ELEM-TEXT = '1, 3'.
APPEND CB_ELEM TO FILTER_LIST.
CB_ELEM-KEY = '23'. CB_ELEM-TEXT = '2, 3'.
APPEND CB_ELEM TO FILTER_LIST.
CB_ELEM-KEY = '123'. CB_ELEM-TEXT = '1, 2, 3'.
APPEND CB_ELEM TO FILTER_LIST.
ENDIF.
* fill combobox with products
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'PROD_ID'
VALUES = PROD_ID_LIST.
* fill combobox with filter combinations
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'FILTER'
VALUES = FILTER_LIST.
IF DC IS INITIAL.
CREATE OBJECT DC.
IF SY-SUBRC <0>IF_DC_MANAGEMENT~INIT IMPORTING ID = MY_ID_AT_DC
RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
CLEAR DC.
ELSE.
PERFORM FILL_DC.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF.
ENDIF. "//dc is initial
* **** distribute changes (to all subscribed graphics proxies)
IF NOT DC IS INITIAL.
CALL METHOD DC->IF_DC_MANAGEMENT~DISTRIBUTE_CHANGES
IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG_protocol.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF.
* **** activate mux (handling of external graphics)
CALL METHOD CL_GFW_MUX=>ACTIVATE IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
* *** fill table controls with data from DC
PERFORM FILL_TABCONTROL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
DESCRIBE TABLE G_TAB_DC LINES TAB_DC-LINES.
IF TAB_DC-LINES = 0. ADD 1 TO TAB_DC-LINES. ENDIF.
* USAGE allowed in SAP internal test reports, only
perform auto_test_pbo USING 'EXIT'.
ENDMODULE. " PBO_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module PAI_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE PAI_0100 INPUT.
OK_CODE = SY-UCOMM.
DYNNR = SY-DYNNR. REPID = SY-REPID.
CALL METHOD CL_GUI_CFW=>DISPATCH.
CASE OK_CODE.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'DOCU'.
ID = 'RE'. LANGU = SY-LANGU. OBJECT = 'GFW_DEMO_PRES'.
* display program documentation
CALL FUNCTION 'DOCU_CALL'
EXPORTING
DISPL = 'X' "//show mode
DISPL_MODE = '2' "//like F1 help
ID = ID
LANGU = LANGU
OBJECT = OBJECT.
WHEN 'DCI'. "// insert object/row from dc
IF NOT DC IS INITIAL.
* fill new object
CLEAR SINGLE_OBJ.
SINGLE_OBJ-OBJID = NEXT_FREE_ID. CONDENSE SINGLE_OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
* check marked object/row (where to insert the new object?)
READ TABLE G_TAB_DC WITH KEY MARK = 'X'.
IF SY-SUBRC = 0 OR SY-SUBRC = 2.
* insert new object before marked/found object
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
KEY_VALUE = G_TAB_DC-OBJID
OBJ = SINGLE_OBJ
IMPORTING RETVAL = RETVAL.
ELSE.
* append new object
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = SINGLE_OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF. "//not dc is initial
CLEAR SY-UCOMM.
WHEN 'DCD'. "// delete object/row from dc
LOOP AT G_TAB_DC.
IF NOT G_TAB_DC-MARK IS INITIAL AND NOT DC IS INITIAL.
* to be deleted
CALL METHOD DC->IF_DC_MANAGEMENT~DEL_OBJECT
EXPORTING ID = MY_ID_AT_DC
KEY_VALUE = G_TAB_DC-OBJID
IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
EXIT. "// ready (it's a single select table)
ENDIF.
ENDLOOP.
WHEN 'DCR'. "//clear/refresh dc
IF NOT DC IS INITIAL.
CALL METHOD DC->IF_DC_MANAGEMENT~CLEAR
EXPORTING ID = MY_ID_AT_DC
IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF.
WHEN 'PBG1FI'.
IF NOT GP1 IS INITIAL AND FILTER <G1FILTER>IF_GRAPHIC_PROXY~SET_FILTER_LIST
EXPORTING FILTER_LIST = GP_FILTER_LIST
IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ELSE.
G1FILTER = FILTER.
ENDIF.
ENDIF.
WHEN 'PBG2FI'.
IF NOT GP2 IS INITIAL AND FILTER <G2FILTER>IF_GRAPHIC_PROXY~SET_FILTER_LIST
EXPORTING FILTER_LIST = GP_FILTER_LIST
IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ELSE.
G2FILTER = FILTER.
ENDIF.
ENDIF.
WHEN 'PBG1'.
IF PBG1_ON = GFW_TRUE.
PBG1_ON = GFW_FALSE.
IF NOT GP1 IS INITIAL.
CALL METHOD GP1->IF_GRAPHIC_PROXY~DEACTIVATE.
ENDIF.
ELSE. "pbg1_on = false
IF GP1 IS INITIAL.
CREATE OBJECT GP1.
PERFORM SET_GP_FILTER_LIST. G1FILTER = FILTER.
* create container in which to place graphic
* (place it in the custom control named GRAPHIC1
* defined using screenpainter in dynpro 100)
CREATE OBJECT CUSTOM_CONTAINER1
EXPORTING
CONTAINER_NAME = 'GRAPHIC1'. "use uppercase letters!
" there will be a RABAX here if any error occured while creating
" the container
CALL METHOD GP1->IF_GRAPHIC_PROXY~INIT
EXPORTING PARENT = CUSTOM_CONTAINER1
" top = 3
" left = 71
" height = 9
" width = 26
DC = DC
PROD_ID = CL_GUI_GP_PRES=>CO_PROD_CHART
EVTCODE_LIST = EVTCODE_LIST
* filter_list = gp_filter_list
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
* set DC attributes
CALL METHOD GP1->SET_DC_NAMES
EXPORTING
OBJ_ID = 'OBJID'
DIM1 = 'X_VAL'
DIM2 = 'Y_VAL'
GRP_ID = 'GRPID'
IMPORTING RETVAL = RETVAL.
ENDIF. "// set dc attributes
if retval = cl_gfw=>ok.
* set customizing
call method MAIN->Set_Customizing exporting gp = GP1
importing retval = retval.
endif.
ENDIF. "//gp1 is initial
IF RETVAL = CL_GFW=>OK AND NOT GP1 IS INITIAL.
CALL METHOD GP1->IF_GRAPHIC_PROXY~ACTIVATE
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
PBG1_ON = GFW_TRUE.
ENDIF.
* end WHEN 'PBG1'
WHEN 'PBG2'.
RETVAL = CL_GFW=>OK.
IF NOT CUSTOM_CONTAINER2 IS INITIAL.
" AND GFW_PROD_ID <PROD_ID>FREE.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
CLEAR GP2. clear CUSTOM_CONTAINER2.
ENDIF.
GFW_PROD_ID = PROD_ID.
IF GP2 IS INITIAL AND NOT PROD_ID IS INITIAL.
CREATE OBJECT GP2.
PERFORM SET_GP_FILTER_LIST. G2FILTER = FILTER.
* create container in which to place graphic (see GP1)
CREATE OBJECT CUSTOM_CONTAINER2
EXPORTING
CONTAINER_NAME = 'GRAPHIC2'. "use uppercase letters!
CALL METHOD GP2->IF_GRAPHIC_PROXY~INIT
EXPORTING PARENT = CUSTOM_CONTAINER2
DC = DC
PROD_ID = GFW_PROD_ID
EVTCODE_LIST = EVTCODE_LIST
FILTER_LIST = GP_FILTER_LIST
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
* set DC attributes
CALL METHOD GP2->SET_DC_NAMES
EXPORTING
OBJ_ID = 'OBJID'
DIM1 = 'X_VAL'
DIM2 = 'Y_VAL'
GRP_ID = 'GRPID'
IMPORTING RETVAL = RETVAL.
ENDIF. "// set dc attributes
if retval = cl_gfw=>ok.
* set customizing
call method MAIN->Set_Customizing exporting gp = GP2
importing retval = retval.
endif.
IF RETVAL = CL_GFW=>OK.
CALL METHOD GP2->IF_GRAPHIC_PROXY~ACTIVATE
IMPORTING RETVAL = RETVAL.
ENDIF.
ENDIF. "//gp2 is initial
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
CALL METHOD CUSTOM_CONTAINER2->FREE.
CLEAR CUSTOM_CONTAINER2. CLEAR GP2.
ENDIF.
* end WHEN 'PBG2'
WHEN 'PBG3'.
SET SCREEN 200.
LEAVE SCREEN.
* end WHEN 'PBG3'
WHEN 'PBG4'.
IF DIALOGBOX IS INITIAL.
create object dialogbox exporting
repid = repid
dynnr = dynnr
lifetime = cntl_lifetime_imode
caption = CO_GFW_PROG_DIALOGB
top = 30
left = 20
width = 300
height = 200
exceptions others = 1.
if sy-subrc <0>free.
clear dialogbox.
endif.
* gp4....
IF GP4 IS INITIAL AND NOT PROD_ID IS INITIAL
and not dialogbox is initial.
TMP_PROD_ID = PROD_ID.
CREATE OBJECT GP4.
CALL METHOD GP4->IF_GRAPHIC_PROXY~INIT
EXPORTING
PARENT = DIALOGBOX
DC = DC
PROD_ID = TMP_PROD_ID
EVTCODE_LIST = EVTCODE_LIST
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
* set DC attributes
CALL METHOD GP4->SET_DC_NAMES
EXPORTING
OBJ_ID = 'OBJID'
DIM1 = 'X_VAL'
DIM2 = 'Y_VAL'
GRP_ID = 'GRPID'
IMPORTING RETVAL = RETVAL.
ENDIF. "// set dc attributes
if retval = cl_gfw=>ok.
* set customizing
call method MAIN->Set_Customizing exporting gp = GP4
importing retval = retval.
endif.
IF RETVAL = CL_GFW=>OK.
CALL METHOD GP4->IF_GRAPHIC_PROXY~ACTIVATE
IMPORTING RETVAL = RETVAL.
call method gp4->set_alignment exporting alignment = 15.
ENDIF.
ENDIF. "//gp4 is initial
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ELSE.
call method dialogbox->free.
CLEAR DIALOGBOX.
clear gp4. "released by dialogbox->free
ENDIF.
* end WHEN 'PBG4'
WHEN 'SPLITTER'.
SET SCREEN 300.
LEAVE SCREEN.
* end WHEN 'SPLITTER'
WHEN 'PBFRAME'.
SET SCREEN 400.
LEAVE SCREEN.
* end WHEN 'PBFRAME'
WHEN 'PBG7'.
RETVAL = CL_GFW=>OK.
CREATE OBJECT GP7.
if custom_container7 is initial.
* create container
* (dummy because it's a graphic as an external program)
CREATE OBJECT CUSTOM_CONTAINER7
EXPORTING
CONTAINER_NAME = 'DUMMY_CONTAINER'.
endif.
CALL METHOD GP7->IF_GRAPHIC_PROXY~INIT
EXPORTING parent = custom_container7
DC = DC
PROD_ID = CL_GUI_GP_PRES=>CO_PROD_SAP
EVTCODE_LIST = EVTCODE_LIST
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
* set DC attributes
CALL METHOD GP7->SET_DC_NAMES
EXPORTING
OBJ_ID = 'OBJID'
DIM1 = 'X_VAL'
DIM2 = 'Y_VAL'
GRP_ID = 'GRPID'
IMPORTING RETVAL = RETVAL.
ENDIF. "// set dc attributes
if retval = cl_gfw=>ok.
* set customizing
call method MAIN->Set_Customizing exporting gp = GP7
importing retval = retval.
endif.
IF RETVAL = CL_GFW=>OK.
CALL METHOD GP7->IF_GRAPHIC_PROXY~ACTIVATE
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
* end WHEN 'PBG7'
ENDCASE.
ENDMODULE. " PAI_0100 INPUT
*&---------------------------------------------------------------------*
*& Module MODIFIED_TAB_DC_100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE MODIFIED_TAB_DC_100 INPUT.
IF DC IS INITIAL.
CALL METHOD CL_GFW=>SHOW_MSG
EXPORTING MSGNO = CL_GFW=>E_GP_DCHANDLE. EXIT.
ENDIF.
DESCRIBE TABLE G_TAB_DC LINES LINE_COUNT.
IF TAB_DC-CURRENT_LINE > LINE_COUNT.
APPEND G_TAB_DC.
ELSE.
CHECK NOT TAB_DC-CURRENT_LINE IS INITIAL.
MODIFY G_TAB_DC INDEX TAB_DC-CURRENT_LINE.
ENDIF.
IF G_TAB_DC-OBJID IS INITIAL.
" insert new object
CALL METHOD CL_GFW=>SHOW_MSG
EXPORTING MSGNO = CL_GFW=>ERR.
EXIT.
ENDIF.
OBJ-OBJID = NEXT_FREE_ID. CONDENSE OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
OBJ-GRPID = CO_GFW_PROG_B_GRP_1.
OBJ-X_VAL = CO_GFW_PROG_B_X_1.
OBJ-Y_VAL = 30.
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
OBJ-OBJID = NEXT_FREE_ID. CONDENSE OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
OBJ-GRPID = CO_GFW_PROG_B_GRP_2.
OBJ-X_VAL = CO_GFW_PROG_B_X_1.
OBJ-Y_VAL = 60.
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
OBJ-OBJID = NEXT_FREE_ID. CONDENSE OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
OBJ-GRPID = CO_GFW_PROG_B_GRP_1.
OBJ-X_VAL = CO_GFW_PROG_B_X_2.
OBJ-Y_VAL = 110 / 2.
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
OBJ-OBJID = NEXT_FREE_ID. CONDENSE OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
OBJ-GRPID = CO_GFW_PROG_B_GRP_2.
OBJ-X_VAL = CO_GFW_PROG_B_X_2.
OBJ-Y_VAL = 110.
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
OBJ-OBJID = NEXT_FREE_ID. CONDENSE OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
OBJ-GRPID = CO_GFW_PROG_B_GRP_1.
OBJ-X_VAL = CO_GFW_PROG_B_X_3.
OBJ-Y_VAL = 25.
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
OBJ-OBJID = NEXT_FREE_ID. CONDENSE OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
OBJ-GRPID = CO_GFW_PROG_B_GRP_2.
OBJ-X_VAL = CO_GFW_PROG_B_X_3.
OBJ-Y_VAL = 50.
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
OBJ-OBJID = NEXT_FREE_ID. CONDENSE OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
OBJ-GRPID = CO_GFW_PROG_B_GRP_3.
OBJ-X_VAL = CO_GFW_PROG_B_X_1.
OBJ-Y_VAL = 10.
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
OBJ-OBJID = NEXT_FREE_ID. CONDENSE OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
OBJ-GRPID = CO_GFW_PROG_B_GRP_3.
OBJ-X_VAL = CO_GFW_PROG_B_X_2.
OBJ-Y_VAL = 20.
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
OBJ-OBJID = NEXT_FREE_ID. CONDENSE OBJ-OBJID.
NEXT_FREE_ID = NEXT_FREE_ID + 1.
OBJ-GRPID = CO_GFW_PROG_B_GRP_3.
OBJ-X_VAL = CO_GFW_PROG_B_X_3.
OBJ-Y_VAL = 30.
CALL METHOD DC->SET_OBJ_VALUES EXPORTING ID = MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
ENDFORM. " FILL_DC
*&---------------------------------------------------------------------*
*& Form FILL_TABCONTROL
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* <P_RETVAL>E_GP_DCHANDLE.
EXIT.
ENDIF.
VALUE_COUNTER = 1.
DO.
CALL METHOD DC_MANAGE->GET_VALUE
EXPORTING ID = MY_ID_AT_DC
ATTRIBUTE = 'OBJID'
IMPORTING FIELD_VALUE = G_TAB_DC-OBJID
RETVAL = RETVAL
CHANGING VALUE_COUNTER = VALUE_COUNTER.
IF RETVAL <CL_GFW>OK AND RETVAL <CL_GFW>I_DC_SET_OF_VAL.
IF VALUE_COUNTER IS INITIAL.
RETVAL = CL_GFW=>OK. "//empty dc
ENDIF.
EXIT. "//error occured or ready (empty dc)
ENDIF.
* record found, get values of other attributes
CALL METHOD DC_MANAGE->GET_VALUE
EXPORTING ID = MY_ID_AT_DC
ATTRIBUTE = 'GRPID'
IMPORTING FIELD_VALUE = G_TAB_DC-GRPID
RETVAL = RETVAL
CHANGING VALUE_COUNTER = VALUE_COUNTER.
IF RETVAL <CL_GFW>OK AND RETVAL <CL_GFW>I_DC_SET_OF_VAL.
EXIT. "//error occured
ENDIF.
CALL METHOD DC_MANAGE->GET_VALUE
EXPORTING ID = MY_ID_AT_DC
ATTRIBUTE = 'FILTER'
IMPORTING FIELD_VALUE = G_TAB_DC-FILTER
RETVAL = RETVAL
CHANGING VALUE_COUNTER = VALUE_COUNTER.
IF RETVAL <CL_GFW>OK AND RETVAL <CL_GFW>I_DC_SET_OF_VAL.
EXIT. "//error occured
ENDIF.
CALL METHOD DC_MANAGE->GET_VALUE
EXPORTING ID = MY_ID_AT_DC
ATTRIBUTE = 'X_VAL'
IMPORTING FIELD_VALUE = G_TAB_DC-X_VAL
RETVAL = RETVAL
CHANGING VALUE_COUNTER = VALUE_COUNTER.
IF RETVAL <CL_GFW>OK AND RETVAL <CL_GFW>I_DC_SET_OF_VAL.
EXIT. "//error occured
ENDIF.
CALL METHOD DC_MANAGE->GET_VALUE
EXPORTING ID = MY_ID_AT_DC
ATTRIBUTE = 'Y_VAL'
IMPORTING FIELD_VALUE = Y_VAL
RETVAL = RETVAL
CHANGING VALUE_COUNTER = VALUE_COUNTER.
IF RETVAL <CL_GFW>OK AND RETVAL <CL_GFW>I_DC_SET_OF_VAL.
EXIT. "//error occured
ENDIF.
* floating point values are converted into char with exponent
* -> get better layout by using write
* (may cause RABAX if value is changed in table ( no reconversion))
** WRITE Y_VAL TO G_TAB_DC-Y_VAL EXPONENT 0 .
G_TAB_DC-Y_VAL = Y_VAL.
CALL METHOD DC_MANAGE->GET_VALUE
EXPORTING ID = MY_ID_AT_DC
ATTRIBUTE = 'Z_VAL'
IMPORTING FIELD_VALUE = G_TAB_DC-Z_VAL
RETVAL = RETVAL
CHANGING VALUE_COUNTER = VALUE_COUNTER.
IF RETVAL <CL_GFW>OK AND RETVAL <CL_GFW>I_DC_SET_OF_VAL.
EXIT. "//error occured
ENDIF.
CALL METHOD DC_MANAGE->GET_VALUE
EXPORTING ID = MY_ID_AT_DC
ATTRIBUTE = 'TEXT'
IMPORTING FIELD_VALUE = G_TAB_DC-TEXT
RETVAL = RETVAL
CHANGING VALUE_COUNTER = VALUE_COUNTER.
IF RETVAL <CL_GFW>OK AND RETVAL <CL_GFW>I_DC_SET_OF_VAL.
EXIT. "//error occured
ENDIF.
CALL METHOD DC_MANAGE->GET_VALUE
EXPORTING ID = MY_ID_AT_DC
ATTRIBUTE = 'CU_REFOBJ'
IMPORTING FIELD_VALUE = G_TAB_DC-CU_REFOBJ
RETVAL = RETVAL
CHANGING VALUE_COUNTER = VALUE_COUNTER.
IF RETVAL <CL_GFW>OK AND RETVAL <CL_GFW>I_DC_SET_OF_VAL.
EXIT. "//error occured
ENDIF.
* write record to global table
APPEND G_TAB_DC.
IF RETVAL = CL_GFW=>OK.
EXIT. "//ready (no record left)
ENDIF.
ADD 1 TO VALUE_COUNTER.
ENDDO.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL
MSGTYPE = 'W'.
ENDIF.
ENDFORM. " FILL_TABCONTROL
*&---------------------------------------------------------------------*
*& Module PBO_0200 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE PBO_0200 OUTPUT.
SET PF-STATUS '200'.
SET TITLEBAR '200'.
RETVAL = CL_GFW=>OK.
dynnr = sy-dynnr. repid = sy-repid.
IF GP3 IS INITIAL AND NOT PROD_ID IS INITIAL.
CREATE OBJECT GP3.
TMP_PROD_ID = PROD_ID.
* create container in which to place graphic (see GP1)
CREATE OBJECT CUSTOM_CONTAINER3
EXPORTING
dynnr = dynnr
repid = repid
CONTAINER_NAME = 'GRAPHIC3'. "use uppercase letters!
CALL METHOD GP3->IF_GRAPHIC_PROXY~INIT
EXPORTING PARENT = CUSTOM_CONTAINER3
DC = DC
PROD_ID = TMP_PROD_ID
EVTCODE_LIST = EVTCODE_LIST
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
* set DC attributes
CALL METHOD GP3->SET_DC_NAMES
EXPORTING
OBJ_ID = 'OBJID'
DIM1 = 'X_VAL'
DIM2 = 'Y_VAL'
GRP_ID = 'GRPID'
IMPORTING RETVAL = RETVAL.
ENDIF. "// set dc attributes
if retval = cl_gfw=>ok.
* set customizing
call method MAIN->Set_Customizing exporting gp = GP3
importing retval = retval.
endif.
IF RETVAL = CL_GFW=>OK.
CALL METHOD GP3->IF_GRAPHIC_PROXY~ACTIVATE
IMPORTING RETVAL = RETVAL.
ENDIF.
ENDIF. "//gp3 is initial
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
* **** distribute changes (to all subscribed graphics proxies)
IF NOT DC IS INITIAL.
CALL METHOD DC->IF_DC_MANAGEMENT~DISTRIBUTE_CHANGES
IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF.
* **** activate mux (handling of external graphics and synchronization)
CALL METHOD CL_GFW_MUX=>ACTIVATE IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDMODULE. " PBO_0200 OUTPUT
*&---------------------------------------------------------------------*
*& Module PAI_0200 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE PAI_0200 INPUT.
OK_CODE = SY-UCOMM.
CALL METHOD CL_GUI_CFW=>DISPATCH.
CASE OK_CODE.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
IF NOT GP3 IS INITIAL.
CALL METHOD CUSTOM_CONTAINER3->FREE.
CLEAR GP3. clear CUSTOM_CONTAINER3.
ENDIF.
SET SCREEN 100.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " PAI_0200 INPUT
*&---------------------------------------------------------------------*
*& Module PBO_0300 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE PBO_0300 OUTPUT.
SET PF-STATUS '200'.
SET TITLEBAR '300'.
DYNNR = SY-DYNNR. REPID = SY-REPID.
RETVAL = CL_GFW=>OK.
IF SPLITTER IS INITIAL.
CREATE OBJECT CUSTOM_CONTAINER_300
EXPORTING
CONTAINER_NAME = 'CONTAINER'. "use uppercase letters!
CREATE OBJECT SPLITTER EXPORTING PARENT = CUSTOM_CONTAINER_300
ORIENTATION = 0
EXCEPTIONS OTHERS = 1.
IF SY-SUBRC <0>SET_SASH_POSITION
exporting SASH_POSITION = 80.
CREATE OBJECT SUB_SPLITTER
EXPORTING PARENT = SPLITTER->TOP_LEFT_CONTAINER
ORIENTATION = 1
EXCEPTIONS OTHERS = 1.
IF SY-SUBRC <0>ok.
* set customizing
call method MAIN->Set_Customizing exporting gp = GP5
importing retval = retval.
endif.
IF RETVAL = CL_GFW=>OK.
CALL METHOD GP5->IF_GRAPHIC_PROXY~ACTIVATE
IMPORTING RETVAL = RETVAL.
ENDIF.
ENDIF. "//gp5 is initial
IF GP6 IS INITIAL AND NOT SUB_SPLITTER IS INITIAL AND
RETVAL = CL_GFW=>OK.
CREATE OBJECT GP6.
CALL METHOD GP6->IF_GRAPHIC_PROXY~INIT
EXPORTING PARENT = sub_splitter->BOTTOM_RIGHT_CONTAINER
DC = DC
PROD_ID = CL_GUI_GP_PRES=>CO_PROD_CHART
EVTCODE_LIST = EVTCODE_LIST
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
* set DC attributes
CALL METHOD GP6->SET_DC_NAMES
EXPORTING
OBJ_ID = 'OBJID'
DIM1 = 'X_VAL'
DIM2 = 'Y_VAL'
GRP_ID = 'GRPID'
IMPORTING RETVAL = RETVAL.
ENDIF. "// set dc attributes
if retval = cl_gfw=>ok.
* set customizing
call method MAIN->Set_Customizing exporting gp = GP6
importing retval = retval.
endif.
IF RETVAL = CL_GFW=>OK.
CALL METHOD GP6->IF_GRAPHIC_PROXY~ACTIVATE
IMPORTING RETVAL = RETVAL.
ENDIF.
ENDIF. "//gp6 is initial
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF. "//splitter is initial
* **** distribute changes (to all subscribed graphics proxies)
IF NOT DC IS INITIAL.
CALL METHOD DC->IF_DC_MANAGEMENT~DISTRIBUTE_CHANGES
IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF.
* **** activate mux (handling of external graphics and synchronization)
CALL METHOD CL_GFW_MUX=>ACTIVATE IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDMODULE. " PBO_0300 OUTPUT
*&---------------------------------------------------------------------*
*& Module PAI_0300 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE PAI_0300 INPUT.
OK_CODE = SY-UCOMM.
CALL METHOD CL_GUI_CFW=>DISPATCh.
CASE OK_CODE.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
IF NOT CUSTOM_CONTAINER_300 IS INITIAL.
CALL METHOD CUSTOM_CONTAINER_300->FREE.
CLEAR CUSTOM_CONTAINER_300.
ENDIF.
CLEAR SPLITTER. CLEAR SUB_SPLITTER. CLEAR GP5. CLEAR GP6.
SET SCREEN 100.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " PAI_0300 INPUT
*&---------------------------------------------------------------------*
*& Module PBO_0400 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE PBO_0400 OUTPUT.
SET PF-STATUS '200'.
SET TITLEBAR '400'.
DYNNR = SY-DYNNR. REPID = SY-REPID.
RETVAL = CL_GFW=>OK.
IF DOCKING IS INITIAL.
* ** create docking window
create object docking exporting repid = repid
dynnr = dynnr
EXTENSION = 200.
IF TREE_DC IS INITIAL.
* ** create data container for tree
CREATE OBJECT TREE_DC.
IF SY-SUBRC <0>IF_DC_MANAGEMENT~INIT
IMPORTING ID = TREE_MY_ID_AT_DC
RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
CLEAR TREE_DC.
ELSE.
PERFORM FILL_TREE_DC.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF.
ENDIF. "//tree_dc is initial
IF TREE_GP IS INITIAL AND NOT TREE_DC IS INITIAL AND
RETVAL = CL_GFW=>OK.
CREATE OBJECT TREE_GP exporting AUTO_LINK = gfw_true.
CALL METHOD TREE_GP->IF_GRAPHIC_PROXY~INIT
EXPORTING Parent = docking
DC = TREE_DC
PROD_ID = CL_GUI_GP_HIER=>CO_PROD_SAPTREE
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
* set DC attributes
CALL METHOD TREE_GP->SET_DC_NAMES
EXPORTING
OBJ_ID = 'OBJID'
PRED = 'PRED'
ITEM_LIST = ITEM_LIST
IMPORTING RETVAL = RETVAL.
ENDIF. "// set dc attributes
IF RETVAL = CL_GFW=>OK.
CALL METHOD TREE_GP->IF_GRAPHIC_PROXY~ACTIVATE
IMPORTING RETVAL = RETVAL.
ENDIF.
ENDIF. "//tree_gp is initial
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF. "//docking initial
* **** distribute changes (to all subscribed graphics proxies)
IF NOT TREE_DC IS INITIAL.
CALL METHOD TREE_DC->IF_DC_MANAGEMENT~DISTRIBUTE_CHANGES
IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDIF.
* **** activate mux (handling of external graphics and synchronization)
CALL METHOD CL_GFW_MUX=>ACTIVATE IMPORTING RETVAL = RETVAL.
IF RETVAL <CL_GFW>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
ENDIF.
ENDMODULE. " PBO_0400 OUTPUT
*&---------------------------------------------------------------------*
*& Module PAI_0400 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE PAI_0400 INPUT.
OK_CODE = SY-UCOMM.
CALL METHOD CL_GUI_CFW=>DISPATCH.
CASE OK_CODE.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
IF NOT DOCKING IS INITIAL.
call method docking->free.
CLEAR DOCKING. CLEAR TREE_GP.
ENDIF.
* do not destroy DC (static contents->better performance on reopen)
SET SCREEN 100.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " PAI_0400 INPUT
*&---------------------------------------------------------------------*
*& Form FILL_TREE_DC
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* <P_RETVAL>E_GP_DCHANDLE.
EXIT.
ENDIF.
RETVAL = CL_GFW=>OK.
CLEAR OBJ.
OBJ-OBJID = CO_GFW_PROG_B_TR10.
OBJ-NODE_TEXT0 = OBJ-OBJID.
CALL METHOD TREE_DC->SET_OBJ_VALUES EXPORTING ID = TREE_MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
CLEAR OBJ.
OBJ-OBJID = CO_GFW_PROG_B_TR20.
OBJ-PRED = CO_GFW_PROG_B_TR10.
OBJ-NODE_TEXT0 = OBJ-OBJID.
CALL METHOD TREE_DC->SET_OBJ_VALUES EXPORTING ID = TREE_MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
CLEAR OBJ.
OBJ-OBJID = CO_GFW_PROG_B_TR30.
OBJ-PRED = CO_GFW_PROG_B_TR10.
OBJ-NODE_TEXT0 = OBJ-OBJID.
CALL METHOD TREE_DC->SET_OBJ_VALUES EXPORTING ID = TREE_MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
CLEAR OBJ.
OBJ-OBJID = CO_GFW_PROG_B_TR31.
OBJ-PRED = CO_GFW_PROG_B_TR30.
OBJ-NODE_TEXT0 = OBJ-OBJID.
CALL METHOD TREE_DC->SET_OBJ_VALUES EXPORTING ID = TREE_MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
CLEAR OBJ.
OBJ-OBJID = CO_GFW_PROG_B_TR32.
OBJ-PRED = CO_GFW_PROG_B_TR30.
OBJ-NODE_TEXT0 = OBJ-OBJID.
CALL METHOD TREE_DC->SET_OBJ_VALUES EXPORTING ID = TREE_MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
IF RETVAL = CL_GFW=>OK.
CLEAR OBJ.
OBJ-OBJID = CO_GFW_PROG_B_TR33.
OBJ-PRED = CO_GFW_PROG_B_TR30.
OBJ-NODE_TEXT0 = OBJ-OBJID.
CALL METHOD TREE_DC->SET_OBJ_VALUES EXPORTING ID = TREE_MY_ID_AT_DC
OBJ = OBJ
IMPORTING RETVAL = RETVAL.
ENDIF.
ENDFORM. " FILL_TREE_DC
*&---------------------------------------------------------------------*
*& Form SET_GP_FILTER_LIST
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM SET_GP_FILTER_LIST.
DATA: OFFSET TYPE I VALUE 0,
TMP_FILTER TYPE I,
LEN TYPE I.
* assemble gp_filter_list from filter
REFRESH GP_FILTER_LIST.
CLEAR GP_FILTER_LIST.
IF NOT FILTER IS INITIAL.
LEN = STRLEN( FILTER ). CLEAR OFFSET.
DO LEN TIMES.
ASSIGN FILTER+OFFSET(1) TO <FILTER>.
TMP_FILTER = <FILTER>. OFFSET = OFFSET + 1.
IF NOT TMP_FILTER IS INITIAL.
APPEND TMP_FILTER TO GP_FILTER_LIST.
ENDIF.
ENDDO.
ENDIF.
ENDFORM. " SET_GP_FILTER_LIST
*GUI Texts
*----------------------------------------------------------
* 100 --> Demonstration of Business Graphics with GFW
* 200 --> Follow-On Screen with Full Screen Graphic
* 300 --> Follow-On Screen with Splitter Graphic
* 400 --> Follow-On Screen with Docking Window and Tree
****************************************************************
* This file was generated by Direct Download Enterprise. *
* Please do not change it manually. *
****************************************************************
%_DYNPRO
GFW_DEMO_PRES
0100
620
40
%_HEADER
GFW_DEMO_PRES 0100 0100 30113192 35 0 0 31115 0G E 20001113152508
%_DESCRIPTION
Main Screen
%_FIELDS
DC_INSERT CHAR 20 00 00 00 30 00 1 2 0 0 0 2 P 0 0 112 @17\QInsert line@ DCI
DC_DELETE CHAR 17 00 00 00 30 00 1 5 0 0 0 2 P 0 0 113 @18\Qdelete line@ DCD
DC_CLEAR CHAR 25 00 00 00 30 00 1 8 0 0 0 2 P 0 0 102 @B2\QDelete all lines@ DCR
TXT_DC 0 CHAR 14 00 00 00 30 00 1 11 0 0 0 0 0 0 Data container
TAB_DC 59 F4 C8 00 00 00 2 2 E 101 1 1 9 T 0 0
TXT_TAB_DC_OBJID CHAR 5 00 00 00 30 80 1 1 T 101 1 1 5 0 0 ObjID
TXT_TAB_DC_GRPID CHAR 5 00 00 00 30 80 1 2 T 101 1 1 7 0 0 Seq.
TXT_TAB_DC_FILTER CHAR 1 00 00 00 30 80 1 3 T 101 1 1 3 0 0 F
TXT_TAB_DC_X_VAL CHAR 6 00 00 00 30 80 1 4 T 101 1 1 5 0 0 X val.
TXT_TAB_DC_Y_VAL CHAR 7 00 00 00 30 80 1 5 T 101 1 1 24 0 0 Y value
TXT_TAB_DC_Z_VAL CHAR 6 00 00 00 30 80 1 6 T 101 1 1 6 0 0 Z val.
TXT_TAB_DC_TEXT CHAR 12 00 00 00 30 80 1 7 T 101 1 1 13 0 0 Label
TXT_TAB_DC_CU_STATUS CHAR 6 00 00 00 30 80 1 8 T 101 1 1 7 0 0 Status
TXT_TAB_DC_CU_REFOBJ CHAR 5 00 00 00 30 80 1 9 T 101 1 1 10 0 0 CuObj
G_TAB_DC-MARK CHAR 1 80 00 80 00 20 1 0 T 101 1 1 1 C 0 0 106
G_TAB_DC-OBJID CHAR 5 80 02 88 30 00 1 1 T 101 1 1 5 0 0 _____
G_TAB_DC-GRPID CHAR 10 81 02 80 00 00 1 2 T 101 1 1 7 0 0 __________
G_TAB_DC-FILTER INT1 3 80 00 80 00 00 1 3 T 101 1 1 3 0 0 ___
G_TAB_DC-X_VAL CHAR 10 81 02 80 00 00 1 4 T 101 1 1 5 0 0 __________
G_TAB_DC-Y_VAL C CHAR 22 80 00 80 00 00 1 5 T 101 1 1 24 0 0 ______________________
G_TAB_DC-Z_VAL CHAR 10 81 02 80 00 00 1 6 T 101 1 1 6 0 0 __________
G_TAB_DC-TEXT CHAR 10 80 02 80 00 00 1 7 T 101 1 1 13 0 0 __________
G_TAB_DC-CU_STATUS CHAR 10 81 02 80 00 00 1 8 T 101 1 1 7 0 0 __________
G_TAB_DC-CU_REFOBJ CHAR 10 80 02 80 00 00 1 9 T 101 1 1 10 0 0 __________
PB_GRAPHIC1 CHAR 39 00 00 00 30 00 2 62 0 0 0 9 P 0 0 103 @0N\QGraphic SAPOCX (in)visible@ on/off PBG1
GRAPHIC1 43 00 00 00 30 00 2 72 0 0 0 9 U 1 1 104
PBG1FILTER CHAR 36 00 00 00 30 00 4 62 0 0 0 3 P 0 0 107 @4G\QSet (new) DC filter@ PBG1FI X
G1FILTER C CHAR 9 81 00 80 31 00 4 66 0 0 0 4 0 0 _________
TXT_FILTER 0 CHAR 10 00 00 00 30 00 12 2 0 0 0 0 0 0 DC filter: X
FILTER C CHAR 14 80 00 80 00 00 12 17 0 0 0 0 0 0 ______________ DLA
DUMMY_CONTAINER 2 00 00 00 30 00 12 72 0 0 0 2 U 1 1 105
TXT_PROD_ID 0 CHAR 14 00 00 00 30 00 13 2 0 0 0 0 0 0 Graphic prod.: X
PROD_ID C CHAR 40 80 00 80 00 00 13 17 0 0 0 44 0 0 ________________________________________ DLA
PB_GRAPHIC2 CHAR 33 00 00 00 30 00 15 2 0 0 0 5 P 0 0 108 @0N\Qcreate graphic (product)@ on PBG2
GRAPHIC2 86 00 00 00 30 00 15 12 0 0 0 16 U 1 1 109
PBG2FILTER CHAR 36 00 00 00 30 00 17 2 0 0 0 3 P 0 0 110 @4G\QSet (new) DC filter@ PBG2FI X
G2FILTER C CHAR 4 81 00 80 31 00 17 6 0 0 0 0 0 0 ____
CHAR 20 80 10 00 00 00 255 1 O 0 0 0 0 0 0 ____________________
%_FLOWLOGIC
PROCESS BEFORE OUTPUT.
MODULE PBO_0100.
LOOP AT G_TAB_DC WITH CONTROL TAB_DC. ENDLOOP.
*
PROCESS AFTER INPUT.
LOOP AT G_TAB_DC.
CHAIN.
FIELD: G_TAB_DC-OBJID,
G_TAB_DC-GRPID,
G_TAB_DC-FILTER,
G_TAB_DC-X_VAL,
G_TAB_DC-Y_VAL,
G_TAB_DC-Z_VAL,
G_TAB_DC-TEXT,
G_TAB_DC-CU_STATUS,
G_TAB_DC-CU_REFOBJ.
MODULE MODIFIED_TAB_DC_100 ON CHAIN-REQUEST.
ENDCHAIN.
CHAIN.
FIELD: G_TAB_DC-MARK.
MODULE MARKED_TAB_DC_100 ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE PAI_0100.
****************************************************************
* This file was generated by Direct Download Enterprise. *
* Please do not change it manually. *
****************************************************************
%_DYNPRO
GFW_DEMO_PRES
0200
620
40
%_HEADER
GFW_DEMO_PRES 0200 0200 21 83192 35 0 0 21 83 0G E 20001113152508
%_DESCRIPTION
Follow-On Screen with Full Screen Graphic
%_FIELDS
GRAPHIC3 83 00 30 00 30 00 1 2 0 0 0 21 U 1 1 102
CHAR 20 80 10 00 00 00 255 1 O 0 0 0 0 0 0 ____________________
%_FLOWLOGIC
PROCESS BEFORE OUTPUT.
MODULE PBO_0200.
*
PROCESS AFTER INPUT.
MODULE PAI_0200.
****************************************************************
* This file was generated by Direct Download Enterprise. *
* Please do not change it manually. *
****************************************************************
%_DYNPRO
GFW_DEMO_PRES
0300
620
40
%_HEADER
GFW_DEMO_PRES 0300 0300 0 0192 35 0 0 21 83 0G E 20001113152508
%_DESCRIPTION
Follow-On Screen with Splitter Graphic
%_FIELDS
CONTAINER 83 00 30 00 30 00 1 2 0 0 0 21 U 1 1 102
CHAR 20 80 10 00 00 00 255 1 O 0 0 0
%_FLOWLOGIC
PROCESS BEFORE OUTPUT.
MODULE PBO_0300.
*
PROCESS AFTER INPUT.
MODULE PAI_0300.
****************************************************************
* This file was generated by Direct Download Enterprise. *
* Please do not change it manually. *
****************************************************************
%_DYNPRO
GFW_DEMO_PRES
0400
620
40
%_HEADER
GFW_DEMO_PRES 0400 0400 12 42192 35 0 0 21 83 0G E 20001113152508
%_DESCRIPTION
Docking Window
%_FIELDS
TXT1 0 CHAR 14 00 00 00 30 00 1 2 0 0 0 0 0 0 --------------
TXT2 0 CHAR 14 00 00 00 30 00 1 27 0 0 0
TXT3 CHAR 3 00 00 00 30 00 3 20 0 0 0
PB1 CHAR 23 00 00 00 30 00 10 10 0 0 0
CHAR 20 80 10 00 00 00 255 1 O 0 0 0
%_FLOWLOGIC
PROCESS BEFORE OUTPUT.
MODULE PBO_0400.
*
PROCESS AFTER INPUT.
MODULE PAI_0400.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.