cancel
Showing results for 
Search instead for 
Did you mean: 

Copy data from SAP CRM Questionnaire to Excel

Former Member
0 Kudos

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!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

@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?

thomas_brutigam2
Active Participant
0 Kudos

@catalin

I think yes-

but i need to try @work ...

dont have SAP @home (only NW 7.1 without anything) ...

So during next week i can test and If i'm lucky im gonna post the Results here ...

cya

Thomas Br

thomas_brutigam2
Active Participant
0 Kudos

I'm sorry

but I cant report anything good from the uc Front ...

That damn thing is waterproof

cant get anything of ...

by the way

The Data shown in the Questionary -

Is it only avaiable in that "Report" or is it possible to get the Data you need via any other Transactions ?

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

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

Former Member
0 Kudos

This message was moderated.

script_man
Active Contributor
0 Kudos

Hi Catalin,

Please look at the following link:

You might get some ideas for your solution.

Regards,

ScriptMan

thomas_brutigam2
Active Participant
0 Kudos

@ Scriptman,

that is not the problem ... i think,

He (?) needs to get the Html-Text inside the Control