cancel
Showing results for 
Search instead for 
Did you mean: 

How to run a Transaction and pass data from excel file

0 Kudos

hello everbody

I want to access to CV01N to upload a file in SAP. but I want to do it by a VBS and put all the necessary data in excel file and run this VBS to read the Excel file and do this Transaction.

As you know in this transaction first it has a initiation. so in first page I can pass data from Excel to SAP by passing data like : name , type , 000, revision

but in the second page of this transaction it ask a description(I am ok with it) and then ask path and name of the file to upload. this make a problem

I have to open a dialog box and find manually the file to upload . I would like to add the path and file name like: c:/data /myfile.txt and put it the same as other data in excel . here is the line related :

session.findById("wnd[0]/usr/tabsTAB_MAIN/tabpTSMAIN/ssubSCR_MAIN:SAPLCV110:0102/btnPB_FILE_CREATE").press

is there any body who know how to change this line to be like:    session. ......= "c:/data /myfile.txt"

Thank you in advance

Mitra

Accepted Solutions (0)

Answers (2)

Answers (2)

yuki_wang
Active Participant
0 Kudos

Hi Mitra,

If you use 'Scrip recording and playback', if you select "c:/data /myfile.txt" for file upload when recording, "c:/data /myfile.txt" should be remembered. You will need not to change the path every time.

Matt_Fraser
Active Contributor
0 Kudos

Is there a reason you can't use LSMW instead of VBS to automate uploading the file through the transaction?

0 Kudos

Hi Matt

I don't know if there is another way , easier than  'Scrip recording and playback' and put it in VBS program to use some variable which already read from an Excel file.

let me know what is the best way to automatically do the some Transaction in SAP several time?

I am trying  to understand this :http://www.innowera.com/

also . that's it.

Thanks