cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP dump while generating Rules

Former Member
0 Kudos

we are getting ABAP dump while generating rules.we are on SP10.

Category               ABAP Programming Error

Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC

  1. Except.                CX_SY_OPEN_SQL_DB

ABAP Program           CL_GRAC_RULE_ENGINE===========CP

Application Component  GRC-AC

Date and Time          11.01.2013 14:53:27

Short text

    The ABAP/4 Open SQL array insert results in duplicate database records.

What happened?

    Error in the ABAP Application Program

    The current ABAP program "CL_GRAC_RULE_ENGINE===========CP" had to be

     terminated because it has

    come across a statement that unfortunately cannot be executed.

Error analysis

    An exception occurred that is explained in detail below.

    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught

     in

    procedure "GENERATE_ACTION_RULES" "(METHOD)", nor was it propagated by a

     RAISING clause.

    Since the caller of the procedure could not have anticipated that the

    exception would occur, the current program is terminated.

    The reason for the exception is:

    If you use an ABAP/4 Open SQL array insert to insert a record in

    the database and that record already exists with the same key,

    this results in a termination.

    (With an ABAP/4 Open SQL single record insert in the same error

    situation, processing does not terminate, but SY-SUBRC is set to 4.)

Missing RAISING Clause in Interface

    Program

CL_GRAC_RULE_ENGINE===========CP

    Include

CL_GRAC_RULE_ENGINE===========CM001

    Row

1

    Module type

(METHOD)

    Module Name

GENERATE_ACTION_RULES

Trigger Location of Exception

    Program

CL_GRAC_RULE_ENGINE===========CP

    Include

CL_GRAC_RULE_ENGINE===========CM001

    Row

846

    Module type

(METHOD)

    Module Name

GENERATE_ACTION_RULES

Source Code Extract (Source code has changed)

Line

SourceCde

  816

CLEAR ls_sysrule_psys_key_map.

  817

          READ TABLE lt_sysrule_psys_key_map WITH TABLE KEY syskey = lv_sysrule_psysmap_key

  818

          IF ls_sysrule_psys_key_map IS NOT INITIAL.

  819

            " That means a key was found.. simplet ignore this one..

  820

          ELSE.

  821

            " key ws not froud.. use this sys to update the sysrule table..

  822

ls_sysrule_data-riskid = ls_rg_allrules-riskid.

  823

ls_sysrule_data-actruleid = ls_rg_allrules-actruleid.

  824

ls_sysrule_data-active = abap_true.

  825

ls_sysrule_data-connector = lv_curr_sys.

  826

  827

            INSERT ls_sysrule_data INTO TABLE lt_sysrule_data.

  828

            " put the key into the map as well..

  829

ls_sysrule_psys_key_map-syskey = lv_sysrule_psysmap_key.

  830

ls_sysrule_psys_key_map-seqno = ls_rg_allrules-actruleid.

  831

            INSERT ls_sysrule_psys_key_map INTO TABLE lt_sysrule_psys_key_map.

  832

          ENDIF.

  833

  834

        ENDLOOP.

  835

  836

  837

      ENDIF. " num psys condition.

  838

  839

  840

    ENDLOOP.  " Final Rules loop.

  841

  842

    " First clean the Sys Rule Table for this Risk:

  843

    DELETE FROM gracsysrule WHERE riskid = riskid. "#EC *

  844

  845

    " write Sys rules into table: GRACSYSRULE.

>>>>>

    INSERT gracsysrule FROM TABLE lt_sysrule_data. "#EC *

  847

  848

  849

  850

  ELSE. " else the scope is cross system.

  851

  852

    LOOP AT lt_rg_allrules INTO ls_rg_allrules.          "#EC CI_NESTED

  853

      CLEAR ls_funact_bean.

  854

      CLEAR lt_funact_array.

  855

      CLEAR ls_funact_map.

  856

      CLEAR lt_funact_map_array.

  857

  858

      IF ls_rg_allrules-numlsys EQ 0. " all psys..

  859

  860

        LOOP AT  ls_rg_allrules-rulerows INTO ls_final_action_rule_row. "#EC CI_NESTED

  861

  862

          IF sy-tabix = 1.

  863

            lv_curr_sys = ls_final_action_rule_row-connector.

  864

          ELSE.

  865

            IF lv_curr_sys <> ls_final_action_rule_row-connector.

Active Calls/Events

  1. No. Ty.          Program                             Include                             Line

      Name

    2 METHOD CL_GRAC_RULE_ENGINE===========CP CL_GRAC_RULE_ENGINE===========CM001 846

CL_GRAC_RULE_ENGINE=>GENERATE_ACTION_RULES

    1 EVENT        GRAC_GENERATE_RULES                 GRAC_GENERATE_RULES                    19

      START-OF-SELECTION

