With the cmdlet ‘Get-CmSAPTable’ you have the possibility to read out the entries of a SAP table.
You have to specify the name of the table of which you want retrieve the data.
There are also two options to select the entries:
- Fields: Represents the fields that are retrieved
- WhereClause: SQL statement for fetching the data
PS C:Userszacharias.kopidakis> Add-PSSnapin Cmcmdlets PS C:Userszacharias.kopidakis> $con = Get-CmSapConnect -UserName admin -Password ***** -Language EN -Client 100 -Host ERP.REDFRUIT.CORP -SystemNumber 00 PS C:Userszacharias.kopidakis> Get-CmSapTable -CmSapConnect $con -Name RZLLITAB -Fields CLASSNAME,APPLSERVER,GROUPTYPE -WhereClause "GROUPTYPE = '' OR CLASSNAME like'%2'" CLASSNAME APPLSERVER GROUPTYPE --------- ---------- --------- Group2 ERPDI01_EC1_05 S Group2 ERP_EC1_03 S Group2 ERP_EC1_04 S SMLG ERP_EC1_00 TEST ERPDI01_EC1_05