Technical implementation of loyalty program search

182 阅读1分钟

Created by Jerry Wang, last modified on Feb 11, 2014

The search implementation is quite different from the common search implemention for many other CRM application and thus worth being mentioned. 

Log on with business role LOY_PRO, work center Loyalty management->Loyalty program, click search button:

clipboard1

 

The query handler class for Loyalty program search is hard coded as CL_CRM_MKTPL_QUERY:The query handler class for Loyalty program search is hard coded as CL_CRM_MKTPL_QUERY:

clipboard2

 

inside this class, it tries to read the source code of report CRM_MKTPL_QUERY into an internal table:

clipboard3

 

And the source code is dymanically adapted according to different scenarios by method like line 339, 341, 343 and 345:

clipboard4

 

finally the modified report source code is exported to ABAP memory with an unique token as identifier:

clipboard5

 

The actual query is done in a new task via ABAP keyword STARTING NEW TASK. The ABAP memory instance token lv_token is also passed into the remote function module:

clipboard6

 

In the remote function module execution, the report source code is imported from ABAP memory and used to generate a subrontine pool ( in line 32 )

clipboard7

 

The actual search execution is done by the generated program %_T000F1 ( it is transient and only resides in the current session):

clipboard8

 

clipboard9