I need to capture data from excel comparing headers of excel with SAP Tcode and save the data from Excel to SAP Tcode

#1

I have an Excel Attachment . I need to extract the excel data into SAP Tcode field. It needs to be compared with the excel header and SAP Tcode corresponding name . I need to find the header same name and SAP Tcode corresponding name and then save it in SAP Tcode field

#2

Hello There,

First, you will have to read an excel file by checking property ‘AddHealders’. then you can compare Tcode names and last you can dump excel data in SAP.

Cheers,
Pankaj

#3

I am reading Excel file by Excel Application Scope and then using Read Range Activity by clicking on Add Headers. My next question is how to compare Excel headers with SAP Tcode name . Which activity I need to use to compare

#4

see, the Tcode that you type in tcode text field in sap that you have to put in config/excel/asset file, read that file and values will be stored in a variable then you can compare tcode value and excel header.

Scenario,
Excel
Header1 Header2
123 987

Config

Above values will be a variable,
String headerExcel = “Header1”
String headerCfg = “Header1”

If(String.Compare(headerExcel , headerCfg)){
// Type header in SAP
else
// do something else
}