flag no_redetermination and switch

104 阅读1分钟

Created by Jerry Wang, last modified on Feb 16, 2015

Even a text object is selected for text determination execution, ( it means it is picked to execute subroutine determine_text ), however it does not mean that the real determination process will be executed: 

 

clipboard1

 

 

The real logic ( subroutine copy_text ) will only be executed if flag no_redetermination = abap_false ( it means redetermination is necessary ).

 

clipboard2

 

 

 

There are two kinds of logics to determine the flag no_redetermination: switch and change mode.

 

Switch

 

 

If there is product change or item change or partner change in current session, text redetermination must be switched on.

 

clipboard3

 

 

The switch information for current session is fetched from FM COM_TEXT_GET_SWITCH:

 

clipboard4

 

 

This is not a business switch but just a global internal table:

 

clipboard5

 

 

Perform a where used operation on gt_text_switch, and find the FM COM_TEXT_SET_SWITCH:

 

clipboard6

 

 

 

In this way we can find all use cases where the corresponding switch could be switched on:

 

clipboard7

 

 

case1: del_prot_text

 

clipboard8

 

 

case2: partner change - line 60

 

clipboard9

 

 

case3: product change

 

clipboard10