Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Capture message from perfomance assistant

0 Kudos

Ei pessoal

Você pode me ajudar, estou criando um script que captura o texto do assistente de perfomance SAP e transfere essas informações para o Excel. Estou tentando desta forma, mas não está funcionando.

session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").Text = "me51n"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[1]/btn[17]").press
session.findById("wnd[1]/tbar[0]/btn[0]").press
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:3303/tabsREQ_ITEM_DETAIL/tabpTABREQDT4/s subTABSTRIPCONTROL1SUB:SAPLMEGUI: 3321/chkMEREQ3321-EBAKZ"). Selecionado = Falso
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:3303/tabsREQ_ITEM_DETAIL/tabpTABREQDT4/s subTABSTRIPCONTROL1SUB:SAPLMEGUI: 3321/chkMEREQ3321-EBAKZ").SetFocus
session.findById("wnd[0]").sendVKey 11
session.findById("wnd[1]/usr/chk[1,5]").Selecionado = Verdadeiro
session.findById("wnd[1]/usr/chk[1,5]").SetFocus
session.findById("wnd[1]/tbar[0]/btn[43]").press
Se session.findById("wnd[0]/sbar").messagetype = "E" Então
    Status = sessão.ActiveWindow.findById("sbar").Text
Fim se
Cells(1, 1).Value = Status
session.findById("wnd[0]/shellcont").Fechar
session.findById("wnd[1]").Fechar
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:3303/tabsREQ_ITEM_DETAIL/tabpTABREQDT4/s subTABSTRIPCONTROL1SUB:SAPLMEGUI: 3321/chkMEREQ3321-EBAKZ"). Selecionado = Verdadeiro
session.findById("wnd[0]/tbar[0]/btn[11]").press<br>
2 REPLIES 2

anne-petteroe
Community Manager
Community Manager
0 Kudos

Hello Antonio,

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers, as it provides tips for preparing questions that draw responses from our members.

Feel free to take our Q&A tutorial at https://developers.sap.com/tutorials/community-qa.html as well, as that will also help you when preparing questions for the community.

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage your readers to respond.

Kind regards,

Anne

Sandra_Rossi
Active Contributor
0 Kudos

Just in case you can understand English, Performance Assistant is an HTML View, i.e. GuiHTMLViewer object, and if the user's SAP GUI is 7.70+ the code depends on the selected browser control (either Internet Explorer or Edge). In the forum, you can find an answer about GuiHTMLViewer based on Internet Explorer.