Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
________________________________________________________________________
Number
Version
Status
Set on
865926
2 vom 14.02.2006
Released for Customer
,14.02.2006
Language
Mastersprache
Short text
EN
DE
COOIS: Additional list with XSteps
Responsible
Component
Dirk Giebel
PP-SFC-IS
Information System
________________________________________________________________________
Long text
Symptom
You want to display an additional list in the information system.
Other terms
COOIS, COHV, COOISPI, COHVPI
Reason and Prerequisites
This note gives an example of how you can use the WORKORDER_INFOSYSTEM
BADI and the CL_COIS_ADD_LIST class (or the CL_COIS_DEMO_LIST class in
Release 5.0) to add additional lists.
This is demonstrated in the example of an additional XSteps list. The
example is not intended to be complete or functionally correct. XSteps
must be active in your system.
Take the authorization concept of your company into account. If
necessary, implement additional authorization checks to display data and
to execute actions and functions.
After you have implemented this example, you select the additional
individual "XSteps" list (PPIOZ001). Since, in the object overview, you
cannot specify whether an additional list should be displayed, in this
example, the additional "XSteps" list is always displayed when the
profile for the object overview starts with ADD001.
In this way, you can add as many lists as required (PPIOZ001, PPIOZ002
...).
Solution
1. Extend the value range of the PPIO_LISTTYPE domain to include an
entry for the additional list:
PPIOZ001 XSteps
2. Create a structure and a table type for the data to be displayed:
a) In Transaction SE11, create the following data elements in a Z
package (such as ZCOIS) and activate them:
ZCOIS_XSTEPS_LIGHTS, domain: ICON TEXT, name all field labels:
Status icon
b) Use Transaction SE11 to create the ZCOIS_S_XSTEPS structure:
.INCLUDE/COCH
STATUSTEXT/STATUSTEXT
LIGHTS/ZCOIS_XSTEPS_LIGHTS
INDEX_NODE/TABIX_D
For the COCH include, copy all fields of this include to the
structure: Menu -> Edit -> Include -> Copy Components.
For the BID component, change the type to AUFNR.
Save it in the same Z package and select the structure as
enhanceable.
Activate the structure.
c) Use Transaction SE11 to create the ZCOIS_T_XSTEPS table type:
Name: XSteps for information system
Line type: ZCOIS_T_XSTEPS
Activate it in the same Z package.
3. Create the new class for the additional list:
Use Transaction SE38 to create the ZPI_SHEET_SHOW help report of the
type "Executable program" in the same Z package and implement the
source code from the correction instructions.
Use Transaction SE24 to create the ZCL_COIS_XSTEPS class in the same
Z package:
a) Under 'Properties', enter the CL_COIS_ADD_LIST super class (enter
CL_COIS_DEMO_LIST for Release 5.0).
b) Save your entry.
c) Create the private instance methods PROTOCOL_DISPLAY, SEND,
DELETE and AUTHORITY_CHECK.
Redefine the HANDLE_TOOLBAR and HANDLE_USER_COMMAND methods.
Implement the source code from the correction instructions in
these six methods.
d) Add the following text elements with the specified length:
B01 Refresh list (Length 30)
021 rejected
c) Implement the source code that is contained in the correction
instructions in methods TABLES_MODIFY_LAY, DETAIL_LIST_LAY and
OVERVIEW_TREE_LAY.
d) Activate the implementing class and the BAdI implementation.
________________________________________________________________________
Valid releases
Software component
SAP_APPL
Release
from
to
SAP Application
600
500
- 600
- 500
________________________________________________________________________
References to related notes
Number
Short text
____________________________________________________________
865546
COOIS: Preparation for additional lists
363327
COOIS/CO26/CO28: Change list of fields that can be displayed
________________________________________________________________________
TYPE ppio_listtype,
TYPE sytabix,
TYPE cois_s_detail_list.
TYPE cois_s_detail_list,
TYPE tcoa,
TYPE ppio_entry_sc1100.
iv_calling_application = if_cois_con=>appl_overview
OR iv_calling_application = if_cois_con=>appl_external_ov.
ASSIGN ('(SAPLCOISOUTPUT)GS_TCOA') TO <ls_tcoa>.
CHECK sy-subrc = 0.
CHECK <ls_tcoa>-profid(3) = 'ADD'.
lv_object = 'PPIOZ'.
lv_object+5 = <ls_tcoa>-profid+3(3).
ENDIF.
IF iv_calling_application = if_cois_con=>appl_detail_list.
ASSIGN ('(PPIO_ENTRY)P_SC1100') TO <ls_sc1100>.
CHECK sy-subrc = 0.
CHECK <ls_sc1100>-ppio_listtyp(5) = 'PPIOZ'.
lv_object = <ls_sc1100>-ppio_listtyp.
ENDIF.
CHECK NOT lv_object IS INITIAL.
* get order numbers (no planned orders!)
* =================
DATA:
lt_order
TYPE
FIELD-SYMBOLS:
<lr_order>
TYPE
<ls_order>
TYPE
<ls_ioheader> LIKE
TABLE OF aufnr.
range_t_aufnr,
LINE OF range_t_aufnr,
LINE OF ct_ioheader.
IF iv_calling_application = if_cois_con=>appl_detail_list.
get order numbers from selection routine
ASSIGN ('(SAPLCOISSELECT)AUFNR_RANGE[]') TO <lr_order>.
CHECK sy-subrc = 0.
LOOP AT <lr_order> ASSIGNING <ls_order>.
APPEND <ls_order>-low TO lt_order.
ENDLOOP.
ELSE.
* object overview always has IOHEADER_TAB filled
LOOP AT ct_ioheader ASSIGNING <ls_ioheader>
WHERE autyp = '10'
*
OR autyp = '40'.
APPEND <ls_ioheader>-aufnr TO lt_order.
ENDLOOP.
ENDIF.
* add additional list
* ===================
CASE lv_object.
*
*
*
*
WHEN 'PPIOZ001'.
PPIOZ001 => add XSteps list
===============
READ TABLE st_detail_list WITH KEY object = lv_object
ASSIGNING <ls_detail_list>.
IF sy-subrc = 0.
table already there => refresh mode
IF NOT <ls_detail_list>-list IS INITIAL.
refresh data
CLEAR st_xstep.
<ls_detail_list>-list->refresh( ).
ENDIF.
ELSE.
first selection create entry in ST_DETAIL_LIST
ls_detail_list-position = 99.
ls_detail_list-object
= lv_object.
ls_detail_list-grid_title = 'XSteps'.
ls_detail_list-tabname
= 'ZCOIS_S_XSTEPS'.
GET REFERENCE OF st_xstep INTO ls_detail_list-table.
ls_detail_list-list_class = 'ZCL_COIS_XSTEPS'.
APPEND ls_detail_list TO st_detail_list.
READ TABLE st_detail_list WITH KEY object = lv_object
ASSIGNING <ls_detail_list>.
ENDIF.
CHECK <ls_detail_list> IS ASSIGNED.
<ls_xstep>-statustext = text-001.
<ls_xstep>-lights = '@09@'.
"yellow light
CONCATENATE '@09\Q' text-001 '@' INTO <ls_xstep>-lights.
*
*
WHEN 'PPIOZ002'.
PPIOZ002 => add xyz list
....
ENDCASE.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_IM_COIS_XSTEPS
*&
IF_EX_WORKORDER_INFOSYSTEM~OVERVIEW_TREE_LAY
*& Object Header CLAS ZCL_IM_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD if_ex_workorder_infosystem~overview_tree_lay.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
**
**
*
*
*
*
PPIOZ002: xyz
================
READ TABLE st_detail_list WITH KEY object = 'PPIOZ002'
INTO ls_detail_list.
CHECK sy-subrc = 0.
...
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_IM_COIS_XSTEPS
*&
IF_EX_WORKORDER_INFOSYSTEM~DETAIL_LIST_LAY
*& Object Header CLAS ZCL_IM_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD if_ex_workorder_infosystem~detail_list_lay.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
APPEND LINES OF st_detail_list TO ct_detail_list.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_COIS_XSTEPS
*&
HANDLE_TOOLBAR
*& Object Header CLAS ZCL_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD handle_toolbar.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* call super method
super->handle_toolbar( e_object
= e_object
e_interactive = e_interactive ).
DATA:
lt_toolbar LIKE e_object->mt_toolbar,
ls_toolbar LIKE LINE OF e_object->mt_toolbar.
* create list of own toolbar buttons
* refresh
CLEAR ls_toolbar.
ls_toolbar-butn_type = 0.
ls_toolbar-function = 'REFRESH'.
ls_toolbar-icon = icon_refresh.
ls_toolbar-quickinfo = text-b01.
ls_toolbar-disabled = space.
APPEND ls_toolbar TO lt_toolbar.
* append a separator to toolbar
CLEAR ls_toolbar.
ls_toolbar-butn_type = 3.
APPEND ls_toolbar TO lt_toolbar.
* delete
CLEAR ls_toolbar.
ls_toolbar-butn_type = 0.
ls_toolbar-function = 'DELETE'.
ls_toolbar-icon = icon_delete.
ls_toolbar-quickinfo = text-b04.
ls_toolbar-text = text-b04.
ls_toolbar-disabled = space.
APPEND ls_toolbar TO lt_toolbar.
* append a separator to toolbar
CLEAR ls_toolbar.
ls_toolbar-butn_type = 3.
APPEND ls_toolbar TO lt_toolbar.
* protocol
CLEAR ls_toolbar.
ls_toolbar-butn_type = 0.
ls_toolbar-function = 'PROTOCOL'.
ls_toolbar-icon = icon_information.
ls_toolbar-quickinfo = text-b02.
ls_toolbar-text = text-b02.
ls_toolbar-disabled = space.
APPEND ls_toolbar TO lt_toolbar.
* send
CLEAR ls_toolbar.
ls_toolbar-butn_type = 0.
ls_toolbar-function = 'SEND'.
ls_toolbar-icon = icon_mail.
ls_toolbar-quickinfo = text-b03.
ls_toolbar-text = text-b03.
ls_toolbar-disabled = space.
APPEND ls_toolbar TO lt_toolbar.
display protocols
protocol_display( ).
WHEN 'SEND'.
send
send( ).
mo_grid->refresh_table_display( ).
WHEN 'DELETE'.
delete
delete( ).
mo_grid->refresh_table_display( ).
*
*
*
*
WHEN 'SHOW'
OR 'EDIT'.
DATA:
lt_row_alv
TYPE lvc_t_roid,
ls_row_alv
TYPE lvc_s_roid,
lv_display_mode TYPE char1.
FIELD-SYMBOLS:
<table>
TYPE zcois_t_xsteps,
<ls_data>
TYPE zcois_s_xsteps.
get data table from reference
ASSIGN md_data->* TO <table>.
get selected rows
CALL METHOD mo_grid->get_selected_rows
IMPORTING
et_row_no = lt_row_alv.
cl_gui_cfw=>flush( ).
IF lt_row_alv IS INITIAL.
no entries selected
MESSAGE i081(cb).
EXIT.
ENDIF.
DESCRIBE TABLE lt_row_alv LINES sy-dbcnt.
IF sy-dbcnt > 1.
MESSAGE i752(c0).
EXIT.
ELSE.
IF e_ucomm = 'SHOW'.
lv_display_mode = 'X'.
ELSE.
CLEAR lv_display_mode.
ENDIF.
loop over selected rows (only 1)
LOOP AT lt_row_alv INTO ls_row_alv.
read marked data table entry
READ TABLE <table> INDEX ls_row_alv-row_id
ASSIGNING <ls_data>.
CHECK sy-subrc = 0.
SUBMIT zpi_sheet_show
WITH p_crid = <ls_data>-crid
WITH p_mode = lv_display_mode
AND RETURN.
ENDLOOP.
ENDIF.
WHEN OTHERS.
super->handle_user_command( e_ucomm ).
ENDCASE.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_COIS_XSTEPS
*&
PROTOCOL_DISPLAY
*& Object Header CLAS ZCL_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD protocol_display.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
**********************************************************************
* macro to simplify creation of field catalog entry
**********************************************************************
DATA:
ls_fcat
TYPE bal_s_fcat,
ls_bal_profile TYPE bal_s_prof.
DEFINE macro_add_fields.
clear ls_fcat.
ls_fcat-ref_table = 'BAL_S_SHOW'.
if &2 = 0.
ls_fcat-no_out
= 'X'.
else.
ls_fcat-col_pos = &2.
endif.
ls_fcat-is_treecol = &3.
ls_fcat-ref_field = &4.
ls_fcat-outputlen = &5.
ls_fcat-cltxt_add = &6.
ls_fcat-colddictxt = &7.
append ls_fcat to ls_bal_profile-&1_fcat.
END-OF-DEFINITION.
DATA:
ls_baldisp
lv_log_extnum
lv_answer
lv_num_prot
lt_row_alv
ls_row_alv
TYPE
TYPE
TYPE
TYPE
TYPE
TYPE
FIELD-SYMBOLS:
<table> TYPE zcois_t_xsteps,
<ls_data> TYPE zcois_s_xsteps.
* get data table from reference
',
*
*
*
*
AddColumnText DDIC-Text
' '
' '
' '
' '
' '
' '
' '
' '
' '
' '
' ',
' ',
' ',
' ',
'R',
'R',
'R',
'R',
' ',
' ',
' '
'X'
' ',
'R',
' '
' '
' ',
' ',
mess
mess
mess
mess
mess
mess
mess
mess
2
0
0
0
0
0
0
0
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'T_MSG'
'MSGTY'
'MSGID'
'MSGNO'
'DETLEVEL'
'T_PROBCLSS'
'ALSORT'
'MSG_COUNT'
80
0
0
0
0
0
0
0
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
',
',
',
',
',
',
',
'.
Aufruf Protokollanzeige
CALL FUNCTION 'APPL_LOG_DISPLAY'
EXPORTING
object
= 'COCR'
subobject
= ' '
external_number
= lv_log_extnum
object_attribute
= 2
subobject_attribute
= 2
external_number_attribute = 2
date_from
= '00000000'
time_from
= '000000'
date_to
= '00000000'
time_to
= '000000'
title_selection_screen
= text-t01
title_list_screen
= text-t01
column_selection
= ls_baldisp
suppress_selection_dialog = 'X'
i_s_display_profile
= ls_bal_profile
IMPORTING
number_of_protocols
= lv_num_prot
EXCEPTIONS
no_authority
= 01.
IF sy-subrc = 01.
MESSAGE e080(cb).
*
Keine Berechtigung zur Protokollanzeige
ELSEIF lv_num_prot = 0.
MESSAGE i806(cb).
ENDIF.
ENDLOOP.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_COIS_XSTEPS
*&
SEND
*& Object Header CLAS ZCL_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD send.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA:
lt_row_alv
TYPE lvc_t_roid,
ls_row_alv
TYPE lvc_s_roid,
ls_coch
TYPE coch,
lt_coch
TYPE TABLE OF coch.
FIELD-SYMBOLS:
<table> TYPE zcois_t_xsteps,
<ls_data> TYPE zcois_s_xsteps.
* get data table from reference
ASSIGN md_data->* TO <table>.
* get selected rows
CALL METHOD mo_grid->get_selected_rows
IMPORTING
et_row_no = lt_row_alv.
cl_gui_cfw=>flush( ).
*
IF lt_row_alv IS INITIAL.
no entries selected
MESSAGE i081(cb).
EXIT.
ENDIF.
check authority
lock object
CALL FUNCTION 'ENQUEUE_ECOCB_COCH'
EXPORTING
crid
= <ls_data>-crid
_scope
= '1'
EXCEPTIONS
foreign_lock = 01
system_failure = 02.
CASE sy-subrc.
WHEN 01.
MESSAGE i072(cb) WITH <ls_data>-crid. " wird bereits bearb.
CONTINUE.
WHEN 02.
MESSAGE a015(cb) WITH <ls_data>-crid." Systemfehler
ENDCASE.
*
*
*
*
*
check status
IF ls_coch-crstat <> '00001'. "crst_creat
MESSAGE i082(cb) WITH ls_coch-crid. " alread send.
dequeue
CALL FUNCTION 'DEQUEUE_ECOCB_COCH'
EXPORTING
crid = ls_coch-crid
_scope = '1'.
CONTINUE.
ENDIF.
type of communication interface
IF ls_coch-cotyp = '3'. "comty_pull: RFC-Download
control recipe & of type 3. sending not possible.
MESSAGE i088(cb) WITH ls_coch-crid.
dequeue
CALL FUNCTION 'DEQUEUE_ECOCB_COCH'
EXPORTING
crid = ls_coch-crid
_scope = '1'.
CONTINUE.
ENDIF.
*
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_COIS_XSTEPS
*&
DELETE
*& Object Header CLAS ZCL_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD delete.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA:
lt_row_alv
TYPE lvc_t_roid,
ls_row_alv
TYPE lvc_s_roid,
lv_answer
TYPE char1,
ls_coch
TYPE coch,
lt_coch
TYPE TABLE OF coch,
lt_coft
TYPE TABLE OF coft,
lt_cofv
TYPE TABLE OF cofv,
lt_cocoa
TYPE TABLE OF cocoa,
lv_log_extnum TYPE balhdr-extnumber.
FIELD-SYMBOLS:
<table> TYPE zcois_t_xsteps,
<ls_data> TYPE zcois_s_xsteps.
* confirm deletion
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'N'
textline1
= text-p10
textline2
= text-p11
titel
= text-p12
IMPORTING
answer
= lv_answer.
* check answer
CHECK lv_answer = 'J'.
* get data table from reference
ASSIGN md_data->* TO <table>.
* get selected rows
CALL METHOD mo_grid->get_selected_rows
IMPORTING
et_row_no = lt_row_alv.
cl_gui_cfw=>flush( ).
*
IF lt_row_alv IS INITIAL.
no entries selected
MESSAGE i081(cb).
EXIT.
ENDIF.
check authority
IF 0 <> authority_check( iv_plant = <ls_data>-werk
iv_actvt = '06' ). "ACT_DELE
MESSAGE i078(cb) WITH 'DELETE' <ls_data>-werk.
CONTINUE.
ENDIF.
lock
CALL FUNCTION 'ENQUEUE_ECOCB_COCH'
EXPORTING
crid
= <ls_data>-crid
EXCEPTIONS
foreign_lock =
system_failure =
CASE sy-subrc.
WHEN 01.
MESSAGE i072(cb)
CONTINUE.
WHEN 02.
MESSAGE a015(cb)
ENDCASE.
*
01
02.
WITH <ls_data>-crid.
WITH <ls_data>-crid.
IF sy-subrc <> 0.
control recipe already deleted
MESSAGE i073(cb) WITH <ls_data>-crid.
*
dequeue
CALL FUNCTION 'DEQUEUE_ECOCB_COCH'
EXPORTING
crid = <ls_data>-crid.
CONTINUE.
ELSE.
IF ls_coch-crstat <> <ls_data>-crstat.
MESSAGE i074(cb) WITH <ls_data>-crid.
*
dequeue
CALL FUNCTION 'DEQUEUE_ECOCB_COCH'
EXPORTING
crid = <ls_data>-crid.
CONTINUE.
ENDIF.
ENDIF.
APPEND ls_coch TO lt_coch.
* update display list and set delete flag
MOVE-CORRESPONDING ls_coch TO <ls_data>.
<ls_data>-errkz = 'X'. "crst_dele.
ENDLOOP.
*
IF lt_coch IS INITIAL.
nothing deleted
MESSAGE s075(cb).
EXIT.
ENDIF.
* delete protocols
LOOP AT lt_coch INTO ls_coch.
lv_log_extnum = ls_coch-crid.
CALL FUNCTION 'APPL_LOG_DELETE'
EXPORTING
object
= 'COCR'
subobject
= ' '
external_number = lv_log_extnum
date_to
= sy-datlo
time_to
= sy-timlo
log_class
= '1'
EXCEPTIONS
no_authority
= 01.
IF sy-subrc = 01.
*
no authority to delete protocols
MESSAGE e079(cb).
ENDIF.
ENDLOOP.
* read objects to a message
SELECT * FROM coft INTO TABLE lt_coft FOR ALL ENTRIES IN lt_coch
WHERE crid = lt_coch-crid.
SELECT * FROM cofv INTO TABLE lt_cofv FOR ALL ENTRIES IN lt_coch
WHERE crid = lt_coch-crid.
SELECT * FROM cocoa INTO TABLE lt_cocoa FOR ALL ENTRIES IN lt_coch
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
coch FROM TABLE lt_coch.
coft FROM TABLE lt_coft.
cofv FROM TABLE lt_cofv.
cocoa FROM TABLE lt_cocoa.
*$*$----------------------------------------------------------------$*$*
*$ Correction Inst.
0120061532 0000783195
$*
*$--------------------------------------------------------------------$*
*$ Valid for
:
$*
*$ Software Component SAP_APPL SAP Application
$*
*$ Release 600
All Support Package Levels
$*
*$--------------------------------------------------------------------$*
*$ Changes/Objects Not Contained in Standard SAP System
$*
*$*$----------------------------------------------------------------$*$*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_IM_COIS_XSTEPS
*&
IF_EX_WORKORDER_INFOSYSTEM~TABLES_MODIFY_LAY
*& Object Header CLAS ZCL_IM_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD if_ex_workorder_infosystem~tables_modify_lay.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA:
lv_object
lv_list_count
ls_detail_list
FIELD-SYMBOLS:
<ls_detail_list>
<ls_tcoa>
<ls_sc1100>
TYPE ppio_listtype,
TYPE sytabix,
TYPE cois_s_detail_list.
TYPE cois_s_detail_list,
TYPE tcoa,
TYPE ppio_entry_sc1100.
iv_calling_application = cl_cois_c=>appl_overview
OR iv_calling_application = cl_cois_c=>appl_external_ov.
ASSIGN ('(SAPLCOISOUTPUT)GS_TCOA') TO <ls_tcoa>.
CHECK sy-subrc = 0.
CHECK <ls_tcoa>-profid(3) = 'ADD'.
lv_object = 'PPIOZ'.
lv_object+5 = <ls_tcoa>-profid+3(3).
ENDIF.
IF iv_calling_application = cl_cois_c=>appl_detail_list.
ASSIGN ('(PPIO_ENTRY)P_SC1100') TO <ls_sc1100>.
CHECK sy-subrc = 0.
CHECK <ls_sc1100>-ppio_listtyp(5) = 'PPIOZ'.
lv_object = <ls_sc1100>-ppio_listtyp.
ENDIF.
CHECK NOT lv_object IS INITIAL.
* get order numbers (no planned orders!)
* =================
DATA:
lt_order
TYPE TABLE OF aufnr.
FIELD-SYMBOLS:
<lr_order>
TYPE range_t_aufnr,
<ls_order>
TYPE LINE OF range_t_aufnr,
<ls_ioheader> LIKE LINE OF ct_ioheader.
*
IF iv_calling_application = cl_cois_c=>appl_detail_list.
get order numbers from selection routine
ASSIGN ('(SAPLCOISSELECT)AUFNR_RANGE[]') TO <lr_order>.
CHECK sy-subrc = 0.
LOOP AT <lr_order> ASSIGNING <ls_order>.
APPEND <ls_order>-low TO lt_order.
ENDLOOP.
ELSE.
* object overview always has IOHEADER_TAB filled
LOOP AT ct_ioheader ASSIGNING <ls_ioheader>
WHERE autyp = '10'
OR autyp = '40'.
APPEND <ls_ioheader>-aufnr TO lt_order.
ENDLOOP.
ENDIF.
* add additional list
* ===================
CASE lv_object.
*
*
*
*
WHEN 'PPIOZ001'.
PPIOZ001 => add XSteps list
===============
READ TABLE st_detail_list WITH KEY object = lv_object
ASSIGNING <ls_detail_list>.
IF sy-subrc = 0.
table already there => refresh mode
IF NOT <ls_detail_list>-list IS INITIAL.
refresh data
CLEAR st_xstep.
<ls_detail_list>-list->refresh( ).
ENDIF.
ELSE.
first selection create entry in ST_DETAIL_LIST
ls_detail_list-position = 99.
ls_detail_list-object
= lv_object.
ls_detail_list-grid_title = 'XSteps'.
ls_detail_list-tabname
= 'ZCOIS_S_XSTEPS'.
GET REFERENCE OF st_xstep INTO ls_detail_list-table.
ls_detail_list-list_class = 'ZCL_COIS_XSTEPS'.
APPEND ls_detail_list TO st_detail_list.
READ TABLE st_detail_list WITH KEY object = lv_object
ASSIGNING <ls_detail_list>.
ENDIF.
CHECK <ls_detail_list> IS ASSIGNED.
*
*
WHEN 'PPIOZ002'.
PPIOZ002 => add xyz list
....
ENDCASE.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_IM_COIS_XSTEPS
*&
IF_EX_WORKORDER_INFOSYSTEM~OVERVIEW_TREE_LAY
*& Object Header CLAS ZCL_IM_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD if_ex_workorder_infosystem~overview_tree_lay.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* fill field INDEX_NODE in additional tables
* PPIOZ001: XSteps
* ================
FIELD-SYMBOLS:
<ls_xstep>
LIKE LINE OF st_xstep,
<ls_ioheader> LIKE LINE OF ct_ioheader.
LOOP AT st_xstep ASSIGNING <ls_xstep>.
fill INDEX_NODE (use same as in CT_IOHEADER)
READ TABLE ct_ioheader WITH KEY aufnr = <ls_xstep>-bid
ASSIGNING <ls_ioheader> BINARY SEARCH.
IF sy-subrc = 0.
<ls_xstep>-index_node = <ls_ioheader>-index_node.
ENDIF.
ENDLOOP.
**
**
*
*
*
*
PPIOZ002: xyz
================
READ TABLE st_detail_list WITH KEY object = 'PPIOZ002'
INTO ls_detail_list.
CHECK sy-subrc = 0.
...
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_IM_COIS_XSTEPS
*&
IF_EX_WORKORDER_INFOSYSTEM~DETAIL_LIST_LAY
*& Object Header CLAS ZCL_IM_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD if_ex_workorder_infosystem~detail_list_lay.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
APPEND LINES OF st_detail_list TO ct_detail_list.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_COIS_XSTEPS
*&
HANDLE_TOOLBAR
ls_toolbar-text = text-b03.
ls_toolbar-disabled = space.
APPEND ls_toolbar TO lt_toolbar.
* append a separator to toolbar
CLEAR ls_toolbar.
ls_toolbar-butn_type = 3.
APPEND ls_toolbar TO lt_toolbar.
* display contorl recipe
CLEAR ls_toolbar.
ls_toolbar-butn_type = 0.
ls_toolbar-function = 'SHOW'.
ls_toolbar-icon = icon_display.
ls_toolbar-quickinfo = text-b06.
ls_toolbar-text = text-b05.
ls_toolbar-disabled = space.
APPEND ls_toolbar TO lt_toolbar.
* change control recipe
CLEAR ls_toolbar.
ls_toolbar-butn_type = 0.
ls_toolbar-function = 'EDIT'.
ls_toolbar-icon = icon_change.
ls_toolbar-quickinfo = text-b07.
ls_toolbar-text = text-b05.
ls_toolbar-disabled = space.
APPEND ls_toolbar TO lt_toolbar.
* add own toolbar buttons
READ TABLE e_object->mt_toolbar WITH KEY function = 'DISPLAY_TOGGLE'
TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
INSERT LINES OF lt_toolbar INTO e_object->mt_toolbar INDEX sy-tabix.
ELSE.
APPEND LINES OF lt_toolbar TO e_object->mt_toolbar.
ENDIF.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_COIS_XSTEPS
*&
HANDLE_USER_COMMAND
*& Object Header CLAS ZCL_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD handle_user_command.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
CASE e_ucomm.
*
WHEN 'REFRESH'.
refresh list: pass ok-code to calling screen
cl_gui_cfw=>set_new_ok_code( 'REFRESH' ).
WHEN 'PROTOCOL'.
display protocols
protocol_display( ).
WHEN 'SEND'.
send
send( ).
mo_grid->refresh_table_display( ).
WHEN 'DELETE'.
delete
delete( ).
mo_grid->refresh_table_display( ).
*
*
*
*
WHEN 'SHOW'
OR 'EDIT'.
DATA:
lt_row_alv
TYPE lvc_t_roid,
ls_row_alv
TYPE lvc_s_roid,
lv_display_mode TYPE char1.
FIELD-SYMBOLS:
<table>
TYPE zcois_t_xsteps,
<ls_data>
TYPE zcois_s_xsteps.
get data table from reference
ASSIGN md_data->* TO <table>.
get selected rows
CALL METHOD mo_grid->get_selected_rows
IMPORTING
et_row_no = lt_row_alv.
cl_gui_cfw=>flush( ).
IF lt_row_alv IS INITIAL.
no entries selected
MESSAGE i081(cb).
EXIT.
ENDIF.
DESCRIBE TABLE lt_row_alv LINES sy-dbcnt.
IF sy-dbcnt > 1.
MESSAGE i752(c0).
EXIT.
ELSE.
IF e_ucomm = 'SHOW'.
lv_display_mode = 'X'.
ELSE.
CLEAR lv_display_mode.
ENDIF.
loop over selected rows (only 1)
LOOP AT lt_row_alv INTO ls_row_alv.
read marked data table entry
READ TABLE <table> INDEX ls_row_alv-row_id
ASSIGNING <ls_data>.
CHECK sy-subrc = 0.
SUBMIT zpi_sheet_show
WITH p_crid = <ls_data>-crid
WITH p_mode = lv_display_mode
AND RETURN.
ENDLOOP.
ENDIF.
WHEN OTHERS.
super->handle_user_command( e_ucomm ).
ENDCASE.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_COIS_XSTEPS
*&
PROTOCOL_DISPLAY
*& Object Header CLAS ZCL_COIS_XSTEPS
*&--------------------------------------------------------------------*
...
METHOD protocol_display.
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
**********************************************************************
* macro to simplify creation of field catalog entry
**********************************************************************
DATA:
ls_fcat
TYPE bal_s_fcat,
ls_bal_profile TYPE bal_s_prof.
DEFINE macro_add_fields.
clear ls_fcat.
ls_fcat-ref_table = 'BAL_S_SHOW'.
if &2 = 0.
ls_fcat-no_out
= 'X'.
else.
ls_fcat-col_pos = &2.
endif.
ls_fcat-is_treecol = &3.
ls_fcat-ref_field = &4.
ls_fcat-outputlen = &5.
ls_fcat-cltxt_add = &6.
ls_fcat-colddictxt = &7.
append ls_fcat to ls_bal_profile-&1_fcat.
END-OF-DEFINITION.
DATA:
ls_baldisp
lv_log_extnum
lv_answer
lv_num_prot
lt_row_alv
ls_row_alv
TYPE
TYPE
TYPE
TYPE
TYPE
TYPE
FIELD-SYMBOLS:
<table> TYPE zcois_t_xsteps,
<ls_data> TYPE zcois_s_xsteps.
',
IMPORTING
et_row_no = lt_row_alv.
cl_gui_cfw=>flush( ).
* loop over selected rows
LOOP AT lt_row_alv INTO ls_row_alv.
IF sy-tabix > 1.
*
shw protocol for next xsteps
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'J'
textline1
= text-p01
textline2
= text-p02
titel
= text-p03
IMPORTING
answer
= lv_answer.
IF lv_answer <> 'J'.
EXIT.
ENDIF.
ENDIF.
*
*
*
AddColumnText DDIC-Text
' '
' '
' '
' '
' '
' '
' '
' '
' '
' '
' ',
' ',
' ',
' ',
'R',
'R',
'R',
'R',
' ',
' ',
lev2
lev2
mess
mess
mess
mess
mess
mess
mess
0
1
' '
' '
'PROBCLASS' 0
'T_PROBCLSS' 0
' '
'X'
' ',
'R',
0
0
2
0
0
0
'
'
'
'
'
'
'
'
'
'
'
'
'LOGNUMBER'
'MSGNUMBER'
'T_MSG'
'MSGTY'
'MSGID'
'MSGNO'
0
0
80
0
0
0
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
',
',
',
',
',
',
mess
mess
mess
mess
0
0
0
0
'
'
'
'
'
'
'
'
'DETLEVEL'
'T_PROBCLSS'
'ALSORT'
'MSG_COUNT'
0
0
0
0
'
'
'
'
'
'
'
'
'
'
'
'
',
',
',
'.
Aufruf Protokollanzeige
CALL FUNCTION 'APPL_LOG_DISPLAY'
EXPORTING
object
= 'COCR'
subobject
= ' '
external_number
= lv_log_extnum
object_attribute
= 2
subobject_attribute
= 2
external_number_attribute = 2
date_from
= '00000000'
time_from
= '000000'
date_to
= '00000000'
time_to
= '000000'
title_selection_screen
= text-t01
title_list_screen
= text-t01
column_selection
= ls_baldisp
suppress_selection_dialog = 'X'
i_s_display_profile
= ls_bal_profile
IMPORTING
number_of_protocols
= lv_num_prot
EXCEPTIONS
no_authority
= 01.
IF sy-subrc = 01.
MESSAGE e080(cb).
Keine Berechtigung zur Protokollanzeige
ELSEIF lv_num_prot = 0.
MESSAGE i806(cb).
ENDIF.
ENDLOOP.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH ZCL_COIS_XSTEPS
*&
SEND
IF lt_row_alv IS INITIAL.
no entries selected
MESSAGE i081(cb).
EXIT.
ENDIF.
check authority
IF 0 <> authority_check( iv_plant = <ls_data>-werk
iv_actvt = '01' ). "ACT_CREAT
MESSAGE i078(cb) WITH 'CREATE' <ls_data>-werk.
CONTINUE.
ENDIF.
lock object
CALL FUNCTION 'ENQUEUE_ECOCB_COCH'
EXPORTING
crid
= <ls_data>-crid
_scope
=
EXCEPTIONS
foreign_lock =
system_failure =
CASE sy-subrc.
WHEN 01.
MESSAGE i072(cb)
CONTINUE.
WHEN 02.
MESSAGE a015(cb)
ENDCASE.
*
*
*
*
*
'1'
01
02.
WITH <ls_data>-crid.
dequeue
CALL FUNCTION 'DEQUEUE_ECOCB_COCH'
EXPORTING
crid = ls_coch-crid
_scope = '1'.
CONTINUE.
ENDIF.
update displayed data
MOVE-CORRESPONDING ls_coch TO <ls_data>.
APPEND ls_coch TO lt_coch.
ENDLOOP.
IF NOT lt_coch IS INITIAL.
send xsteps online
CALL FUNCTION 'COCB_CONTROL_RECIPE_DISPATCH'
TABLES
icoch = lt_coch.
EXPORTING
defaultoption
textline1
textline2
titel
IMPORTING
answer
=
=
=
=
'N'
text-p10
text-p11
text-p12
= lv_answer.
* check answer
CHECK lv_answer = 'J'.
* get data table from reference
ASSIGN md_data->* TO <table>.
* get selected rows
CALL METHOD mo_grid->get_selected_rows
IMPORTING
et_row_no = lt_row_alv.
cl_gui_cfw=>flush( ).
IF lt_row_alv IS INITIAL.
no entries selected
MESSAGE i081(cb).
EXIT.
ENDIF.
check authority
IF 0 <> authority_check( iv_plant = <ls_data>-werk
iv_actvt = '06' ). "ACT_DELE
MESSAGE i078(cb) WITH 'DELETE' <ls_data>-werk.
CONTINUE.
ENDIF.
ENDIF.
*
lock
CALL FUNCTION 'ENQUEUE_ECOCB_COCH'
EXPORTING
crid
= <ls_data>-crid
EXCEPTIONS
foreign_lock = 01
system_failure = 02.
CASE sy-subrc.
WHEN 01.
MESSAGE i072(cb) WITH <ls_data>-crid.
CONTINUE.
WHEN 02.
MESSAGE a015(cb) WITH <ls_data>-crid.
ENDCASE.
*
*
IF lt_coch IS INITIAL.
nothing deleted
MESSAGE s075(cb).
EXIT.
ENDIF.
* delete protocols
LOOP AT lt_coch INTO ls_coch.
lv_log_extnum = ls_coch-crid.
CALL FUNCTION 'APPL_LOG_DELETE'
EXPORTING
object
= 'COCR'
subobject
= ' '
external_number = lv_log_extnum
date_to
= sy-datlo
time_to
= sy-timlo
log_class
= '1'
EXCEPTIONS
no_authority
= 01.
IF sy-subrc = 01.
*
no authority to delete protocols
MESSAGE e079(cb).
ENDIF.
ENDLOOP.
* read objects to a message
SELECT * FROM coft INTO TABLE lt_coft FOR ALL ENTRIES IN lt_coch
WHERE crid = lt_coch-crid.
SELECT * FROM cofv INTO TABLE lt_cofv FOR ALL ENTRIES IN lt_coch
WHERE crid = lt_coch-crid.
SELECT * FROM cocoa INTO TABLE lt_cocoa FOR ALL ENTRIES IN lt_coch
WHERE crid = lt_coch-crid.
* delete <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
DELETE coch FROM TABLE lt_coch.
REPORT zpi_sheet_show.
PARAMETERS:
p_crid TYPE co_crid,
p_mode TYPE flag DEFAULT 'X'.
CALL FUNCTION 'PI_SHEET_SHOW'
EXPORTING
cntrl_recipe_id = p_crid
display_mode
= p_mode.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
363327
12 vom 18.02.2003
Released for Customer
,18.02.2003
EN
Mastersprache
Short text
displayed
DE
COOIS/CO26/CO28: Change list of fields that can be
Responsible
Component
Dirk Giebel
PP-SFC-IS
Information System
________________________________________________________________________
Long text
Symptom
This note is an addition to other notes and combines work instructions
that are identical in these notes.
SAP does not accept any responsibility for the fact that additionally
displayed fields are filled or filled correctly in the standard (in
general, fields are marked as non-displayable if correct contents are
not ensured).
Other terms
Reason and Prerequisites
You can find the field string and Include name in the note that refers
to this note.
Solution
Report RCOTX000
With this report, the system determines for the respective field string
(table name) which fields can be displayed, with which width they are
displayed and with which texts.
- Execute report RCOTX000 using Transaction SE38 (F8)
Name of the field string: ... (see referring note)
Maintenance language:
Order type:
Logon language
10
Now this change already applies to all clients of the system in which it
was carried out.If you do not want to carry out this change separately
in each of your systems, you can also transport it.To do this, you must
Release
from
to
SAP Application
46C
46A
45A
40A
31I
46C
46B
45B
40B
31I
________________________________________________________________________
436134
434123
397998
395258
379073
________________________________________________________________________
865546
1 vom 27.07.2005
Released for Customer
,11.08.2005
EN
DE
COOIS: Preparation for additional lists
Responsible
Component
Dirk Giebel
PP-SFC-IS
Information System
________________________________________________________________________
Long text
Symptom
This note contains the necessary prerequisites to be able to display
additional customer-defined lists in the information system. For an
example, see Note 865926.
Other terms
COOIS, COHV, COOISPI, COHVPI
Reason and Prerequisites
Solution
1. Use Transaction SE24 to create the CL_COIS_ADD_LIST class.
Package: COIS
Name: Template for additional list in information system
Instantiation: Abstract
Add the IF_COIS_DISP_LIST interface.
Create the following text elements:
a) 001 (restricted) (Length 20)
b) 007 Full screen on/off (Length 30)
c) 008 Close (Length 30)
Create the following attributes:
d) MO_GRID Instance Attribute Protected Type Ref To CL_GUI_ALV_GRID
Release
from
to
SAP Application
600
500
- 600
- 500
Other components
PP-PI-POR
Process Order
________________________________________________________________________
References to related notes
Number
Short text
____________________________________________________________
865926
COOIS: Additional list with XSteps
________________________________________________________________________
References to Support Packages
Software component
Release
Package name
________________________________________________________________________
SAP Application
500
SAPKH50010
600
SAPKH60001
________________________________________________________________________
dd07v_tab = dd07v_tab
CHANGING
shlp
= shlp
callcontrol = callcontrol
EXCEPTIONS
no_f4_hlp = 1
OTHERS
= 2.
*>>>> START OF DELETION <<<<<
READ TABLE shlp-interface[] INTO ls_interface INDEX 1.
* delete domain values according to restrictions
CASE ls_interface-valfield.
WHEN 'PPIO_LISTTYP'.
IF gt_list_type IS INITIAL.
lt_values[] = dd07v_tab[].
lt_values = dd07v_tab.
ELSE.
*
take only entries from dd07v_tab, which are specified in
*gt_list_type
LOOP AT dd07v_tab.
READ TABLE gt_list_type
WITH KEY domvalue_l = dd07v_tab-domvalue_l
TRANSPORTING NO FIELDS.
CHECK sy-subrc = 0 .
lt_values = dd07v_tab.
APPEND lt_values.
ENDLOOP.
ENDIF.
SORT dd07v_tab BY ddtext.
WHEN OTHERS.
lt_values[] = dd07v_tab[].
ENDCASE.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* delete domain values according to restrictions
READ TABLE shlp-interface[] INTO ls_interface INDEX 1.
IF ls_interface-valfield = 'PPIO_LISTTYP'.
IF NOT gt_list_type IS INITIAL.
*
take only entries from dd07v_tab, which are specified in
*gt_list_type
dd07v_tab[] = gt_list_type.
ENDIF.
SORT dd07v_tab BY ddtext.
ENDIF.
*>>>> END OF INSERTION <<<<<<
...
CALL FUNCTION 'F4UT_DOMAHLP_EXECUTE'
EXPORTING
domname
= domname
TABLES
shlp_tab
= shlp_tab
record_tab = record_tab
*>>>> START OF DELETION <<<<<
dd07v_tab = lt_values
*& Object
REPS PPIO_ENTRY_1100_I01
*& Object Header PROG PPIO_ENTRY_1100_I01
*&--------------------------------------------------------------------*
*& MODULE CHECK_PROFID_LAYOUT INPUT
*&--------------------------------------------------------------------*
...
g_var_saved = con_x.
ELSE.
PERFORM get_layout CHANGING ppio_entry_sc1100.
* The list was not just changed and no layout found
*
=> user must enter layout or profile
*>>>> START OF DELETION <<<<<
IF ppio_entry_sc1100-profid = con_no_profile AND
ppio_entry_sc1100-alv_variant IS INITIAL AND
sy-ucomm <> con_fc_list_select.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
IF
ppio_entry_sc1100-profid
= con_no_profile
AND ppio_entry_sc1100-alv_variant
IS INITIAL
AND ppio_entry_sc1100-ppio_listtyp(5) <> 'PPIOZ'
AND sy-ucomm <> con_fc_list_select.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
REPS PPIO_ENTRY_F_START_OF_SEL
*& Object Header PROG PPIO_ENTRY_F_START_OF_SEL
*&--------------------------------------------------------------------*
*& FORM START_OF_SELECTION
*&--------------------------------------------------------------------*
...
tracebackground_2
'start_of_selection - before submit; Profile: ' <l_profid>. "#EC NOTEXT
* use
*
*>>>>
IF
*>>>>
*>>>>
*
IF
*& Object
FUNC COIS_OUTPUT_FROM_IOC
*& Object Header FUGR COISOUTPUT
*&--------------------------------------------------------------------*
*& FUNCTION COIS_OUTPUT_FROM_IOC
*&--------------------------------------------------------------------*
...
CALL FUNCTION 'COIS_SELECT_PL_ORDERS_READ'
EXPORTING
iv_read_components
= gs_tcoa-opcomp_sel
ir_planned_order_type = lr_paart
CHANGING
ct_ioheader
= lt_ioheader
ct_ioopcomp
= lt_ioopcomp.
*>>>>
*>>>>
*>>>>
*>>>>
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
HANDLE_CONTEXT_MENU
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
...
METHOD HANDLE_CONTEXT_MENU .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* add own functions to context menu
* ...
* add navigation profile functions to context menu
mo_navigation_profile->context_menu_setup( e_object ).
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
HANDLE_DOUBLE_CLICK
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
...
METHOD HANDLE_DOUBLE_CLICK .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* don't do anything on summation rows
CHECK e_row-rowtype IS INITIAL.
* ...
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
HANDLE_MENU_BUTTON
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
...
METHOD HANDLE_MENU_BUTTON .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* ...
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
HANDLE_TOOLBAR
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
...
METHOD HANDLE_TOOLBAR .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA:
ls_toolbar LIKE LINE OF e_object->mt_toolbar.
* add own toolbar buttons
* ...
* add navigation profile function codes to toolbar
mo_navigation_profile->toolbar_setup(
CHANGING
ct_toolbar = e_object->mt_toolbar ).
* only for object overview
IF
mv_calling_appl = cl_cois_c=>appl_overview
OR mv_calling_appl = cl_cois_c=>appl_retrieval_ov
OR mv_calling_appl = cl_cois_c=>appl_external_ov.
* append a separator to toolbar
CLEAR ls_toolbar.
ls_toolbar-butn_type = 3.
APPEND ls_toolbar TO e_object->mt_toolbar.
*
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
HANDLE_USER_COMMAND
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
...
METHOD HANDLE_USER_COMMAND .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
if_cois_disp_list~user_command( e_ucomm ).
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~FREE
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
...
METHOD IF_COIS_DISP_LIST~FREE .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
FIELD-SYMBOLS:
<lt_data>
<lt_data_save>
TYPE table,
TYPE table.
CLEAR mv_filter_set.
* restore original data in data table and free temporary table
IF NOT md_data_save IS INITIAL.
ASSIGN md_data->* TO <lt_data>.
ASSIGN md_data_save->* TO <lt_data_save>.
<lt_data> = <lt_data_save>.
FREE md_data_save.
ENDIF.
* free ALV grid
IF NOT mo_grid IS INITIAL.
mo_grid->free( ).
FREE mo_grid.
ENDIF.
endmethod.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~REFRESH
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
...
METHOD IF_COIS_DISP_LIST~REFRESH .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* free reduced data
IF NOT md_data_save IS INITIAL.
FREE md_data_save.
ENDIF.
* update ALV output
CHECK NOT mo_grid IS INITIAL.
mo_grid->set_gridtitle( mv_title ).
mo_grid->refresh_table_display( ).
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~RESET_FILTER_BY_NODE_MAX_EX
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
...
METHOD IF_COIS_DISP_LIST~RESET_FILTER_BY_NODE_MAX_EX .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
FIELD-SYMBOLS:
<lt_data>
<lt_data_save>
*
TYPE table,
TYPE table.
FIELD-SYMBOLS:
<lt_data>
<lt_data_save>
<ls_data>
<lv_node_index>
<ls_node_max_ex>
TYPE
TYPE
TYPE
TYPE
TYPE
table,
table,
ANY,
tabix_d,
cois_s_node_max_ex.
* set flag, that filter should be set, maybe it can not be set now,
* the it will be set, when MO_GRID is created again
mv_filter_set = 'X'.
CHECK NOT mo_grid IS INITIAL.
CLEAR mv_filter_set.
IF md_data_save IS INITIAL.
save original data
CREATE DATA md_data_save TYPE TABLE OF (mv_tabname).
ASSIGN md_data->* TO <lt_data>.
ASSIGN md_data_save->* TO <lt_data_save>.
<lt_data_save> = <lt_data>.
ELSE.
* restore original data
ASSIGN md_data->* TO <lt_data>.
ASSIGN md_data_save->* TO <lt_data_save>.
<lt_data> = <lt_data_save>.
ENDIF.
*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~SET_INITIAL_DATA
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
...
METHOD IF_COIS_DISP_LIST~SET_INITIAL_DATA .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* set instance attributes
GET REFERENCE OF ct_data
INTO md_data.
GET REFERENCE OF it_node_max_ex INTO md_node_max_ex.
mv_object
= iv_object.
mv_tabname
= iv_tabname.
mv_title
= iv_title.
mv_calling_appl = iv_calling_appl.
mv_category
= iv_category.
IF
mv_calling_appl = cl_cois_c=>appl_detail_list
OR mv_calling_appl = cl_cois_c=>appl_external.
* in single list display and for header in overview
* activate keyboard shortcuts
MV_SHORTCUTS = 'X'.
ENDIF.
*
IF cv_layout IS INITIAL.
get layout
*&--------------------------------------------------------------------*
...
METHOD IF_COIS_DISP_LIST~SET_TABLE_FOR_FIRST_DISPLAY .
*>>>> START OF DELETION <<<<<
ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA:
ls_print
l_save
lt_field_groups
ls_variant
ls_layout
lt_tooltip
TYPE
TYPE
TYPE
TYPE
TYPE
TYPE
lvc_s_prnt,
char1,
lvc_t_sgrp,
disvariant,
lvc_s_layo,
lvc_t_qinf.
FIELD-SYMBOLS:
<table> TYPE table,
<layout> TYPE slis_vari.
* get data table from reference
ASSIGN md_data->* TO <table>.
* create and initialize ALV display
CREATE OBJECT mo_grid
EXPORTING
i_parent = io_container
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
FOR
FOR
FOR
FOR
FOR
mo_grid,
mo_grid,
mo_grid,
mo_grid,
mo_grid.
ls_layout-grid_title = mv_title.
ELSE.
CONCATENATE mv_title text-001 INTO ls_layout-grid_title.
ENDIF.
* selection of all entries is possible
ls_layout-sel_mode = 'A'.
* set save mode
l_save = 'A'.
cl_cois_fieldcat=>field_selection_groups_create(
CHANGING
ct_field_groups = lt_field_groups
ct_fieldcat
= mt_fieldcat ).
* add navigation profile
mo_navigation_profile = cl_navp_factory=>factory(
io_alv
= mo_grid
is_profile_key
= ls_variant
iv_default
= if_navp=>default_auto
iv_save_mode
= l_save
it_table
= <table>
iv_trigger_toolbar_setup
= 'X'
iv_trigger_context_menu_setup = 'X' ).
*
IT_OKCODE
= IT_OKCODE
mo_grid->set_table_for_first_display(
EXPORTING
is_variant
= ls_variant
i_save
= l_save
i_default
= 'N'
is_layout
= ls_layout
is_print
= ls_print
it_special_groups
= lt_field_groups
it_except_qinfo
= lt_tooltip
CHANGING
it_outtab
=
it_fieldcatalog
=
it_sort
=
EXCEPTIONS
invalid_parameter_combination =
program_error
=
OTHERS
=
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty
WITH sy-msgv1 sy-msgv2
ENDIF.
<table>
mt_fieldcat
mt_sortcat
1
2
3 ).
NUMBER sy-msgno
sy-msgv3 sy-msgv4.
WHEN cl_cois_c=>fc_display_toggle.
full screen on/off
CALL FUNCTION 'COIS_OUTPUT_DISPLAY_FULLSCREEN'
EXPORTING
io_list = me.
cl_gui_cfw=>set_new_ok_code( iv_ucomm ).
WHEN cl_cois_c=>fc_display_close.
close screen
CALL FUNCTION 'COIS_OUTPUT_DISPLAY_CLOSE'
EXPORTING
io_grid = me.
cl_gui_cfw=>set_new_ok_code( iv_ucomm ).
ENDCASE.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
REPS LCOISOUTPUTF06
gv_category
gs_tcoa.
* refresh overview tree
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*$*$----------------------------------------------------------------$*$*
*$ Correction Inst.
0120031469 0000404122
$*
*$ Req. Corr. Instructions 0120061532 0000698657 Note 0000789978
$*
*$
0120061532 0000728687 Note 0000848330
$*
*$--------------------------------------------------------------------$*
*$ Valid for
:
$*
*$ Software Component SAP_APPL SAP Application
$*
*$ Release 500
To SAPKH50009
$*
*$*$----------------------------------------------------------------$*$*
*&--------------------------------------------------------------------*
*& Object
FUNC COIS_F4_PPIO_LISTTYP
*& Object Header FUGR COIS
*&--------------------------------------------------------------------*
*& FUNCTION COIS_F4_PPIO_LISTTYP
*&--------------------------------------------------------------------*
...
FUNCTION cois_f4_ppio_listtyp.
*"---------------------------------------------------------------------*"*"Lokale Schnittstelle:
*" IMPORTING
*"
REFERENCE(DOMNAME) LIKE DD01V-DOMNAME DEFAULT SPACE
*" TABLES
*"
SHLP_TAB TYPE SHLP_DESCR_TAB_T
*"
RECORD_TAB STRUCTURE SEAHLPRES OPTIONAL
*"
DD07V_TAB STRUCTURE DD07V OPTIONAL
*" CHANGING
*"
REFERENCE(SHLP) TYPE SHLP_DESCR_T
*"
REFERENCE(CALLCONTROL) LIKE DDSHF4CTRL
*"
STRUCTURE DDSHF4CTRL
*" EXCEPTIONS
*"
NO_F4_HLP
*"---------------------------------------------------------------------DATA:
*>>>> START OF DELETION <<<<<
ls_interface LIKE LINE OF shlp-interface,
lt_values
LIKE dd07v_tab OCCURS 0 WITH HEADER LINE.
CHECK callcontrol-step = 'SELECT'.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
ls_interface LIKE LINE OF shlp-interface.
CHECK callcontrol-step = 'SELECT'.
*>>>> END OF INSERTION <<<<<<
...
CALL FUNCTION 'F4UT_DOMAHLP_EXECUTE'
EXPORTING
domname
TABLES
shlp_tab
record_tab
dd07v_tab
CHANGING
shlp
callcontrol
EXCEPTIONS
no_f4_hlp
= domname
= shlp_tab
= record_tab
= dd07v_tab
= shlp
= callcontrol
= 1
OTHERS
= 2.
*>>>> START OF DELETION <<<<<
READ TABLE shlp-interface[] INTO ls_interface INDEX 1.
* delete domain values according to restrictions
CASE ls_interface-valfield.
WHEN 'PPIO_LISTTYP'.
IF gt_list_type IS INITIAL.
lt_values[] = dd07v_tab[].
lt_values = dd07v_tab.
ELSE.
*
take only entries from dd07v_tab, which are specified in
*gt_list_type
LOOP AT dd07v_tab.
READ TABLE gt_list_type
WITH KEY domvalue_l = dd07v_tab-domvalue_l
TRANSPORTING NO FIELDS.
CHECK sy-subrc = 0 .
lt_values = dd07v_tab.
APPEND lt_values.
ENDLOOP.
ENDIF.
SORT dd07v_tab BY ddtext.
WHEN OTHERS.
lt_values[] = dd07v_tab[].
ENDCASE.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* delete domain values according to restrictions
READ TABLE shlp-interface[] INTO ls_interface INDEX 1.
IF ls_interface-valfield = 'PPIO_LISTTYP'.
IF NOT gt_list_type IS INITIAL.
*
take only entries from dd07v_tab, which are specified in
*gt_list_type
dd07v_tab[] = gt_list_type.
ENDIF.
SORT dd07v_tab BY ddtext.
ENDIF.
*>>>> END OF INSERTION <<<<<<
...
CALL FUNCTION 'F4UT_DOMAHLP_EXECUTE'
EXPORTING
domname
= domname
TABLES
*>>>>
*>>>>
*>>>>
shlp_tab
= shlp_tab
record_tab = record_tab
START OF DELETION <<<<<
dd07v_tab = lt_values
END OF DELETION <<<<<<<
START OF INSERTION <<<<
dd07v_tab = dd07v_tab
END OF INSERTION <<<<<<
*>>>>
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
REPS PPIO_ENTRY_1100_I01
*& Object Header PROG PPIO_ENTRY_1100_I01
*&--------------------------------------------------------------------*
*& MODULE CHECK_PROFID_LAYOUT INPUT
*&--------------------------------------------------------------------*
...
g_var_saved = con_x.
ELSE.
PERFORM get_layout CHANGING ppio_entry_sc1100.
* The list was not just changed and no layout found
*
=> user must enter layout or profile
*>>>> START OF DELETION <<<<<
IF ppio_entry_sc1100-profid = con_no_profile AND
ppio_entry_sc1100-alv_variant IS INITIAL AND
sy-ucomm <> con_fc_list_select.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
IF
ppio_entry_sc1100-profid
= con_no_profile
AND ppio_entry_sc1100-alv_variant
IS INITIAL
AND ppio_entry_sc1100-ppio_listtyp(5) <> 'PPIOZ'
AND sy-ucomm <> con_fc_list_select.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
REPS PPIO_ENTRY_F_START_OF_SEL
*& Object Header PROG PPIO_ENTRY_F_START_OF_SEL
*&--------------------------------------------------------------------*
*& FORM START_OF_SELECTION
*&--------------------------------------------------------------------*
...
ENDIF.
tracebackground_2
'start_of_selection - before submit; Profile: ' <l_profid>. "#EC NOTEXT
IF
p_sc1100-ppio_listtyp = report_docl
*>>>> START OF DELETION <<<<<
OR (
p_tcoaov-flg_alvtr = cowrk_c_x
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
OR p_sc1100-ppio_listtyp(5) = 'PPIOZ'
OR (
p_tcoaov-flg_alvtr = cowrk_c_x
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
REPS PPIO_ENTRY_GET_TAB_REPORT
*& Object Header PROG PPIO_ENTRY_GET_TAB_REPORT
*&--------------------------------------------------------------------*
*& FORM GET_TABLE_FOR_REPORT
*&--------------------------------------------------------------------*
...
when report_pord.
"'PPIOT000'
c_tablename = con_iooppord.
"'IOOPPORD'
WHEN report_docl.
"'PPIOV000'
c_tablename = con_iodocl.
"'IODOCL'
WHEN OTHERS.
*>>>> START OF DELETION <<<<<
MESSAGE w000(c+).
DATA:
ls_field_group LIKE LINE OF ct_field_groups,
ls_fieldcat
LIKE LINE OF ct_fieldcat.
*@@@
* STATICS:
*
lt_dd07v LIKE dd07v OCCURS 0 WITH HEADER LINE.
DATA:
lt_dd07v TYPE TABLE OF dd07v,
ls_dd07v TYPE dd07v.
* Gruppen-Tabelle fllen
* Gruppen lesen
CALL FUNCTION 'DDIF_DOMA_GET'
EXPORTING
name
= 'FD_GROUP' " Definition of Groups
*
STATE
= 'A'
langu
= sy-langu
TABLES
dd07v_tab = lt_dd07v
EXCEPTIONS
OTHERS
= 0.
* Gruppen-Tabelle mit DDIC-Werten fllen
LOOP AT lt_dd07v INTO ls_dd07v..
ls_field_group-sp_group = ls_dd07v-domvalue_l.
ls_field_group-text = ls_dd07v-ddtext.
APPEND ls_field_group TO ct_field_groups.
ENDLOOP.
* doppelte Eintrge entfernen (externe Gruppe hat Vorang)
SORT ct_field_groups BY sp_group.
*
*
*
*
*
*
*
IF ls_fieldcat-sp_group IS INITIAL.
only change initial groups
IF ls_fieldcat-domname = 'XFELD'.
ls_fieldcat-sp_group = 'FLAG'.
ELSEIF ls_fieldcat-datatype = 'CHAR'.
IF ls_fieldcat-lowercase = con_yes.
ls_fieldcat-sp_group = 'TEXT'.
ELSE.
ls_fieldcat-sp_group = 'ASGN'.
ENDIF.
ELSE.
ls_fieldcat-sp_group = ls_fieldcat-datatype.
ENDIF.
ENDIF.
check, if group is allowed
READ TABLE ct_field_groups
WITH KEY sp_group = ls_fieldcat-sp_group
TRANSPORTING NO FIELDS.
IF NOT sy-subrc IS INITIAL.
group is not known -> set to group 'Others'
ls_fieldcat-sp_group = 'OTHR'.
ENDIF.
MODIFY ct_fieldcat FROM ls_fieldcat.
ENDLOOP.
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
HANDLE_DOUBLE_CLICK
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD HANDLE_DOUBLE_CLICK .
* don't do anything on summation rows
CHECK e_row-rowtype IS INITIAL.
* ...
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
HANDLE_MENU_BUTTON
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD HANDLE_MENU_BUTTON .
* ...
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
HANDLE_TOOLBAR
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD HANDLE_TOOLBAR .
DATA:
ls_toolbar LIKE LINE OF e_object->mt_toolbar.
IF mv_toolbar_alv = space.
no display of standard ALV buttons
DELETE e_object->mt_toolbar WHERE function(1) = '&'.
* append EXPAND button for ALV functions
CLEAR ls_toolbar.
ls_toolbar-butn_type = 0.
ls_toolbar-function = 'TOOLBAR_EXPAND'.
ls_toolbar-icon = icon_column_right.
ls_toolbar-quickinfo = text-010.
ls_toolbar-disabled = space.
APPEND ls_toolbar TO e_object->mt_toolbar.
ELSE.
* insert COLLAPSE button for ALV functions
CLEAR ls_toolbar.
*
ls_toolbar-butn_type = 0.
ls_toolbar-function = 'TOOLBAR_COLLAPSE'.
ls_toolbar-icon = icon_column_left.
ls_toolbar-quickinfo = text-011.
ls_toolbar-disabled = space.
INSERT ls_toolbar INTO e_object->mt_toolbar INDEX 1.
* insert a separator to toolbar
CLEAR ls_toolbar.
ls_toolbar-butn_type = 3.
INSERT ls_toolbar INTO e_object->mt_toolbar INDEX 2.
ENDIF.
* append a separator to toolbar
CLEAR ls_toolbar.
ls_toolbar-butn_type = 3.
APPEND ls_toolbar TO e_object->mt_toolbar.
* add own toolbar buttons
* ...
* only for object overview
IF
mv_calling_appl = if_cois_con=>appl_overview
OR mv_calling_appl = if_cois_con=>appl_retrieval_ov
OR mv_calling_appl = if_cois_con=>appl_external_ov.
append a separator to toolbar
CLEAR ls_toolbar.
ls_toolbar-butn_type = 3.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
HANDLE_USER_COMMAND
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD HANDLE_USER_COMMAND .
CASE e_ucomm.
*
WHEN 'DISPLAY_TOGGLE'.
full screen on/off
CALL FUNCTION 'COIS_OUTPUT_DISPLAY_FULLSCREEN'
EXPORTING
io_list = me.
cl_gui_cfw=>set_new_ok_code( new_code = e_ucomm ).
WHEN 'DISPLAY_CLOSE'.
close screen
CALL FUNCTION 'COIS_OUTPUT_DISPLAY_CLOSE'
EXPORTING
io_grid = me.
cl_gui_cfw=>set_new_ok_code( new_code = e_ucomm ).
WHEN 'TOOLBAR_COLLAPSE' .
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~FREE_ALV_GRID
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD IF_COIS_DISP_LIST~FREE_ALV_GRID .
IF NOT mo_grid IS INITIAL.
mo_grid->free( ).
FREE mo_grid.
ENDIF.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~FREE_DATA
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
TYPE table,
TYPE table.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~REFRESH
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD IF_COIS_DISP_LIST~REFRESH .
* free reduced data
IF NOT md_data_save IS INITIAL.
FREE md_data_save.
ENDIF.
* update ALV output
CHECK NOT mo_grid IS INITIAL.
mo_grid->set_gridtitle( mv_title ).
mo_grid->refresh_table_display( ).
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~RESET_FILTER_BY_NODE_MAX_EX
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD IF_COIS_DISP_LIST~RESET_FILTER_BY_NODE_MAX_EX .
FIELD-SYMBOLS:
<lt_data>
<lt_data_save>
*
TYPE table,
TYPE table.
FREE md_data_save.
ENDIF.
* update ALV output
CHECK NOT mo_grid IS INITIAL.
mo_grid->set_gridtitle( mv_title ).
mo_grid->refresh_table_display( ).
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~SET_FILTER_BY_NODE_MAX_EX
TYPE sytabix,
TYPE sytabix,
TYPE lvc_title.
TYPE
TYPE
TYPE
TYPE
TYPE
table,
table,
ANY,
tabix_d,
cois_s_node_max_ex.
* set flag, that filter should be set, maybe it can not be set now,
* the it will be set, when MO_GRID is created again
mv_filter_set = 'X'.
CHECK NOT mo_grid IS INITIAL.
CLEAR mv_filter_set.
IF md_data_save IS INITIAL.
save original data
CREATE DATA md_data_save TYPE TABLE OF (mv_tabname).
ASSIGN md_data->* TO <lt_data>.
ASSIGN md_data_save->* TO <lt_data_save>.
<lt_data_save> = <lt_data>.
ELSE.
* restore original data
ASSIGN md_data->* TO <lt_data>.
ASSIGN md_data_save->* TO <lt_data_save>.
<lt_data> = <lt_data_save>.
ENDIF.
*
CHECK sy-subrc = 0.
CHECK <ls_node_max_ex>-filt <> 'X'.
DELETE <lt_data>.
ENDLOOP.
DESCRIBE TABLE <lt_data> LINES lv_counter_total.
DESCRIBE TABLE <lt_data_save> LINES lv_counter_save.
IF lv_counter_total = lv_counter_save.
lv_title = mv_title.
mo_grid->set_gridtitle( lv_title ).
FREE md_data_save.
ELSE.
mv_calling_appl = if_cois_con=>appl_detail_list
OR mv_calling_appl = if_cois_con=>appl_external.
* in single list display and for header in overview
* activate keyboard shortcuts
MV_SHORTCUTS = 'X'.
ENDIF.
IF NOT iv_layout IS INITIAL.
mv_layout = iv_layout.
ELSE.
* get layout
CALL FUNCTION 'COIS_DISP_DEFAULT_LAYOUT_GET'
EXPORTING
iv_list_type = iv_object
iv_autyp
= iv_category
IMPORTING
ev_layout
= mv_layout.
ENDIF.
* get fieldcatalog
* CALL METHOD cl_cois_fieldcat=>get
*
EXPORTING
*
iv_tabname
= mv_tabname
*
iv_category
= iv_category
*
IMPORTING
*
et_fieldcat_alv = mt_fieldcat.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
METH CL_COIS_ADD_LIST
*&
IF_COIS_DISP_LIST~SET_TABLE_FOR_FIRST_DISPLAY
*& Object Header CLAS CL_COIS_ADD_LIST
*&--------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD IF_COIS_DISP_LIST~SET_TABLE_FOR_FIRST_DISPLAY .
DATA:
ls_print
l_save
lt_field_groups
ls_variant
ls_layout
lt_tooltip
TYPE
TYPE
TYPE
TYPE
TYPE
TYPE
lvc_s_prnt,
char1,
lvc_t_sgrp,
disvariant,
lvc_s_layo,
lvc_t_qinf.
FIELD-SYMBOLS:
<table> TYPE table,
<layout> TYPE slis_vari.
* get data table from reference
ASSIGN md_data->* TO <table>.
* create and initialize ALV display
CREATE OBJECT mo_grid
EXPORTING
i_parent = io_container
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* set event handler
SET HANDLER:
handle_user_command
handle_toolbar
handle_menu_button
handle_double_click
handle_context_menu
FOR
FOR
FOR
FOR
FOR
mo_grid,
mo_grid,
mo_grid,
mo_grid,
mo_grid.
IF md_data_save IS INITIAL.
ls_layout-grid_title = mv_title.
ELSE.
CONCATENATE mv_title text-001 INTO ls_layout-grid_title.
ENDIF.
* selection of all entries is possible
ls_layout-sel_mode = 'A'.
* set save mode
l_save = 'A'.
* field_selection_groups_create(
*
CHANGING
*
ct_field_groups = lt_field_groups
*
ct_fieldcat
= mt_fieldcat ).
mo_grid->set_table_for_first_display(
EXPORTING
I_STRUCTURE_NAME
= mv_tabname
is_variant
= ls_variant
i_save
= l_save
i_default
= 'N'
is_layout
= ls_layout
is_print
= ls_print
*
it_special_groups
= lt_field_groups
CHANGING
it_outtab
= <table>
it_fieldcatalog
= mt_fieldcat
it_sort
= mt_sortcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error
= 2
OTHERS
= 3 ).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* if filter could not be set before MO_GRID was created, it has to be
* set now
IF NOT mv_filter_set IS INITIAL.
if_cois_disp_list~set_filter_by_node_max_ex( ).
ENDIF.
ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*
*&--------------------------------------------------------------------*
*& Object
REPS LCOISOUTPUTF06
*& Object Header FUGR COISOUTPUT
*&--------------------------------------------------------------------*
*& FORM REFRESH_ALL
*&--------------------------------------------------------------------*
...