When using rules in rollup substitutions, runtimes can be relatively slow even though generated rules are used.
This is because the old Boolean processor is called up (-> a lot of overhead).
The problem is corrected as of Release 4.0A.
Solution for all 3.x Releases:
You can avoid calling up the old Boolean processor if you only use rules (subrules) in the rollup substitution. In this case, you can call up the FORM routines generated from the rules directly; this will improve runtimes considerably.
Via a control indicator, you can now define whether these FORM routines are to be accessed directly if you are having runtime problems.
In this case, however, you must make sure that ONLY RULES are entered in table T892U (these rules have already been created in system configuration via the menu options Tools -> Rules).
If rules are not used, the old form must still be used with longer runtimes because inevitable errors will otherwise occur.
The following correction in program RGLCRP00 (as of Rel. 3.0F in the described Include programs) is needed
(only add the lines marked with "P21K003284):
Caution: The flag USE_ONLY_RULES at the beginning is important:
USE_ONLY_RULES = 'X' -> only rules can be used in the substitution -> improvement in performance
USE_ONLY_RULES = ' ' -> complex conditions can be used in the substitution (they function as before)
- 1. Up to 3.0E approx. line 840 in RGLCRP00 (as of 3.0F approx. line 970 in RGLCRTOP)
OFFSET_CODE TYPE I. "Linker Rand im Coding
*Performance-Optimiziation for generated rules "P21K003284
DATA: USE_ONLY_RULES VALUE 'X', "Steuerungsflag!!!! "P21K003284
BOOL_POOL LIKE SY-REPID. "P21K003284
*---------------------------------------------------------------------*
* FORM E01_CREATE_PROCESSOR *
*---------------------------------------------------------------------*
------------------------------------------------------------------------
- 2. Up to 3.0E in RGLCRP00 (as of 3.0F in RGLCRP05)
(end of the routine CREATE_E02_INIT_PROCESSOR)
* CYCLE_SET sortieren
SORT CYCLE_SET.
IF NOT USE_ONLY_RULES IS INITIAL. "P21K003284
*Import Structure for bool processor "P21K003284
IF BOOL_POOL IS INITIAL. "P21K003284
PERFORM E01_MAKE_BOOLFORM_FILENAME(SAPFGBBA) "P21K003284
CHANGING BOOL_POOL. "P21K003284
ENDIF. "P21K003284
C = 'PERFORM IMPORT_TABLE($)'. "P21K003284
REPLACE '$' INTO C WITH BOOL_POOL. "P21K003284
PERFORM APPEND_CODE USING: "P21K003284
0 0 C SPACE, "P21K003284
0 0 'USING' SPACE. "P21K003284
C = '''$'''. "P21K003284
REPLACE '$' INTO C WITH HEADER-STABKEY. "P21K003284
PERFORM APPEND_CODE USING 0 0 C SPACE. "P21K003284
C = '$.'. "P21K003284
REPLACE '$' INTO C WITH HEADER-STABKEY. "P21K003284
PERFORM APPEND_CODE USING 0 0 C SPACE. "P21K003284
ENDIF. "P21K003284
PERFORM APPEND_CODE USING -2 0 'ENDFORM.' SPACE.
ENDFORM.
------------------------------------------------------------------------
- 3. Up to 3.0E in RGLCRP00 (as of 3.0F in RGLCRP06)
IF SUB-CONDITION = SPACE.
*Substitution generieren
PERFORM CREATE_KEY_SUBSTITUTION.
PERFORM APPEND_CODE USING 0 0 C SPACE.
PERFORM APPEND_CODE USING:
0 0 'EXIT.' SPACE.
EXIT.
ELSE.
*Regel eingegeben
IF USE_ONLY_RULES IS INITIAL. "P21K003284
PERFORM APPEND_CODE USING 0 0:
'PERFORM E05_NEW_SEGMENTS(SAPFGBO0).' SPACE,
'PERFORM E03_EVALUATE_FORMULA_STRING(SAPFGBO0) USING' SPACE
* Apostrophe in Formeln verdoppeln
C = ''''.
C+1 = SUB-CONDITION.
CLEAR SY-SUBRC.
WHILE SY-SUBRC = 0.
REPLACE '''' INTO C+1 WITH '!'.
ENDWHILE.
CLEAR SY-SUBRC.
WHILE SY-SUBRC = 0.
REPLACE '!' INTO C+1 WITH ''''''.
ENDWHILE.
C+78 = ''''.
CONDENSE C.
PERFORM APPEND_CODE USING 12 -12 C SPACE.
C = 'SY-CTYPE ''$'' ''$'' '''' ''''.'.
REPLACE '$' INTO C WITH
IF HEADER-STABKEY = HEADER-STABDAT.
REPLACE '$' WITH SPACE INTO C.
ELSE.
REPLACE '$' WITH
ENDIF.
PERFORM APPEND_CODE USING: 12 -12 C SPACE,
0 2 'IF SY-CTYPE = ''T''.' SPACE
*Use only rules in table T892U "P21K003284
ELSE. "P21K003284
IF BOOL_POOL IS INITIAL. "P21K003284
PERFORM E01_MAKE_BOOLFORM_FILENAME(SAPFGBBA)"P21K003284
CHANGING BOOL_POOL. "P21K003284
ENDIF. "P21K003284
C = 'PERFORM E17_SUBRULE_CALL($)'. "P21K003284
REPLACE '$' WITH BOOL_POOL INTO C. "P21K003284
PERFORM APPEND_CODE USING: 0 0 C SPACE, "P21K003284
0 0 'USING' SPACE. "P21K003284
SHIFT SUB-CONDITION UP TO '&'. "P21K003284
SHIFT SUB-CONDITION. "P21K003284
C = '''$'''. "P21K003284
REPLACE '$' WITH SUB-CONDITION INTO C. "P21K003284
PERFORM APPEND_CODE USING: "P21K003284
0 0 C SPACE, "P21K003284
0 0 '''RL''' SPACE, "P21K003284
0 0 'CHANGING' SPACE, "P21K003284
0 0 'SY-CTYPE.' SPACE, "P21K003284
0 2 'IF SY-CTYPE = ''T''.' SPACE. "P21K003284
ENDIF. "P21K003284
PERFORM CREATE_KEY_SUBSTITUTION.
*************************End of the correction*************************
Additional key words
Rollup, T892U
No comments:
Post a Comment