Skip to Content
avatar image
Former Member

How to run a Transaction and pass data from excel file

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 03, 2014 at 02:15 PM

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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Jun 09, 2014 at 07:59 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded