(SAM) - fail to pull data from SAP & can't find transaction to kill


Description

Unable to run UI action "Pull all SAP Data"

and return error
A pull request is currently in progress. Please wait for the current pull request to complete before starting another pull request.

Cause

UI action "Pull all SAP Data"

https://<INSTANCE>.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=af48a0a60b331300dc03650d37673a72

check table "samp_job_log" before the job can run.

Resolution

The reason that you click on the UI Action
Pull all SAP Data

and return error
A pull request is currently in progress. Please wait for the current pull request to complete before starting another pull request.



was due to the UI Action
Pull all SAP Data
https://<INSTANCE>.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=af48a0a60b331300dc03650d37673a72

that set the condition to check the table "samp_job_log" with the record in status "in progress".

Find the job that prevent the job from running

where('name', 'STARTSWITH', 'Import SAP data for connection:')
 and ('status', 'in progress')

Set the job to status=failed 
via scripts background
ie:
var now_GR = new GlideRecord('samp_job_log');
var queryString = "sys_id=XXXXXX";
now_GR.addEncodedQuery(queryString);
now_GR.query();
while (now_GR.next()) {
now_GR.setValue('status', "failed");
now_GR.update();
}

You need to replace the job's sys_id for the above script.

After that, re-run the UI action "Pull all SAP Data"