Solved

_ant_generate_db fails with ERROR : Could not replace text.... when a procedure in cust layer overtakes the ext layer

  • 23 May 2021
  • 4 replies
  • 230 views

Userlevel 5
Badge +7

Hi,

  • PROCEDURE Create_Connectivity_Message___ of InvoiceTransfer-Cust.plsql overtakes the Ext layer(PROCEDURE Create_Connectivity_Message___ of InvoiceTransfer-Ext.plsql)
  • There are 5 $SEARCH and $REPLACE blocks within the procedure in the cust layer and one $SEARCH and $APPEND block.
  • Encountered the error
    • "Exception while generating code for InvoiceTransfer-Cust.utility Could not replace text " IF (send_itxml_ AND doc_type_ = 'TD04') THEN ..." in method Create_Connectivity_Message___"

        for the 3rd $SEARCH and $REPLACE block "IF (send_itxml_ AND doc_type_ = 'TD04') THEN"      which  has been written after the $SEARCH and $APPEND block.

 

Image 1
Image 2
Image 3
Image 4
Image 5
  • I would like to know how to correct this type of an error when we want to implement several $SEARCH and $REPLACE blocks along with $SEARCH and $APPEND within the same procedure in the cust layer that overtakes the ext layer.

Cheers,

Priyanjala

icon

Best answer by Sahan Udana 24 May 2021, 03:25

View original

This topic has been closed for comments

4 replies

Userlevel 5
Badge +6

HI @Priyanjala Silva ,

 

You better  check the  generated code in the database of the previous version which is without any errors.

Then you can decide  the new logic which needs to add and identify where to put you new code change.

 

Cheers,

Thillini

 

 

 

 

Userlevel 6
Badge +12

Hi Priyanjala,

 

I noticed some instances the error cause due to whitespaces. To avoid that copy the original block in search section. 

 

Regards,

Sahan 

Userlevel 5
Badge +8

Hi Priyanjala,

 

Double check the search code block to see if anything has changed in the ext or core layer and also as Sahan mentioned check the whitespaces as well.

Best Regards,

Vishaka

Userlevel 5
Badge +7

Hi Priyanjala,

 

I noticed some instances the error cause due to whitespaces. To avoid that copy the original block in search section. 

 

Regards,

Sahan 

Hi,

 

As mentioned the error was due to the extra white space in the indentation of the $SEARCH block.

Hence I directly copied the relevant code from the generated APY and that helped to sort the issue.

 

Thanks,

Priyanjala