on 07-27-2011 12:41 AM
Hi all,
I did some searching around here, but I didn't manage to find the issue that I'm having...
I'm trying to record a script that does the following things:
1. Open Tcode: CRMD_ORDER (DONE)
2. Open an id entered in an inputbox (wscript) or certain cell in Excel (DONE)
3. Go to Questionnaire tab (DONE)
4. Copy certain fields data and paste them in Excel (PROBLEM ...)
How do I select and copy the desired data?
The questionnaire is a web page...so..
I can't use the scripting wizzard to identify scripting objects.
I can't use right click -> Export to Microsoft Excel.
What can I do?
5. Attach file in attachment tab (if I manage to overcome step 4)
Any help is appreciated!
@ScriptMan
That post is usefull for transferring data to/from excel, but i can't get the data from the HTML questionnaire (there is no id for a field in the html questionnaire - I used Merlin).
I need to find a way to save the html questionnaire to local pc to a specific path with a specific name, then I can read the file line by line and get the necessary data through vbs.
I'm thinking about using sendkeys method to do something like:
mouse right click -> view source -> save as ... -> save to specific path with specific name
set WshShell = WScript.CreateObject("WScript.Shell";)
WshShell.SendKeys("+{F10}")
The problem is that I don't get the right click menu of the html page.
Here mouse position could be an issue.
@Thomas
1.He
2.That is what I need. Do you know any way of doing that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
I don't have SAP at home and at work I was pretty busy. l still want to try a couple of things, if that will do the job I'll post the results here.
I have limited access to SAP tcodes, but i'll try to find out if there is some other transaction code to get the required data.
Thanks for your help
I didn't manage to find a solution, but got a workaround for this..
1.The user right clicks the questionnaire and goes to view source.
2.Hits ctrlshiftM
Job done
I have created vbs file which has a shortcut in windows activated by the ctrlshiftM combination. The vbs file sends the keys for FILE > SAVE AS (used sendkeys method) and saves the file to the users desktop with the name new client.html.
[url]http://blogs.technet.com/b/heyscriptingguy/archive/2005/01/25/how-can-i-read-just-a-single-specified-line-from-a-text-file.aspx[url]
Starting from this article about reading specific line from a text file I tracked down the necesary lines and extracted only the data that I need (used LEFT,MID,INSTR).
After I have the necesary data stored into variables it is simple to open a specific excel fill and copy the data to specific cells.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tom,
Thanks for your suggestion, but I want to be able to do this without the use of any of third party apps.
Looking through other forum threads I noticed you recomended this app for similar situations, but installing such an app at work isn't possible. I tried this on my own computer and it really is a great app.
Regards,
Catalin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.