我想在SAP BO“查询生成器”上运行一个脚本片段,它是一个使用SQL检索数据的简单工具。(由于信誉问题,我无法上传图片,产品的界面可以在这里找到:http://scn.sap.com/docs/DOC-42952)
由于我有一堆查询要运行,我想使用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);
字符串
有没有人有好的想法如何实现它?谢谢你的帮助。
1条答案
按热度按时间ca1c2owp1#
你可以在chrome上使用Tampermonkey,你可以从hibbard tampermonkey tutorial这样的网站上学习如何使用它。总的来说,你的脚本看起来像这样:
进行必要的更改,如@match。请评论如果你有任何疑问。希望有帮助