Category               ABAP Programming Error

Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC

  1. Except.                CX_SY_OPEN_SQL_DB

ABAP Program           CL_GRAC_RULE_ENGINE===========CP

Application Component  GRC-AC

Date and Time          11.01.2013 14:53:27

Short text

    The ABAP/4 Open SQL array insert results in duplicate database records.

What happened?

    Error in the ABAP Application Program

    The current ABAP program "CL_GRAC_RULE_ENGINE===========CP" had to be

     terminated because it has

    come across a statement that unfortunately cannot be executed.

Error analysis

    An exception occurred that is explained in detail below.

    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught

     in

    procedure "GENERATE_ACTION_RULES" "(METHOD)", nor was it propagated by a

     RAISING clause.

    Since the caller of the procedure could not have anticipated that the

    exception would occur, the current program is terminated.

    The reason for the exception is:

    If you use an ABAP/4 Open SQL array insert to insert a record in

    the database and that record already exists with the same key,

    this results in a termination.

    (With an ABAP/4 Open SQL single record insert in the same error

    situation, processing does not terminate, but SY-SUBRC is set to 4.)

Missing RAISING Clause in Interface

    Program

CL_GRAC_RULE_ENGINE===========CP

    Include

CL_GRAC_RULE_ENGINE===========CM001

    Row

1

    Module type

(METHOD)

    Module Name

GENERATE_ACTION_RULES

Trigger Location of Exception

    Program

CL_GRAC_RULE_ENGINE===========CP

    Include

CL_GRAC_RULE_ENGINE===========CM001

    Row

846

    Module type

(METHOD)

    Module Name

GENERATE_ACTION_RULES

Source Code Extract (Source code has changed)

Line

SourceCde

  816

CLEAR ls_sysrule_psys_key_map.

  817

          READ TABLE lt_sysrule_psys_key_map WITH TABLE KEY syskey = lv_sysrule_psysmap_key

  818

          IF ls_sysrule_psys_key_map IS NOT INITIAL.

  819

            " That means a key was found.. simplet ignore this one..

  820

          ELSE.

  821

            " key ws not froud.. use this sys to update the sysrule table..

  822

ls_sysrule_data-riskid = ls_rg_allrules-riskid.

  823

ls_sysrule_data-actruleid = ls_rg_allrules-actruleid.

  824

ls_sysrule_data-active = abap_true.

  825

ls_sysrule_data-connector = lv_curr_sys.

  826

  827

            INSERT ls_sysrule_data INTO TABLE lt_sysrule_data.

  828

            " put the key into the map as well..

  829

ls_sysrule_psys_key_map-syskey = lv_sysrule_psysmap_key.

  830

ls_sysrule_psys_key_map-seqno = ls_rg_allrules-actruleid.

  831

            INSERT ls_sysrule_psys_key_map INTO TABLE lt_sysrule_psys_key_map.

  832

          ENDIF.

  833

  834

        ENDLOOP.

  835

  836

  837

      ENDIF. " num psys condition.

  838

  839

  840

    ENDLOOP.  " Final Rules loop.

  841

  842

    " First clean the Sys Rule Table for this Risk:

  843

    DELETE FROM gracsysrule WHERE riskid = riskid. "#EC *

  844

  845

    " write Sys rules into table: GRACSYSRULE.

>>>>>

    INSERT gracsysrule FROM TABLE lt_sysrule_data. "#EC *

  847

  848

  849

  850

  ELSE. " else the scope is cross system.

  851

  852

    LOOP AT lt_rg_allrules INTO ls_rg_allrules.          "#EC CI_NESTED

  853

      CLEAR ls_funact_bean.

  854

      CLEAR lt_funact_array.

  855

      CLEAR ls_funact_map.

  856

      CLEAR lt_funact_map_array.

  857

  858

      IF ls_rg_allrules-numlsys EQ 0. " all psys..

  859

  860

        LOOP AT  ls_rg_allrules-rulerows INTO ls_final_action_rule_row. "#EC CI_NESTED

  861

  862

          IF sy-tabix = 1.

  863

            lv_curr_sys = ls_final_action_rule_row-connector.

  864

          ELSE.

  865

            IF lv_curr_sys <> ls_final_action_rule_row-connector.

Active Calls/Events

  1. No. Ty.          Program                             Include                             Line

      Name

    2 METHOD CL_GRAC_RULE_ENGINE===========CP CL_GRAC_RULE_ENGINE===========CM001 846

CL_GRAC_RULE_ENGINE=>GENERATE_ACTION_RULES

    1 EVENT        GRAC_GENERATE_RULES                 GRAC_GENERATE_RULES                    19

      START-OF-SELECTION

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

This message was moderated.

Former Member
0 Kudos


Hi Pravin,

Kindly refer the below thread

http://scn.sap.com/thread/3934439




Regards,

Manju