cancel
Showing results for 
Search instead for 
Did you mean: 

Nested Execution Depth Error

Former Member
0 Kudos

Hi All,

I am getting the below error message when trying to activate a trigger in the HANA DB.Can anyone please let me know what might be causing this?

The stored procedure the trigger is calling is a simple one and there is no further nesting of calls within the procedure.

Could not execute 'CREATE TRIGGER "CRM_HANA"."CRMD_ORDER_INDEX_UPDATE" AFTER UPDATE ON "CRM_HANA"."CRMD_ORDER_INDEX" ...' in 88 ms 633 µs .

SAP DBTech JDBC: [648]: nesting depth of trigger and procedure is exceeded: maximum nesting depth 8, trigger CRM_HANA.CRMD_ORDER_INDEX_UPDATE on table CRM_HANA.CRMD_ORDER_INDEX(8) -> procedure EBI.BOOKDBOOK_CRMD_ORDER_INDEX_UPDATE(7) -> trigger CRM_HANA.CRM_JEST_INSERT on table CRM_HANA.CRM_JEST(6) -> procedure EBI.BOOK_CRM_JEST(5) -> trigger CRM_HANA.CRM_JEST_INSERT on table CRM_HANA.CRM_JEST(4) -> procedure EBI.BOOK_CRM_JEST(3) -> trigger CRM_HANA.CRM_JEST_INSERT on table CRM_HANA.CRM_JEST(2) -> procedure EBI.BOOK_CRM_JEST(1) -> trigger CRM_HANA.CRM_JEST_INSERT on table CRM_HANA.CRM_JEST, nested execution depth limit exceeded, cannot create trigger

Thanks,

Goutham

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Goutham,

Are you able to fix the issue?. I tried all the options as per the note 2130431 still I am getting same error.

Let me know if you have any inputs to resolve the issue.

Error Message:

The following error messages occurred on: 05/31/2016 07:51:14

Failed to create triggers for table MARC with logging table /1CADMC/00000284

RFC destination: SLT_S_SAPECC

Database connection: R/3*

SQL statement:  CREATE TRIGGER "XXXXXX"."/1LT/00000284INS" AFTE R INSERT ON "SAPABAP1"."MARC" REFERENCING NEW ROW NEW FOR EACH ROW BEGIN /* UTC_TIMESTAMP 2016053119 5114*/ IF ( :NEW.MANDT = '200' ) THEN INSERT INTO

"XXXXX"."/1CADMC/00000284" ( "IUUC_SEQUENCE" , "IUUC_TIMESTAMP" , "IUUC_PROCESSED" , "MANDT" , "M ATNR" , "WERKS" , "IUUC_OPERAT_FLAG"  ) VALUES ( "SAPABAP1"."SEQ_/1CADMC/00000284".NEXTVAL, to_char

(CURRENT_UTCTIMESTAMP, 'yyyymmddhh24missFF7'), ' ' , :NEW."MANDT", :NEW."MATNR", :NEW."WERKS",  'I');  END IF; END;

/1LT/00000284INS trigger creation failed for table  MARC

nesting depth of trigger and procedure is exceeded : maximum nesting depth 8, trigger XXXX./1LT/0 0000284INS on table XXXX.MARC

Thanks,

Sunny.

Former Member
0 Kudos

Its working after changing the parameter in ECC(HANA) to 24 and no need to bounce the server.

former_member183326
Active Contributor
0 Kudos
lbreddemann
Active Contributor
0 Kudos

Good find Michael!

Unfortunately the URL points to the internal SAP notes server. Can you quickly fix that?

Thanks!

former_member183326
Active Contributor
0 Kudos

My bad,

http://service.sap.com/sap/support/notes/2130431

I also informed the note owner to include the HANA Studio error to improve search quality.

Former Member
0 Kudos

Hi,

I tried with both parameters, nested_trigger_limit=16 and/or nested_trigger_check_in_ddl_time=true/false options, as per notes 2130431 and bounced the server, still getting the same error. Any help would be appreciated greatly.

Thanks,

Sunny

lbreddemann
Active Contributor
0 Kudos

I tend to believe that this is one of the rather useful error messages that actually allows you to see and understand what causes the error.

With minimal reformatting we get this:

CRM_HANA.CRMD_ORDER_INDEX_UPDATE on table CRM_HANA.CRMD_ORDER_INDEX(8)

-> procedure EBI.BOOKDBOOK_CRMD_ORDER_INDEX_UPDATE(7)

-> trigger CRM_HANA.CRM_JEST_INSERT on table CRM_HANA.CRM_JEST(6)

-> procedure EBI.BOOK_CRM_JEST(5)

-> trigger CRM_HANA.CRM_JEST_INSERT on table CRM_HANA.CRM_JEST(4)

-> procedure EBI.BOOK_CRM_JEST(3)

-> trigger CRM_HANA.CRM_JEST_INSERT on table CRM_HANA.CRM_JEST(2)

-> procedure EBI.BOOK_CRM_JEST(1)

-> trigger CRM_HANA.CRM_JEST_INSERT on table CRM_HANA.CRM_JEST, nested execution depth limit exceeded, cannot create trigger

So, from the INSERT on CRMD_ORDER_INDEX the CRMD_ORDER_INDEX_UPDATE procedure is triggered.

At least one command in that procedure must lead to an INSERT into CRM_JEST.

And this CRM_JEST in turn has a trigger that leads to more inserts into itself.

I guess this is a nice example for why triggers really are to be avoided.

Why are the triggers there in the first place? What do they do?