(SM) Support Tip: How to fix “string exceeded 64k” error when selecting affected CI for change

Scenario:

Go to "Change Management > Open "New Change" Fill in the Service on the form and then click on the Affected Configuration Item link. This is where the system hangs for a few seconds and throws the error:

Error: The WHERE clause string exceeded 64k (use.link)

Root Cause:

There is a limitation in RAD application us.link, panel select.records, where if the query that is going to be executed is too long as it’s in this case the application will just tell the user that the query is too big and exceeded 64K.

Selecting the Affected Configuration Item for change, we generate all the related CIs into $memberList, it has a HUGE amount of CIs then the query is just too long and SM failed with the error reported => “Error: The WHERE clause string exceeded 64k”

Workaround:

  1. QCCR1E106672 fix issues for link file: probsummary, knownerror, rootcause.

But cm3r file still has this issue, the steps to fix issue are:

>> Go to Menu Navigator

>> Click on Tailoring

>> Click on Tailoring Tools

>> Click links

>> Search name: cm3r and open the link record

>> Go to the line with source field name is: assets

>> Click on this line and then right click and execute “select line” option.

>> In javascript page, copy the followed code

var lineNumber = 1;

lineNumber = system.functions.cursor_line(1);

var logicName = "";

 if (null != vars.$L_file.assets && null != vars.$L_file.assets[lineNumber-1]) {

    logicName = vars.$L_file.assets[lineNumber-1];

}

var affectCiList = system.library.BSGFunctions.getMembers(system.vars.$File.affected_item,false,system.vars.$G_cilevel);

affectCiList  = system.library. BSGFunctions.GetFilteredList(affectCiList,"type~=\"bizservice\"", logicName);

system.vars.$memberList = affectCiList;

if (affectCiList.length > 2000) {

    print(lib.rtecallUtil.scmsg(154,"icm"));

    vars.$fill_skip = true;

}

>> Save the change and log off current user.

Improvement:

  1. Filter the sql by logic.name at first to reduce the array size of $ memberList
  2. Inform user to type the filter if the result of Affected CI exceeds the limit (2000).
How to fix string exceeded 64k error when opening change.docx

Tags: