Generating SAP report based on Excel file

Hello,

I want to generate reports from “SAP Business Client 8.00” based on information in Excel files.

What I did so far:

  1. I’ve downloaded excel data using Read Range
  2. I’ve filtered data table based on type of report that I’ll use
  3. I’ve keep only columns that will be used for generating report (Plant and Valuation classes/accounts). Data are saved as argument and DataTable.
  4. Using For Each Row in Data Table, I’ve started going through “SAP Business Client 8.00” (opening program, choosing region, selecting report).

Now I’m in report page where I need to enter Plant and Valuation classes/accounts.

What I should do to type/enter Plant and Valuation classes/accounts based on Excel?
From process streamlining perspective should I first open "“SAP Business Client 8.00” and then download data from Excel?

@jakub.jablonski

So basically if I understand correctly in the loop you want to enter the plants and other info…which you can get from currentRow("ColumnName").ToString

And yes it would be good if you can login to sap and then perform all steps as you need sap to be logged in always

Cheers

Many thanks! This is what I need.

One more question.

Is it possible to:

  1. Take only first position from data table to initiate downloading of report?
    Then
  2. Start the loop from second position?

In one report I need to download report from BW, but then I can use Excel to perform further downloads (which I guess is more effective than launching again BW to download next reports).

@jakub.jablonski

  1. Dt.Rows(0)("ColumnName").ToString will give only first row required columns
  2. Then assign with dt = dt.AsEnumerable.skip(1).CopyToDatatable will remove firstrow so that you can start loop from second

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.