on 07-20-2019 1:30 PM
Hi All,
i am trying to do Find and add code logic inside function module. i am not able to raise context menu function find and feed context into find popup.
context menu is not working on below object
session.findById("wnd[0]/usr/tabsFUNC_TAB_STRIP/tabpSOURCE/ssubSCREEN_HEADER:SAPLEDITOR_START:8430/cntlEDITOR/shellcont/shell")
Can any one suggest how can we do this ?
Hello Praveen,
you can try this to find and add a code inside SE80 with SAP GUI Scripting.
strSearch = "Your code is searched for"
strAdd = "Your code to add"
Set ABAPEditor = session.findById("wnd[0]/usr/tabsFUNC_TAB_STRIP/tabpSOURCE/ssubSCREEN_HEADER:SAPLEDITOR_START:8430/cntlEDITOR/shellcont/shell")
For i = 1 To ABAPEditor.GetLineCount
If InStr(ABAPEditor.GetLineText(i), strSearch) Then
ABAPEditor.ScrollToLine i
ABAPEditor.insertText "" & vbCrLf & "", i, Len(ABAPEditor.GetLineText(i)) + 1
ABAPEditor.insertText strAdd, i + 1, 1
End If
Next
In a loop I search for the code and if it was found I scroll to the line, insert a line break and add the new code in the next line.
Best regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.