1
我想在SAP BO“查询生成器”上运行脚本片段,它是使用SQL检索数据的简单工具。 (由于声誉,我无法上传图片,产品的界面可以在这里找到:http://scn.sap.com/docs/DOC-42952)自动运行JavaScript脚本代码
由于我有一堆查询运行,我想用snippet自动运行它们。使用下面的代码:
//select the textarea to insert retrieved queries
document.querySelector("textarea").textContent = "SELECT * FROM CI_INFOOBJECTS";
//click the submit button
document.getElementsByTagName('input')[0].click();
//code to export the query result
//after click(), the page reloaded and it won't executed the following code.
document.addEventListener("DOMContentLoaded", function() {
//back to the previous page, run the previous code again
window.history.back(1);
}, false);
有没有人有好的想法如何实现它?谢谢你的帮助。