S4HANA Utilities For CM Extensibility 2022
S4HANA Utilities For CM Extensibility 2022
© 2022 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be
reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an
SAP affiliate company. SAP and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in
Germany and other countries. All other product and service names mentioned are the trademarks of their
respective companies. Please see https://www.sap.com/trademark for additional trademark information and
notices.
TABLE OF CONTENTS
INTRODUCTION .............................................................................................................................................. 4
EXTEND CONTRACT ACCOUNT .................................................................................................................. 5
EXTEND OBJECT: POINT OF DELIVERY..................................................................................................... 7
DDIC: ............................................................................................................................................................7
PROCESS FRAMEWORK ............................................................................................................................ 11
Forced Move-Out - SAP Workflow ............................................................................................................ 11
Damage Control Process Framework (SAP Workflow) .......................................................................... 18
Supply Start Date ....................................................................................................................................... 21
New Step – Supply End Date .................................................................................................................... 35
KUT (add new field) ................................................................................................................................. 35
Business Layer......................................................................................................................................... 36
User Interface ........................................................................................................................................... 38
Customizing (Form) ................................................................................................................................. 46
BAdI Implementation ............................................................................................................................... 47
Demo ......................................................................................................................................................... 49
Source Code ............................................................................................................................................. 50
NEW BUSINESS LAYER OBJECT .............................................................................................................. 50
DDIC ............................................................................................................................................................ 51
Create CDS-View(s) using ADT .............................................................................................................. 51
Create DDIC Structures ........................................................................................................................... 53
Classes ........................................................................................................................................................ 54
Create Classes ......................................................................................................................................... 54
Customizing (GenIL/BOL) ......................................................................................................................... 56
Customizing (BL) ....................................................................................................................................... 60
Customizing (data environment / BOL-Tree's)........................................................................................ 64
Test .............................................................................................................................................................. 67
UI WITH FORM CUSTOMIZING ................................................................................................................... 69
Add New Form with Mask and Navigate/Show it .................................................................................... 69
Add Sections to Overview Page ............................................................................................................... 74
Add Actions/Toolbar Buttons to a Form.................................................................................................. 76
Handle Actions in Form ............................................................................................................................. 78
ATTACHMENTS ............................................................................................................................................ 83
Result handler class (sample) ................................................................................................................ 83
BAdI Implementation (sample) ............................................................................................................... 84
Component Controller (Context) ............................................................................................................ 89
Window (Controller) ................................................................................................................................. 89
Window (Context)..................................................................................................................................... 91
View (Controller) ...................................................................................................................................... 91
View (Context) .......................................................................................................................................... 93
View (Layout/HTML) ................................................................................................................................. 94
INTRODUCTION
SAP S/4HANA Utilities for customer engagement is a simplified version of SAP CRM embedded into SAP
S/4HANA. While its first versions were technically delivered as an add-on (as software component
S4CRM). It has been fully embedded into S/4HANA with the 1909 release.
With Release 1909 the Customizing node of Customer Management was moved under SAP
Utilities and renamed to Customer Engagement. If you are missing Customizing entries under SAP
Utilities please see Customizing node Service.
Within SAP S/4HANA Utilities for customer engagement, the S/4HANA Interaction Center serves as central
entry point for customer service specialists of a utility company, allowing them to access numerous industry
processes and functions. Technically the Interaction Center leverages SAP’s proven CRM Web UI
Framework technology, and new UI themes offer a harmonized Fiori user experience following SAP Fiori
user interface strategy.
This guide is intended for developers who make customer-specific enhancements in the coding.
It describes in more detail how to implement special extensions.
UtilsContrAcctPartner
1. Extend DDIC via the Key User Tool (KUT) for Business Context FICA_CONTRACT_ACCOUNT_PART_REL
(Contract Accounting: Contract Account Partner Relationship)
2. Extend CDS-Views
2.1. Extend I-View (CRMS4_IU_I_CAP)
@AbapCatalog.sqlViewAppendName: 'ZCRMS4IUEICAP'
@EndUserText.label: 'Extension Contract Account Partner'
extend view CRMS4_IU_I_CAP with ZCRMS4_IU_E_I_CAP {
_UtilitiesFields.zz1_test_text_vkp
}
4. Add field to UI
DDIC:
1. Create the customer includes CI_EUIHEAD from the table EUIHEAD
6. Business Layer
6.1. Add attribute to the BL Layer via IMG > SAP Utilities > Customer Engagement > General
Functions > Override the Definition of the Utilities Business Layer Objects
6.2. BL Object: PointOfDelivery
7. User Interface
7.1. Add attribute to UI View configuration
9. Class (BL)
9.1. Implicitly enhance method INIT_MDG_SPEC in the corresponding BL-Class
9.2. Add the attribute to internal table GT_MDG_FIELDNAME_MAPPING
PROCESS FRAMEWORK
In this example a workflow is created when a new contract process with forced move-out is performed.
Enhancement spot CRMS4_IU_CM_PROCESS_FRAMEWORK with BAdI definition CRMS4_IU_CM_PF_PROCESS is
used.
1. Define SAP-Workflow
1.1. define step(s)
4. Demo
For a better understanding of process execution, the following demo compares an approved and a
rejected move-out.
4.1. Create Utilities Sales Contract
Demo – Approve
Demo – Reject
4.2. Check message log for added information that workflow was created
Demo – Approve
Demo – Reject
Demo – Approve
4.5. Check result in the Utilities Sales Contract Overview (based on decision)
Demo – Approved
Process for Sales Contract was continued, and the Sales Contract was created
Demo – Rejected
Process for Sales Contract was aborted, and the Sales Contract was not created
4. Demo
4.2. Check message log for added information that workflow was created
1.5. Go to newly create field > User Interface > CDS Views
1.5.1.enable CDS-View extension via 'Enabled' checkbox
1.7. Save
1.8. Publish
3. Add field to UI
3.1. Start transaction WUI
3.2. Select Business Role
3.3. Go to UI where you want to add the field
3.3.1.e.g. execute process 'New Contract' on 'Utilities Sales Contracts'
3.4. Add field via configuration adjustment
3.4.1.Show Configurable Areas
3.4.2.Choose area to configure
4.2.1.Add field
4.3. Create Profile (you can copy the profile used in standard delivery and adjust accordingly)
4.3.1.Define Columns
public section.
interfaces IF_BADI_INTERFACE .
interfaces IF_CRMS4_IU_CM_UI_PROCESS_BADI .
protected section.
private section.
ENDCLASS.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZCL_CRMS4_IU_UIP_NEW_CONTRACT-
>IF_CRMS4_IU_CM_UI_PROCESS_BADI~BEGIN_PROCESS
* +----------------------------------------------------------------------------
---------------------+
* | [--->] IR_PROCESS TYPE REF TO
IF_CRMS4_IU_CM_UI_PROCESS_ACS
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IF_CRMS4_IU_CM_UI_PROCESS_BADI~BEGIN_PROCESS.
endmethod.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZCL_CRMS4_IU_UIP_NEW_CONTRACT-
>IF_CRMS4_IU_CM_UI_PROCESS_BADI~VALIDATE
* +----------------------------------------------------------------------------
---------------------+
* | [--->] IR_PROCESS TYPE REF TO
IF_CRMS4_IU_CM_UI_PROCESS_ACS
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IF_CRMS4_IU_CM_UI_PROCESS_BADI~VALIDATE.
data(LR_CTI) = IR_PROCESS->GET_BOL_ENTITY(
CL_CRMS4_IU_CM_UI_PROCESS_CTXT=>C_CONTEXT_NODES-CONTRACTITEM ).
if LR_CTI is bound.
data(LV_SUPPLY_START) = cast DATS( LR_CTI->GET_PROPERTY(
'ZZ1_SUPPLY_START_UCI' ) )->*.
if LV_SUPPLY_START is initial.
data(LV_IL_CONTSTART) = cast CRMS4_IU_CTI_IL_CONTSTART( LR_CTI-
>GET_PROPERTY( 'IL_CONTSTART' ) )->*.
LV_SUPPLY_START = conv DATS( LV_IL_CONTSTART + 1 ).
public section.
interfaces IF_BADI_INTERFACE .
interfaces IF_CRMS4_IU_CM_PI_PROCESS_BADI .
protected section.
private section.
ENDCLASS.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZCL_CRMS4_IU_PI_NEW_CONTRACT-
>IF_CRMS4_IU_CM_PI_PROCESS_BADI~CREATE_MOVEIN
* +----------------------------------------------------------------------------
---------------------+
* | [--->] IS_PARAMETERS TYPE
CL_CRMS4_IU_CM_PI_PROCESS=>TS_CREATE_MOVE_IN_PARAMS
* | [<-->] CS_RESULT TYPE
CL_CRMS4_IU_CM_PI_PROCESS=>TS_CREATE_MOVE_IN_RESULT
* | [<-->] CS_INTERFACE_PARAMS TYPE
CL_CRMS4_IU_CM_PI_PROCESS=>TS_CREATE_MOVE_IN_INTF
* | [<-->] CV_EV_HANDLED TYPE ABAP_BOOLEAN
* | [<-->] CV_EV_FAILED TYPE ABAP_BOOLEAN
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IF_CRMS4_IU_CM_PI_PROCESS_BADI~CREATE_MOVEIN.
data:
LS_CONTRACT_ITEM type CRMS4S_IU_CTI_BL.
try.
data(LR_HANDLER) = CL_CRMS4_IU_BL_FACTORY=>GET( IV_BLOBJECTNAME =
CL_CRMS4_IU_IL_META=>C_OBJECTS-CTM-CONTRACTITEM ).
LR_HANDLER->READ_ATTR( exporting IS_KEY = IS_PARAMETERS-
CONTRACTITEM_KEY
importing ES_DATA = LS_CONTRACT_ITEM ).
8. Demo
Business Layer
1. Add attribute to the BL Layer via IMG > SAP Utilities > Customer Engagement > General Functions
> Override the Definition of the Utilities Business Layer Objects
2. BL Object: UtilitiesContractItem
User Interface
1. Create new component via transaction BSP_WD_CMPWB
2. Component Controller
2.1. Component Controller context
2.1.1. change superclass of component controller context > CL_CRMS4_IU_CM_UI_PROCESS_CTXT
3. Create Window
3.1. change superclass of superclass of window implementation class >
CL_CRMS4_IU_CM_UI_PROCESS_WCO
3.2. add inbound plug 'DEFAULT'
3.2.1.insert following source code
method IP_DEFAULT.
SUPER > IP_DEFAULT( IV_COLLECTION = IV_COLLECTION ).
try.
FORWARD_INBOUND_CALL(
exporting
4. Create View
4.1. basis view controller implementation to CL_CRMS4_IU_CM_UI_PROCESS_VCO
4.1.1. change superclass to CL_CRMS4_IU_CM_UI_PROCESS_VCO
4.3.2.1. use type for context nodes available through component controller
method CREATE_CONTEXT_NODES.
SUPER > CREATE_CONTEXT_NODES( exporting CONTROLLER = CONTROLLER ).
try.
data(LT_MODEL_ITEMS) = CL_CRM_IU_IL_S4OP_BSP_UTILS=>GET_CONTEXT_MODEL_ITE
MS( IV_INSTANCE = ME ).
loop at LT_MODEL_ITEMS assigning field-symbol(<MODEL_ITEM>) where IS_INHE
RITED is initial.
data(LV_PATH) = |{ <MODEL_ITEM>-NAME case = upper }|.
assign (LV_PATH) to field-symbol(<PROPERTY>).
<PROPERTY> ?= CREATE_MODEL(
IV_MODEL_ID = <MODEL_ITEM>-NAME
IV_CLASS_NAME = <MODEL_ITEM>-CLASSNAME
).
endloop.
catch CX_CRM_IU_IL_S4OP_BASE ##NO_HANDLER.
endtry.
endmethod.
Customizing (Form)
1. IMG > SAP Utilities > Customer Engagement > Sales Contract Management > Modify Process
Definition (Client-Specific)
2. Add UI Process View
2.1. fill all fields accordingly to the newly created view
3. Add UI Process (this entry will be merged at runtime with the existing UI process)
3.1. use the existing UI process name when creating new entry to extend the standard delivered
process
3.2. leave entries empty if you don’t want to change them
BAdI Implementation
1. Create BAdI Implementation for CRMS4_IU_PI_PROCESS
2. Implement method CREATE_MOVEOUT
public section.
interfaces IF_BADI_INTERFACE .
interfaces IF_CRMS4_IU_CM_PI_PROCESS_BADI .
protected section.
private section.
ENDCLASS.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZCL_CRMS4_IU_PROCESS_INTEG-
>IF_CRMS4_IU_CM_PI_PROCESS_BADI~CREATE_MOVEOUT
* +----------------------------------------------------------------------------
---------------------+
* | [--->] IS_PARAMETERS TYPE
CL_CRMS4_IU_CM_PI_PROCESS=>TS_CREATE_MOVE_OUT_PARAMS
* | [<-->] CS_RESULT TYPE
CL_CRMS4_IU_CM_PI_PROCESS=>TS_CREATE_MOVE_OUT_RESULT
* | [<-->] CS_INTERFACE_PARAMS TYPE
CL_CRMS4_IU_CM_PI_PROCESS=>TS_CREATE_MOVE_OUT_INTF
* | [<-->] CV_EV_HANDLED TYPE ABAP_BOOLEAN
* | [<-->] CV_EV_FAILED TYPE ABAP_BOOLEAN
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IF_CRMS4_IU_CM_PI_PROCESS_BADI~CREATE_MOVEOUT.
data:
LS_CONTRACT_ITEM type CRMS4S_IU_CTI_BL.
try.
data(LR_HANDLER) = CL_CRMS4_IU_BL_FACTORY=>GET( IV_BLOBJECTNAME =
CL_CRMS4_IU_IL_META=>C_OBJECTS-CTM-CONTRACTITEM ).
LR_HANDLER->READ_ATTR( exporting IS_KEY = IS_PARAMETERS-CONTRACTITEM_KEY
importing ES_DATA = LS_CONTRACT_ITEM ).
Demo
1. End contract via Sales Contract Overview
1.1. Start process 'End Contract'
1.3. Save
Source Code
- See Component Controller (Context)
- See Window (Controller)
- See Window (Context)
- See View (Controller)
- See View (Context)
- See View (Layout/HTML)
DDIC
Create all required DDIC elements. It is recommended to use CDS-Views to retrieve data. Later, the CDS-
View is assigned to the BL Object via customizing.
If required implement an access control for the CDS-View.
2. C-View (ZCRMS4_IU_C_UBD)
2.1. select from the I-View
3. DCL (ZCRMS4_IU_C_UBD)
3.1. access control on the C-View (if required)
2. DATA (ZCRMS4S_IU_UBD_BL_DATA)
2.1. defines data/attributes of the entity
3. ATTR (ZCRMS4S_IU_UBD_ATTR)
3.1. used in the BOL Root Entity
4. BL (ZCRMS4S_IU_UBD_BL)
4.1. used in the BL Object
4.2. should consist of key and the data structure
5. QUERY (ZCRMS4S_IU_UBD_QRY)
5.1. used in the BOL Query
Classes
Create Classes
1. Interaction Layer (IL)
1.1. ZCL_CRMS4_IU_IL_UBD > Superclass: CL_CRMS4_IU_IL_ABSTR_ROOT
Customizing (GenIL/BOL)
You can either create the new entity in an existing delivered component or create a new component in
customer namespace and add this component to the component set IUICALL.
1. Create Component (optional)
1.1. IMG > Service > UI Framework > Generic Interaction Layer/Object Layer > Basic Settings
1.2. SM30: CRMV_GIL_COMP
1.3. Impl. Class: CL_CRMS4_IU_IL_COMP_GENERAL
Customizing (BL)
IMG > SAP Utilities > Customer Engagement > Default Functions > Override the Definition of the Utilities
Business Layer Objects
1. Define Business Layer Object
1.1. same name as BOL object
5. Define Queries
5.1. same name as BOL Object Queries
6. Define Relations
6.1. same name as BOL Object relations
6.2. define external relations from delivered to new object (i.e. BuilHeader)
2. Define Profile
Test
8. Fill in the Action Parameters (Form Name and the Context that is used for Form Data)
Demo:
For presentation reasons a display form is already added to the overview page.
Demo:
Demo:
2. Attach an Action Profile to this formular or take an Action Profile already existing at this formular.
3. Path: SAP Customizing Implementation Guide > SAP Utilities > Customer Engagement > General
Functions > Define Action Profiles
4. Go to: "Define Action Profile"
5. Select the Action Profile
6. Go to: "Define Action"
7. Add a new Entry of the type of Class Method
12. The Actions can use Instance Attributes filled by a previous action.
Demo:
Scenario:
Creating a premise
This value is set into the instance attribute. By this amount the No. of Persons is now in-/ decreased
ATTACHMENTS
public section.
interfaces BI_OBJECT .
interfaces BI_PERSISTENT .
interfaces IF_WORKFLOW .
class-methods HANDLE_RESULT
importing
!_WORKITEM type SWW_WIID optional
!_RESULT type CHAR255 optional
!PROCESS_ID type CRMS4_IU_PFPROCESS_ID optional .
protected section.
private section.
ENDCLASS.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Static Public Method ZCL_CRMS4_IU_WORKFLOW_NEWCONTR=>HANDLE_RESULT
* +----------------------------------------------------------------------------
---------------------+
* | [-- > ] _WORKITEM TYPE SWW_WIID(optional)
* | [-- > ] _RESULT TYPE CHAR255(optional)
* | [-- > ] PROCESS_ID TYPE
CRMS4_IU_PFPROCESS_ID(optional)
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method HANDLE_RESULT.
data:
LS_WORKITEM type SWLC_WORKITEM,
LS_WI_HEADER type SWWWIHEAD,
LT_WI_CONTAINER type SWCONTTAB.
WI_HEADER = LS_WI_HEADER
exceptions
CONTAINER_DOES_NOT_EXIST = 1
READ_FAILED = 2
others = 3.
if SY-SUBRC <> 0.
endif.
public section.
interfaces IF_BADI_INTERFACE .
interfaces IF_CRMS4_IU_CM_PF_PROCESS_BADI .
protected section.
private section.
ENDCLASS.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZCL_CRMS4_IU_PFP_NEW_CONTRACT >
IF_CRMS4_IU_CM_PF_PROCESS_BADI~BEFORE_DAMAGE_CONTROL
* +----------------------------------------------------------------------------
---------------------+
* | [-- > ] IR_PROCESS TYPE REF TO
IF_CRMS4_IU_CM_PF_PROCESS_ACS
* | [<- > ] CV_FAILED TYPE ABAP_BOOLEAN
* | [<- > ] CV_HANDLED TYPE ABAP_BOOLEAN
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IF_CRMS4_IU_CM_PF_PROCESS_BADI~BEFORE_DAMAGE_CONTROL.
data:
LV_WI_ID type SWWWIHEAD-WI_ID,
LV_WI_TASK type SWW_TASK value 'WS90200002',
LT_WI_CONTAINER type SWCONTTAB,
LT_PARAMETERS type CL_CRMS4_IU_CM_CUSTOMIZING=>TT_PF_PROCESS_PARAMETERS,
LS_CTI_ATTR type CRMS4S_IU_CTI_ATTR.
VALUE = LS_PROCESS_CONFIG-TEXT_DATA-TEXT
TAB_INDEX = '000003'
TYPE = 'C'
ELEMLENGTH = LV_LENGT_BYTE_PROCESS_TEXT )
( ELEMENT = 'LV_PROCESS_ID'
VALUE = LS_PROCESS_KEY-ID
TAB_INDEX = '000004'
TYPE = 'C'
ELEMLENGTH = LV_LENGT_BYTE_PROCESS_ID )
).
"add message
IR_PROCESS > ADD_MESSAGE(
IV_MSGID = 'ZCRMS4_IU_EXTENSION'
IV_MSGNO = '003'
IV_MSGV1 = conv #( |{ LV_WI_ID alpha = out }| )
IV_ADD_TO_EXTERNAL = ABAP_TRUE
).
if 1 = 2.
message E003(ZCRMS4_IU_EXTENSION) into data(LV_MESSAGE) with LV_WI_ID.
endif.
endmethod.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZCL_CRMS4_IU_PFP_NEW_CONTRACT >
IF_CRMS4_IU_CM_PF_PROCESS_BADI~BEFORE_EXECUTE_STEP
* +----------------------------------------------------------------------------
---------------------+
* | [-- > ] IR_PROCESS TYPE REF TO
IF_CRMS4_IU_CM_PF_PROCESS_ACS
* | [<- > ] CV_FAILED TYPE ABAP_BOOLEAN
* | [<- > ] CV_HANDLED TYPE ABAP_BOOLEAN
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IF_CRMS4_IU_CM_PF_PROCESS_BADI~BEFORE_EXECUTE_STEP.
data:
LV_WI_ID type SWWWIHEAD-WI_ID,
LV_WI_TASK type SWW_TASK value 'WS90200001',
LT_WI_CONTAINER type SWCONTTAB,
LT_PARAMETERS type
CL_CRMS4_IU_CM_CUSTOMIZING=>TT_PF_PROCESS_PARAMETERS.
"create workflow
call function 'SWW_WI_START'
exporting
CREATOR = conv SWW_OBJID( SY-UNAME )
TASK = LV_WI_TASK
CALLED_IN_BACKGROUND = ABAP_TRUE
importing
WI_ID = LV_WI_ID
tables
WI_CONTAINER = LT_WI_CONTAINER
exceptions
ID_NOT_CREATED = 1
READ_FAILED = 2
IMMEDIATE_START_NOT_POSSIBLE = 3
EXECUTION_FAILED = 4
INVALID_STATUS = 5
others = 6.
if SY-SUBRC <> 0.
endif.
"add message
IR_PROCESS > ADD_MESSAGE(
IV_MSGTY = 'I'
IV_MSGID = 'ZCRMS4_IU_EXTENSION'
IV_MSGNO = '001'
IV_MSGV1 = conv #( |{ LV_WI_ID alpha = out }| )
IV_ADD_TO_EXTERNAL = ABAP_TRUE
).
if 1 = 2.
message I001(ZCRMS4_IU_EXTENSION) into data(LV_MESSAGE) with LV_WI_ID.
endif.
endif.
endmethod.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZCL_CRMS4_IU_PFP_NEW_CONTRACT >
IF_CRMS4_IU_CM_PF_PROCESS_BADI~BEFORE_UNDO_STEP
* +----------------------------------------------------------------------------
---------------------+
* | [-- > ] IR_PROCESS TYPE REF TO
IF_CRMS4_IU_CM_PF_PROCESS_ACS
* | [<- > ] CV_FAILED TYPE ABAP_BOOLEAN
* | [<- > ] CV_HANDLED TYPE ABAP_BOOLEAN
* | [<- > ] CV_OMITTED TYPE ABAP_BOOLEAN
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IF_CRMS4_IU_CM_PF_PROCESS_BADI~BEFORE_UNDO_STEP.
* if IR_PROCESS > GET_CURRENT_STEP( ) = 'FORCED_MOVEOUT'.
* CV_FAILED = ABAP_TRUE.
* CV_HANDLED = ABAP_TRUE.
* endif.
endmethod.
ENDCLASS.
public section.
protected section.
private section.
ENDCLASS.
Window (Controller)
class ZL_ZIUCMSTP_WSUPPLYENDDAT_IMPL definition
public
inheriting from ZL_ZIUCMSTP_WSUPPLYENDDAT
create public .
public section.
methods IP_DEFAULT
redefinition .
protected section.
private section.
ENDCLASS.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZL_ZIUCMSTP_WSUPPLYENDDAT_IMPL->IP_DEFAULT
* +----------------------------------------------------------------------------
---------------------+
* | [--->] IV_COLLECTION TYPE REF TO IF_BOL_BO_COL(optional)
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IP_DEFAULT.
SUPER->IP_DEFAULT( IV_COLLECTION = IV_COLLECTION ).
try.
FORWARD_INBOUND_CALL(
exporting
IV_INBOUND_PLUG = |DEFAULT| ##NO_TEXT
IV_VIEWAREA = CO_VIEWAREA_MAIN
IV_COLLECTION = IV_COLLECTION
).
catch CX_CRM_IU_IL_S4OP_BASE.
raise exception type CX_BSP_WD_INCORRECT_IMPLEMENT.
endtry.
endmethod.
ENDCLASS.
public section.
methods IP_DEFAULT
importing
!IV_COLLECTION type ref to IF_BOL_BO_COL optional .
protected section.
methods WD_CREATE_CONTEXT
redefinition .
methods WD_DESTROY_CONTEXT
redefinition .
private section.
ENDCLASS.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZL_ZIUCMSTP_WSUPPLYENDDAT->IP_DEFAULT
* +----------------------------------------------------------------------------
---------------------+
* | [--->] IV_COLLECTION TYPE REF TO IF_BOL_BO_COL(optional)
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IP_DEFAULT.
"#EC NEEDED
* Added by wizard: Inbound plug 'DEFAULT'
endmethod.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Protected Method ZL_ZIUCMSTP_WSUPPLYENDDAT->WD_CREATE_CONTEXT
* +----------------------------------------------------------------------------
---------------------+
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method WD_CREATE_CONTEXT.
TYPED_CONTEXT ?= CONTEXT.
endmethod.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Protected Method ZL_ZIUCMSTP_WSUPPLYENDDAT->WD_DESTROY_CONTEXT
* +----------------------------------------------------------------------------
---------------------+
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method WD_DESTROY_CONTEXT.
clear ME->TYPED_CONTEXT.
SUPER->WD_DESTROY_CONTEXT( ).
endmethod.
ENDCLASS.
Window (Context)
class ZL_ZIUCMSTP_WSUPPLYENDDAT_CTXT definition
public
inheriting from CL_BSP_WD_CONTEXT
create public .
public section.
protected section.
private section.
ENDCLASS.
View (Controller)
class ZL_ZIUCMSTP_VSUPPLYENDDAT_IMPL definition
public
inheriting from ZL_ZIUCMSTP_VSUPPLYENDDAT
create public
public section.
methods IP_DEFAULT
redefinition .
protected section.
private section.
ENDCLASS.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZL_ZIUCMSTP_VSUPPLYENDDAT_IMPL->IP_DEFAULT
* +----------------------------------------------------------------------------
---------------------+
* | [--->] IV_COLLECTION TYPE REF TO IF_BOL_BO_COL(optional)
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IP_DEFAULT.
SUPER->IP_DEFAULT( IV_COLLECTION = IV_COLLECTION ).
endmethod.
ENDCLASS.
class ZL_ZIUCMSTP_VSUPPLYENDDAT definition
public
inheriting from CL_CRMS4_IU_CM_UI_PROCESS_VCO
create public
public section.
methods IP_DEFAULT
importing
!IV_COLLECTION type ref to IF_BOL_BO_COL optional .
methods CONSTRUCTOR .
protected section.
methods WD_CREATE_CONTEXT
redefinition .
private section.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZL_ZIUCMSTP_VSUPPLYENDDAT->CONSTRUCTOR
* +----------------------------------------------------------------------------
---------------------+
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method CONSTRUCTOR.
SUPER->CONSTRUCTOR( ).
endmethod.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Public Method ZL_ZIUCMSTP_VSUPPLYENDDAT->IP_DEFAULT
* +----------------------------------------------------------------------------
---------------------+
* | [--->] IV_COLLECTION TYPE REF TO IF_BOL_BO_COL(optional)
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method IP_DEFAULT.
"#EC NEEDED
* Added by wizard: Inbound plug 'DEFAULT'
endmethod.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Protected Method ZL_ZIUCMSTP_VSUPPLYENDDAT->WD_CREATE_CONTEXT
* +----------------------------------------------------------------------------
---------------------+
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method WD_CREATE_CONTEXT.
TYPED_CONTEXT ?= CONTEXT.
endmethod.
ENDCLASS.
View (Context)
class ZL_ZIUCMSTP_VSUPPLYENDDAT_CTXT definition
public
inheriting from CL_CRMS4_IU_CM_UI_PROCESS_CT
create public .
public section.
methods CREATE_CONTEXT_NODES
redefinition .
private section.
ENDCLASS.
* <SIGNATURE>------------------------------------------------------------------
---------------------+
* | Instance Protected Method ZL_ZIUCMSTP_VSUPPLYENDDAT_CTXT-
>CREATE_CONTEXT_NODES
* +----------------------------------------------------------------------------
---------------------+
* | [--->] CONTROLLER TYPE REF TO
CL_BSP_WD_CONTROLLER(optional)
* +----------------------------------------------------------------------------
----------</SIGNATURE>
method CREATE_CONTEXT_NODES.
try.
data(LT_MODEL_ITEMS) =
CL_CRM_IU_IL_S4OP_BSP_UTILS=>GET_CONTEXT_MODEL_ITEMS( IV_INSTANCE = ME ).
loop at LT_MODEL_ITEMS assigning field-symbol(<MODEL_ITEM>) where
IS_INHERITED is initial.
data(LV_PATH) = |{ <MODEL_ITEM>-NAME case = upper }|.
assign (LV_PATH) to field-symbol(<PROPERTY>).
<PROPERTY> ?= CREATE_MODEL(
IV_MODEL_ID = <MODEL_ITEM>-NAME
IV_CLASS_NAME = <MODEL_ITEM>-CLASSNAME
).
endloop.
catch CX_CRM_IU_IL_S4OP_BASE ##NO_HANDLER.
endtry.
endmethod.
ENDCLASS.
View (Layout/HTML)
<%@page language="abap" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<chtmlb:config mode = "RUNTIME"
xml = "<%= controller->configuration_descr->get_config_data( )
%>"
displayMode = "<%= controller->view_group_context-
>is_view_in_display_mode( controller ) %>" />