CRM and CX Blogs by SAP
Stay up-to-date on the latest developments and product news about intelligent customer experience and CRM technologies through blog posts from SAP experts.
cancel
Showing results for 
Search instead for 
Did you mean: 
SAP Investigative Case Management (ICM) is now available on SAP S/4HANA since 1909 FPS00 release. An overview of the product can be found in the below blog post.

Investigative Case Management for S/4HANA is now released on SAP S/4HANA 1909 FPS00.

Introduction


In the new ICM solution, two SAP Fiori applications were built to manage ICM Location and ICM Object using fiori Elements. They Include annotation rich CDS Views and BOPF objects for transaction handling with OData Services. These two are DRAFT enabled stateless applications.

A transactional application with Draft capabilities is great because it allows a user to create or edit an existing business document without any fear of losing the data at any point. The current state of the application including current state of data is stored in a set of mirror application tables called DRAFT tables. User need not have to click on the application save button until all the required data is entered.

More details on the draft feature of the fiori element can be found in the below SAP UI5 documentation.

DRAFT Handling in SAP Fiori elements

Below blogpost gives deep insight into technical details of DRAFT application with ICM Location as an example. It also gives details about BOPF features like Determination, Validation and Action including mention of BAdIs for customers.

How to build a DRAFT application


Below are the steps required to enable DRAFT capability for a transactional application.

  • Add the below three annotation in the root node of the transaction processing CDS View.


@ObjectModel.transactionalProcessingEnabled:true

@ObjectModel.draftEnabled:true

@ObjectModel.writeDraftPersistence: 'IINVGCSMLOC_D'

@ObjectModel.transactionalProcessingEnabled:true This enables the transactional processing and generates  business object for the corresponding CDS View.


@ObjectModel.draftEnabled:true This enables draft feature for the corresponding business object .

@ObjectModel.writeDraftPersistence: 'IINVGCSMLOC_D' In this annotation you provide the table  name which  the framework uses to  create the draft table entries.




  • Add the below annotations for all the child node of the transaction processing CDS view where  the draft feature needs to enabled.


@ObjectModel.transactionalProcessingEnabled: true

@ObjectModel.writeDraftPersistence: 'INVGCSMLOCCASE_D'

  • In the consumption view of the root node below annotations are required .


@ObjectModel.transactionalProcessingDelegated: true

@ObjectModel.draftEnabled: true

  • In the consumption view of all the child nodes where the draft feature needs to enabled below annotation is added.


@ObjectModel.transactionalProcessingDelegated: true

  • Business Object will have a draft class generated when we activate the transaction processing view with the draft feature enabled. The draft class inherit the class /BOBF/CL_LIB_DR_CLASSIC_APP.


In this class there is a method  /bobf/if_frw_draft~copy_draft_to_active_entity  where we will write code logic to save the data back to the database .

BOPF handling


The Business Object Processing Framework (BOPF) provides actions, determinations and validations to define the (main) logic of their application.  These features can also be implemented for draft enabled applications on the draft data .

ICM Location and ICM Object Applications also have these features implemented to fulfill the application specific business logic .Below information provide more details on  how these concepts are implemented for ICM Location Application.


  • Determination




Draft enabled fiori applications  have the option of adding application specific business logic with determinations.

Determination Class inherits the class /BOBF/CL_LIB_D_SUPERCL_SIMPLE and in the method /BOBF/IF_FRW_DETERMINATION~EXECUTE determination logic for each of the nodes can be written.

Example : In ICM Location Application , User have the option to enter the Geo location  related information in Degree Minute second format , User can also see this data in Decimal degree format for the draft data by just pressing enter. Such application specific business logic on the draft data can be implemented in determination.


  • Validation




Draft Enabled Applications have the option of doing consistency validations on the draft data.

Validation Class inherits the class /BOBF/CL_LIB_V_SUPERCL_SIMPLE and in the method /BOBF/IF_FRW_VALIDATION~EXECUTE validation logic for each of the nodes can be written.

Example : In ICM Location Application, Category  is mandatory field to save any location. Such kind of checks are implemented in the validation class


  • Action




Actions are used when we want to extend the business logic so that status changes to individual instances .

Action Class inherits the class /BOBF/CL_LIB_A_SUPERCL_SIMPLE and in the method /BOBF/IF_FRW_ACTION~EXECUTE action logic for each of the nodes can be written.

Example : In ICM Location Application, it is possible to relate other ICM Entity like Case, Object .Such kind of relationship linking is achieved through Action implementation.

Customer BAdIs in ICM BOPF objects


ICM Customers can also extend determination, validation and actions (Before Save and Delete) in Location and Object Applications.

Below BADI’s can be implemented for the same .











































  ICM Location ICM Object
Determination CRMS4_ICM_LOC_DET_BADI CRMS4_ICM_OBJ_DET_BADI
Validation CRMS4_ICM_LOC_VALD_BADI CRMS4_ICM_OBJ_VALD_BADI
Before Save CRMS4_ICM_LOC_SAVE_BADI CRMS4_ICM_OBJ_SAVE_BADI
During Delete CRMS4_ICM_LOC_DEL_BADI CRMS4_ICM_OBJ_DEL_BADI

More details on the Draft capabilities of Transactional Apps can be found in the below help page.

Developing New Transactional Apps with Draft Capabilities

 
2 Comments
former_member182190
Active Participant
Very informative blog Jayashree. Draft is a very important concept and you have explained well in a simple manner. Really appreciate the way ICM team is sharing its knowledge and experiences of their S4 journey.
krishna_mayya2
Advisor
Advisor
Thank you Jayashree for a good consolidation!