Coverage for mindsdb / integrations / handlers / sap_erp_handler / sap_erp_tables.py: 0%

517 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-21 00:36 +0000

1from typing import List 

2 

3import pandas as pd 

4from mindsdb_sql_parser import ast 

5 

6from mindsdb.integrations.utilities.handlers.query_utilities import ( 

7 SELECTQueryExecutor, 

8 SELECTQueryParser, 

9) 

10from mindsdb.integrations.libs.api_handler import APIHandler, APITable 

11from mindsdb.integrations.utilities.sql_utils import conditions_to_filter 

12 

13 

14class CustomAPITable(APITable): 

15 

16 def __init__(self, handler: APIHandler): 

17 super().__init__(handler) 

18 self.handler.connect() 

19 

20 def get_columns(self, ignore: List[str] = []) -> List[str]: 

21 return [item for item in self.columns if item not in ignore] 

22 

23 def select(self, query: ast.Select) -> pd.DataFrame: 

24 raise NotImplementedError() 

25 

26 def parse_select(self, query: ast.Select, table_name: str): 

27 select_statement_parser = SELECTQueryParser(query, table_name, self.get_columns()) 

28 self.selected_columns, self.where_conditions, self.order_by_conditions, self.result_limit = select_statement_parser.parse_query() 

29 

30 def get_where_param(self, query: ast.Select, param: str): 

31 params = conditions_to_filter(query.where) 

32 if param not in params: 

33 raise Exception(f"WHERE condition does not have '{param}' selector") 

34 return params[param] 

35 

36 def apply_query_params(self, df, query): 

37 select_statement_parser = SELECTQueryParser(query, self.name, self.get_columns()) 

38 selected_columns, _, order_by_conditions, result_limit = select_statement_parser.parse_query() 

39 select_statement_executor = SELECTQueryExecutor(df, selected_columns, [], order_by_conditions, result_limit) 

40 return select_statement_executor.execute_query() 

41 

42 

43class AddressEmailAddressTable(CustomAPITable): 

44 """Email address data linked to all business partner address records in the system""" 

45 

46 name: str = "address_email_address" 

47 columns: List[str] = [ 

48 "id", 

49 "uri", 

50 "type", 

51 "AddressID", 

52 "Person", 

53 "OrdinalNumber", 

54 "IsDefaultEmailAddress", 

55 "EmailAddress", 

56 "SearchEmailAddress", 

57 "AddressCommunicationRemarkText", 

58 ] 

59 

60 def __init__(self, handler: APIHandler): 

61 super().__init__(handler) 

62 self.connection = self.handler.connect() 

63 

64 def select(self, query: ast.Select) -> pd.DataFrame: 

65 data = self.connection.get("A_AddressEmailAddress") 

66 df = pd.DataFrame.from_records(data) 

67 return self.apply_query_params(df, query) 

68 

69 

70class AddressFaxNumberTable(CustomAPITable): 

71 """Fax address data linked to all the business partner address records in the system""" 

72 

73 name: str = "address_fax_number" 

74 columns: List[str] = [ 

75 "id", 

76 "uri", 

77 "type", 

78 "AddressID", 

79 "Person", 

80 "OrdinalNumber", 

81 "IsDefaultFaxNumber", 

82 "FaxCountry", 

83 "FaxNumber", 

84 "FaxNumberExtension", 

85 "InternationalFaxNumber", 

86 "AddressCommunicationRemarkText", 

87 ] 

88 

89 def __init__(self, handler: APIHandler): 

90 super().__init__(handler) 

91 self.connection = self.handler.connect() 

92 

93 def select(self, query: ast.Select) -> pd.DataFrame: 

94 data = self.connection.get("A_AddressFaxNumber") 

95 df = pd.DataFrame.from_records(data) 

96 return self.apply_query_params(df, query) 

97 

98 

99class AddressHomePageURLTable(CustomAPITable): 

100 """Home page URL address records linked to all business partner address records in the system""" 

101 

102 name: str = "address_home_page" 

103 columns: List[str] = [ 

104 "id", 

105 "uri", 

106 "type", 

107 "AddressID", 

108 "Person", 

109 "OrdinalNumber", 

110 "ValidityStartDate", 

111 "IsDefaultURLAddress", 

112 "SearchURLAddress", 

113 "AddressCommunicationRemarkText", 

114 "URLFieldLength", 

115 "WebsiteURL", 

116 ] 

117 

118 def __init__(self, handler: APIHandler): 

119 super().__init__(handler) 

120 self.connection = self.handler.connect() 

121 

122 def select(self, query: ast.Select) -> pd.DataFrame: 

123 data = self.connection.get("A_AddressHomePageURL") 

124 df = pd.DataFrame.from_records(data) 

125 return self.apply_query_params(df, query) 

126 

127 

128class AddressPhoneNumberTable(CustomAPITable): 

129 """All the mobile/telephone address records linked to all the business partner address records in the system""" 

130 

131 name: str = "address_phone_number" 

132 columns: List[str] = [ 

133 "id", 

134 "uri", 

135 "type", 

136 "AddressID", 

137 "Person", 

138 "OrdinalNumber", 

139 "DestinationLocationCountry", 

140 "IsDefaultPhoneNumber", 

141 "PhoneNumber", 

142 "PhoneNumberExtension", 

143 "InternationalPhoneNumber", 

144 "PhoneNumberType", 

145 "AddressCommunicationRemarkText", 

146 ] 

147 

148 def __init__(self, handler: APIHandler): 

149 super().__init__(handler) 

150 self.connection = self.handler.connect() 

151 

152 def select(self, query: ast.Select) -> pd.DataFrame: 

153 data = self.connection.get("A_AddressPhoneNumber") 

154 df = pd.DataFrame.from_records(data) 

155 return self.apply_query_params(df, query) 

156 

157 

158class BPAddrDepdntIntlLocNumberTable(CustomAPITable): 

159 """address dependent data for the business partner address by using the key fields business partner number and address ID""" 

160 

161 name: str = "bp_addr_depdnt_intl_loc_number" 

162 columns: List[str] = [ 

163 "id", 

164 "uri", 

165 "type", 

166 "BusinessPartner", 

167 "AddressID", 

168 "InternationalLocationNumber1", 

169 "InternationalLocationNumber2", 

170 "InternationalLocationNumber3", 

171 ] 

172 

173 def __init__(self, handler: APIHandler): 

174 super().__init__(handler) 

175 self.connection = self.handler.connect() 

176 

177 def select(self, query: ast.Select) -> pd.DataFrame: 

178 data = self.connection.get("A_BPAddrDepdntIntlLocNumber") 

179 df = pd.DataFrame.from_records(data) 

180 return self.apply_query_params(df, query) 

181 

182 

183class BPContactToAddressTable(CustomAPITable): 

184 """Workplace address records linked to all the business partner contact records in the system.""" 

185 

186 name: str = "bp_contact_to_address" 

187 columns: List[str] = [ 

188 "id", 

189 "uri", 

190 "type", 

191 "RelationshipNumber", 

192 "BusinessPartnerCompany", 

193 "BusinessPartnerPerson", 

194 "ValidityEndDate", 

195 "AddressID", 

196 "AddressNumber", 

197 "AdditionalStreetPrefixName", 

198 "AdditionalStreetSuffixName", 

199 "AddressTimeZone", 

200 "CareOfName", 

201 "CityCode", 

202 "CityName", 

203 "CompanyPostalCode", 

204 "Country", 

205 "County", 

206 "DeliveryServiceNumber", 

207 "DeliveryServiceTypeCode", 

208 "District", 

209 "FormOfAddress", 

210 "FullName", 

211 "HomeCityName", 

212 "HouseNumber", 

213 "HouseNumberSupplementText", 

214 "Language", 

215 "POBox", 

216 "POBoxDeviatingCityName", 

217 "POBoxDeviatingCountry", 

218 "POBoxDeviatingRegion", 

219 "POBoxIsWithoutNumber", 

220 "POBoxLobbyName", 

221 "POBoxPostalCode", 

222 "Person", 

223 "PostalCode", 

224 "PrfrdCommMediumType", 

225 "Region", 

226 "StreetName", 

227 "StreetPrefixName", 

228 "StreetSuffixName", 

229 "TaxJurisdiction", 

230 "TransportZone", 

231 "AddressRepresentationCode", 

232 "ContactPersonBuilding", 

233 "ContactPersonPrfrdCommMedium", 

234 "ContactRelationshipDepartment", 

235 "ContactRelationshipFunction", 

236 "CorrespondenceShortName", 

237 "Floor", 

238 "InhouseMail", 

239 "IsDefaultAddress", 

240 "RoomNumber", 

241 ] 

242 

243 def __init__(self, handler: APIHandler): 

244 super().__init__(handler) 

245 self.connection = self.handler.connect() 

246 

247 def select(self, query: ast.Select) -> pd.DataFrame: 

248 data = self.connection.get("A_BPContactToAddress") 

249 df = pd.DataFrame.from_records(data) 

250 return self.apply_query_params(df, query) 

251 

252 

253class BPContactToFuncAndDeptTable(CustomAPITable): 

254 """Contact person department and function data linked to all business partner contact records in the system""" 

255 

256 name: str = "bp_contact_to_func_and_dept" 

257 columns: List[str] = [ 

258 "id", 

259 "uri", 

260 "type", 

261 "RelationshipNumber", 

262 "BusinessPartnerCompany", 

263 "BusinessPartnerPerson", 

264 "ValidityEndDate", 

265 "ContactPersonAuthorityType", 

266 "ContactPersonDepartment", 

267 "ContactPersonDepartmentName", 

268 "ContactPersonFunction", 

269 "ContactPersonFunctionName", 

270 "ContactPersonRemarkText", 

271 "ContactPersonVIPType", 

272 "EmailAddress", 

273 "FaxNumber", 

274 "FaxNumberExtension", 

275 "PhoneNumber", 

276 "PhoneNumberExtension", 

277 "RelationshipCategory", 

278 ] 

279 

280 def __init__(self, handler: APIHandler): 

281 super().__init__(handler) 

282 self.connection = self.handler.connect() 

283 

284 def select(self, query: ast.Select) -> pd.DataFrame: 

285 data = self.connection.get("A_BPContactToFuncAndDept") 

286 df = pd.DataFrame.from_records(data) 

287 return self.apply_query_params(df, query) 

288 

289 

290class BPCreditWorthinessTable(CustomAPITable): 

291 """Contact person department and function data linked to all business partner contact records in the system""" 

292 

293 name: str = "bp_credit_worthiness" 

294 columns: List[str] = [ 

295 "id", 

296 "uri", 

297 "type", 

298 "BusinessPartner", 

299 "BusPartCreditStanding", 

300 "BPCreditStandingStatus", 

301 "CreditRatingAgency", 

302 "BPCreditStandingComment", 

303 "BPCreditStandingDate", 

304 "BPCreditStandingRating", 

305 "BPLegalProceedingStatus", 

306 "BPLglProceedingInitiationDate", 

307 "BusinessPartnerIsUnderOath", 

308 "BusinessPartnerOathDate", 

309 "BusinessPartnerIsBankrupt", 

310 "BusinessPartnerBankruptcyDate", 

311 "BPForeclosureIsInitiated", 

312 "BPForeclosureDate", 

313 "BPCrdtWrthnssAccessChkIsActive", 

314 ] 

315 

316 def __init__(self, handler: APIHandler): 

317 super().__init__(handler) 

318 self.connection = self.handler.connect() 

319 

320 def select(self, query: ast.Select) -> pd.DataFrame: 

321 data = self.connection.get("A_BPCreditWorthiness") 

322 df = pd.DataFrame.from_records(data) 

323 return self.apply_query_params(df, query) 

324 

325 

326class BPDataControllerTable(CustomAPITable): 

327 """Business partner data controllers of all the available records linked to business partners in the system""" 

328 

329 name: str = "bp_data_controller" 

330 columns: List[str] = [ 

331 "id", 

332 "uri", 

333 "type", 

334 "BusinessPartner", 

335 "DataController", 

336 "PurposeForPersonalData", 

337 "DataControlAssignmentStatus", 

338 "BPDataControllerIsDerived", 

339 "PurposeDerived", 

340 "PurposeType", 

341 "BusinessPurposeFlag", 

342 ] 

343 

344 def __init__(self, handler: APIHandler): 

345 super().__init__(handler) 

346 self.connection = self.handler.connect() 

347 

348 def select(self, query: ast.Select) -> pd.DataFrame: 

349 data = self.connection.get("A_BPDataController") 

350 df = pd.DataFrame.from_records(data) 

351 return self.apply_query_params(df, query) 

352 

353 

354class BPFinancialServicesExtnTable(CustomAPITable): 

355 """Financial services business partner attributes of all the available records linked to business partners in the system""" 

356 

357 name: str = "bp_financial_services_extn" 

358 columns: List[str] = [ 

359 "id", 

360 "uri", 

361 "type", 

362 "BusinessPartner", 

363 "BusinessPartnerIsVIP", 

364 "TradingPartner", 

365 "FactoryCalendar", 

366 "BusinessPartnerOfficeCountry", 

367 "BusinessPartnerOfficeRegion", 

368 "BPRegisteredOfficeName", 

369 "BPBalanceSheetCurrency", 

370 "BPLastCptlIncrAmtInBalShtCrcy", 

371 "BPLastCapitalIncreaseYear", 

372 "BPBalanceSheetDisplayType", 

373 "BusinessPartnerCitizenship", 

374 "BPMaritalPropertyRegime", 

375 "BusinessPartnerIncomeCurrency", 

376 "BPNumberOfChildren", 

377 "BPNumberOfHouseholdMembers", 

378 "BPAnnualNetIncAmtInIncomeCrcy", 

379 "BPMonthlyNetIncAmtInIncomeCrcy", 

380 "BPAnnualNetIncomeYear", 

381 "BPMonthlyNetIncomeMonth", 

382 "BPMonthlyNetIncomeYear", 

383 "BPPlaceOfDeathName", 

384 "CustomerIsUnwanted", 

385 "UndesirabilityReason", 

386 "UndesirabilityComment", 

387 "LastCustomerContactDate", 

388 "BPGroupingCharacter", 

389 "BPLetterSalutation", 

390 "BusinessPartnerTargetGroup", 

391 "BusinessPartnerEmployeeGroup", 

392 "BusinessPartnerIsEmployee", 

393 "BPTermnBusRelationsBankDate", 

394 ] 

395 

396 def __init__(self, handler: APIHandler): 

397 super().__init__(handler) 

398 self.connection = self.handler.connect() 

399 

400 def select(self, query: ast.Select) -> pd.DataFrame: 

401 data = self.connection.get("A_BPFinancialServicesExtn") 

402 df = pd.DataFrame.from_records(data) 

403 return self.apply_query_params(df, query) 

404 

405 

406class BPFinancialServicesReportingTable(CustomAPITable): 

407 """Financial services reporting attributes of all the available records linked to business partners in the system""" 

408 

409 name: str = "bp_financial_services_reporting" 

410 columns: List[str] = [ 

411 "id", 

412 "uri", 

413 "type", 

414 "BusinessPartner", 

415 "BPIsNonResident", 

416 "BPNonResidencyStartDate", 

417 "BPIsMultimillionLoanRecipient", 

418 "BPLoanReportingBorrowerNumber", 

419 "BPLoanRptgBorrowerEntityNumber", 

420 "BPCreditStandingReview", 

421 "BPCreditStandingReviewDate", 

422 "BusinessPartnerLoanToManager", 

423 "BPCompanyRelationship", 

424 "BPLoanReportingCreditorNumber", 

425 "BPOeNBIdentNumber", 

426 "BPOeNBTargetGroup", 

427 "BPOeNBIdentNumberAssigned", 

428 "BPOeNBInstituteNumber", 

429 "BusinessPartnerIsOeNBInstitute", 

430 "BusinessPartnerGroup", 

431 "BPGroupAssignmentCategory", 

432 "BusinessPartnerGroupName", 

433 "BusinessPartnerLegalEntity", 

434 "BPGerAstRglnRestrictedAstQuota", 

435 "BusinessPartnerDebtorGroup", 

436 "BusinessPartnerBusinessPurpose", 

437 "BusinessPartnerRiskGroup", 

438 "BPRiskGroupingDate", 

439 "BPHasGroupAffiliation", 

440 "BPIsMonetaryFinInstitution", 

441 "BPCrdtStandingReviewIsRequired", 

442 "BPLoanMonitoringIsRequired", 

443 "BPHasCreditingRelief", 

444 "BPInvestInRstrcdAstIsAuthzd", 

445 "BPCentralBankCountryRegion", 

446 ] 

447 

448 def __init__(self, handler: APIHandler): 

449 super().__init__(handler) 

450 self.connection = self.handler.connect() 

451 

452 def select(self, query: ast.Select) -> pd.DataFrame: 

453 data = self.connection.get("A_BPFinancialServicesReporting") 

454 df = pd.DataFrame.from_records(data) 

455 return self.apply_query_params(df, query) 

456 

457 

458class BPFiscalYearInformationTable(CustomAPITable): 

459 """Business partner fiscal year information of all the available records linked to business partners in the system.""" 

460 

461 name: str = "bp_fiscal_year_information" 

462 columns: List[str] = [ 

463 "id", 

464 "uri", 

465 "type", 

466 "BusinessPartner", 

467 "BusinessPartnerFiscalYear", 

468 "BPBalanceSheetCurrency", 

469 "BPAnnualStockholderMeetingDate", 

470 "BPFiscalYearStartDate", 

471 "BPFiscalYearEndDate", 

472 "BPFiscalYearIsClosed", 

473 "BPFiscalYearClosingDate", 

474 "BPFsclYrCnsldtdFinStatementDte", 

475 "BPCapitalStockAmtInBalShtCrcy", 

476 "BPIssdStockCptlAmtInBalShtCrcy", 

477 "BPPartcipnCertAmtInBalShtCrcy", 

478 "BPEquityCapitalAmtInBalShtCrcy", 

479 "BPGrossPremiumAmtInBalShtCrcy", 

480 "BPNetPremiumAmtInBalShtCrcy", 

481 "BPAnnualSalesAmtInBalShtCrcy", 

482 "BPAnnualNetIncAmtInBalShtCrcy", 

483 "BPDividendDistrAmtInBalShtCrcy", 

484 "BPDebtRatioInYears", 

485 "BPAnnualPnLAmtInBalShtCrcy", 

486 "BPBalSheetTotalAmtInBalShtCrcy", 

487 "BPNumberOfEmployees", 

488 "BPCptlReserveAmtInBalShtCrcy", 

489 "BPLglRevnRsrvAmtInBalShtCrcy", 

490 "RevnRsrvOwnStkAmtInBalShtCrcy", 

491 "BPStatryReserveAmtInBalShtCrcy", 

492 "BPOthRevnRsrvAmtInBalShtCrcy", 

493 "BPPnLCarryfwdAmtInBalShtCrcy", 

494 "BPSuborddLbltyAmtInBalShtCrcy", 

495 "BPRetOnTotalCptlEmpldInPercent", 

496 "BPDebtClearancePeriodInYears", 

497 "BPFinancingCoeffInPercent", 

498 "BPEquityRatioInPercent", 

499 ] 

500 

501 def __init__(self, handler: APIHandler): 

502 super().__init__(handler) 

503 self.connection = self.handler.connect() 

504 

505 def select(self, query: ast.Select) -> pd.DataFrame: 

506 data = self.connection.get("A_BPFiscalYearInformation") 

507 df = pd.DataFrame.from_records(data) 

508 return self.apply_query_params(df, query) 

509 

510 

511class BPRelationshipTable(CustomAPITable): 

512 """Business partner relationship data fields of all the available records in the system""" 

513 

514 name: str = "bp_relationship" 

515 columns: List[str] = [ 

516 "id", 

517 "uri", 

518 "type", 

519 "RelationshipNumber", 

520 "BusinessPartner1", 

521 "BusinessPartner2", 

522 "ValidityEndDate", 

523 "ValidityStartDate", 

524 "IsStandardRelationship", 

525 "RelationshipCategory", 

526 "BPRelationshipType", 

527 "CreatedByUser", 

528 "CreationDate", 

529 "CreationTime", 

530 "LastChangedByUser", 

531 "LastChangeDate", 

532 "LastChangeTime", 

533 ] 

534 

535 def __init__(self, handler: APIHandler): 

536 super().__init__(handler) 

537 self.connection = self.handler.connect() 

538 

539 def select(self, query: ast.Select) -> pd.DataFrame: 

540 data = self.connection.get("A_BPRelationship") 

541 df = pd.DataFrame.from_records(data) 

542 return self.apply_query_params(df, query) 

543 

544 

545class BuPaAddressUsageTable(CustomAPITable): 

546 """All the address usage records linked to all business partner address records in the system""" 

547 

548 name: str = "bu_pa_address_usage" 

549 columns: List[str] = [ 

550 "id", 

551 "uri", 

552 "type", 

553 "BusinessPartner", 

554 "ValidityEndDate", 

555 "AddressUsage", 

556 "AddressID", 

557 "ValidityStartDate", 

558 "StandardUsage", 

559 "AuthorizationGroup", 

560 ] 

561 

562 def __init__(self, handler: APIHandler): 

563 super().__init__(handler) 

564 self.connection = self.handler.connect() 

565 

566 def select(self, query: ast.Select) -> pd.DataFrame: 

567 data = self.connection.get("A_BuPaAddressUsage") 

568 df = pd.DataFrame.from_records(data) 

569 return self.apply_query_params(df, query) 

570 

571 

572class BuPaIdentificationTable(CustomAPITable): 

573 """Business partner identification data fields of all the records available records in the system""" 

574 

575 name: str = "bu_pa_identification" 

576 columns: List[str] = [ 

577 "id", 

578 "uri", 

579 "type", 

580 "BusinessPartner", 

581 "BPIdentificationType", 

582 "BPIdentificationNumber", 

583 "BPIdnNmbrIssuingInstitute", 

584 "BPIdentificationEntryDate", 

585 "Country", 

586 "Region", 

587 "ValidityStartDate", 

588 "ValidityEndDate", 

589 "AuthorizationGroup", 

590 ] 

591 

592 def __init__(self, handler: APIHandler): 

593 super().__init__(handler) 

594 self.connection = self.handler.connect() 

595 

596 def select(self, query: ast.Select) -> pd.DataFrame: 

597 data = self.connection.get("A_BuPaIdentification") 

598 df = pd.DataFrame.from_records(data) 

599 return self.apply_query_params(df, query) 

600 

601 

602class BuPaIndustryTable(CustomAPITable): 

603 """Business partner industry data fields of all the available records in the system""" 

604 

605 name: str = "bu_pa_industry" 

606 columns: List[str] = [ 

607 "id", 

608 "uri", 

609 "type", 

610 "IndustrySector", 

611 "IndustrySystemType", 

612 "BusinessPartner", 

613 "IsStandardIndustry", 

614 "IndustryKeyDescription", 

615 ] 

616 

617 def __init__(self, handler: APIHandler): 

618 super().__init__(handler) 

619 self.connection = self.handler.connect() 

620 

621 def select(self, query: ast.Select) -> pd.DataFrame: 

622 data = self.connection.get("A_BuPaIndustry") 

623 df = pd.DataFrame.from_records(data) 

624 return self.apply_query_params(df, query) 

625 

626 

627class BusinessPartnerTable(CustomAPITable): 

628 """General data fields of all the business partner records available in the system""" 

629 

630 name: str = "business_partner" 

631 columns: List[str] = [ 

632 "id", 

633 "uri", 

634 "type", 

635 "BusinessPartner", 

636 "Customer", 

637 "Supplier", 

638 "AcademicTitle", 

639 "AuthorizationGroup", 

640 "BusinessPartnerCategory", 

641 "BusinessPartnerFullName", 

642 "BusinessPartnerGrouping", 

643 "BusinessPartnerName", 

644 "BusinessPartnerUUID", 

645 "CorrespondenceLanguage", 

646 "CreatedByUser", 

647 "CreationDate", 

648 "CreationTime", 

649 "FirstName", 

650 "FormOfAddress", 

651 "Industry", 

652 "InternationalLocationNumber1", 

653 "InternationalLocationNumber2", 

654 "IsFemale", 

655 "IsMale", 

656 "IsNaturalPerson", 

657 "IsSexUnknown", 

658 "GenderCodeName", 

659 "Language", 

660 "LastChangeDate", 

661 "LastChangeTime", 

662 "LastChangedByUser", 

663 "LastName", 

664 "LegalForm", 

665 "OrganizationBPName1", 

666 "OrganizationBPName2", 

667 "OrganizationBPName3", 

668 "OrganizationBPName4", 

669 "OrganizationFoundationDate", 

670 "OrganizationLiquidationDate", 

671 "SearchTerm1", 

672 "SearchTerm2", 

673 "AdditionalLastName", 

674 "BirthDate", 

675 "BusinessPartnerBirthDateStatus", 

676 "BusinessPartnerBirthplaceName", 

677 "BusinessPartnerDeathDate", 

678 "BusinessPartnerIsBlocked", 

679 "BusinessPartnerType", 

680 "ETag", 

681 "GroupBusinessPartnerName1", 

682 "GroupBusinessPartnerName2", 

683 "IndependentAddressID", 

684 "InternationalLocationNumber3", 

685 "MiddleName", 

686 "NameCountry", 

687 "NameFormat", 

688 "PersonFullName", 

689 "PersonNumber", 

690 "IsMarkedForArchiving", 

691 "BusinessPartnerIDByExtSystem", 

692 "BusinessPartnerPrintFormat", 

693 "BusinessPartnerOccupation", 

694 "BusPartMaritalStatus", 

695 "BusPartNationality", 

696 "BusinessPartnerBirthName", 

697 "BusinessPartnerSupplementName", 

698 "NaturalPersonEmployerName", 

699 "LastNamePrefix", 

700 "LastNameSecondPrefix", 

701 "Initials", 

702 "BPDataControllerIsNotRequired", 

703 "TradingPartner", 

704 ] 

705 

706 def __init__(self, handler: APIHandler): 

707 super().__init__(handler) 

708 self.connection = self.handler.connect() 

709 

710 def select(self, query: ast.Select) -> pd.DataFrame: 

711 data = self.connection.get("A_BusinessPartner") 

712 df = pd.DataFrame.from_records(data) 

713 return self.apply_query_params(df, query) 

714 

715 

716class BusinessPartnerAddressTable(CustomAPITable): 

717 """Business partner address data fields of all the available records in the system""" 

718 

719 name: str = "business_partner_address" 

720 columns: List[str] = [ 

721 "id", 

722 "uri", 

723 "type", 

724 "BusinessPartner", 

725 "AddressID", 

726 "ValidityStartDate", 

727 "ValidityEndDate", 

728 "AuthorizationGroup", 

729 "AddressUUID", 

730 "AdditionalStreetPrefixName", 

731 "AdditionalStreetSuffixName", 

732 "AddressTimeZone", 

733 "CareOfName", 

734 "CityCode", 

735 "CityName", 

736 "CompanyPostalCode", 

737 "Country", 

738 "County", 

739 "DeliveryServiceNumber", 

740 "DeliveryServiceTypeCode", 

741 "District", 

742 "FormOfAddress", 

743 "FullName", 

744 "HomeCityName", 

745 "HouseNumber", 

746 "HouseNumberSupplementText", 

747 "Language", 

748 "POBox", 

749 "POBoxDeviatingCityName", 

750 "POBoxDeviatingCountry", 

751 "POBoxDeviatingRegion", 

752 "POBoxIsWithoutNumber", 

753 "POBoxLobbyName", 

754 "POBoxPostalCode", 

755 "Person", 

756 "PostalCode", 

757 "PrfrdCommMediumType", 

758 "Region", 

759 "StreetName", 

760 "StreetPrefixName", 

761 "StreetSuffixName", 

762 "TaxJurisdiction", 

763 "TransportZone", 

764 "AddressIDByExternalSystem", 

765 "CountyCode", 

766 "TownshipCode", 

767 "TownshipName", 

768 ] 

769 

770 def __init__(self, handler: APIHandler): 

771 super().__init__(handler) 

772 self.connection = self.handler.connect() 

773 

774 def select(self, query: ast.Select) -> pd.DataFrame: 

775 data = self.connection.get("A_BusinessPartnerAddress") 

776 df = pd.DataFrame.from_records(data) 

777 return self.apply_query_params(df, query) 

778 

779 

780class BusinessPartnerContactTable(CustomAPITable): 

781 """Business partner contact data fields of all the available records in the system""" 

782 

783 name: str = "business_partner_contact" 

784 columns: List[str] = [ 

785 "id", 

786 "uri", 

787 "type", 

788 "RelationshipNumber", 

789 "BusinessPartnerCompany", 

790 "BusinessPartnerPerson", 

791 "ValidityEndDate", 

792 "ValidityStartDate", 

793 "IsStandardRelationship", 

794 "RelationshipCategory", 

795 ] 

796 

797 def __init__(self, handler: APIHandler): 

798 super().__init__(handler) 

799 self.connection = self.handler.connect() 

800 

801 def select(self, query: ast.Select) -> pd.DataFrame: 

802 data = self.connection.get("A_BusinessPartnerContact") 

803 df = pd.DataFrame.from_records(data) 

804 return self.apply_query_params(df, query) 

805 

806 

807class BusinessPartnerPaymentCardTable(CustomAPITable): 

808 """Business partner payment card data fields of all the available records in the system""" 

809 

810 name: str = "business_partner_payment_card" 

811 columns: List[str] = [ 

812 "id", 

813 "uri", 

814 "type", 

815 "BusinessPartner", 

816 "PaymentCardID", 

817 "PaymentCardType", 

818 "CardNumber", 

819 "IsStandardCard", 

820 "CardDescription", 

821 "ValidityDate", 

822 "ValidityEndDate", 

823 "CardHolder", 

824 "CardIssuingBank", 

825 "CardIssueDate", 

826 "PaymentCardLock", 

827 "MaskedCardNumber", 

828 ] 

829 

830 def __init__(self, handler: APIHandler): 

831 super().__init__(handler) 

832 self.connection = self.handler.connect() 

833 

834 def select(self, query: ast.Select) -> pd.DataFrame: 

835 data = self.connection.get("A_BusinessPartnerPaymentCard") 

836 df = pd.DataFrame.from_records(data) 

837 return self.apply_query_params(df, query) 

838 

839 

840class BusinessPartnerRatingTable(CustomAPITable): 

841 """Business partner ratings of all the available records linked to business partners in the system""" 

842 

843 name: str = "business_partner_rating" 

844 columns: List[str] = [ 

845 "id", 

846 "uri", 

847 "type", 

848 "BusinessPartner", 

849 "BusinessPartnerRatingProcedure", 

850 "BPRatingValidityEndDate", 

851 "BusinessPartnerRatingGrade", 

852 "BusinessPartnerRatingTrend", 

853 "BPRatingValidityStartDate", 

854 "BPRatingCreationDate", 

855 "BusinessPartnerRatingComment", 

856 "BusinessPartnerRatingIsAllowed", 

857 "BPRatingIsValidOnKeyDate", 

858 "BusinessPartnerRatingKeyDate", 

859 "BusinessPartnerRatingIsExpired", 

860 ] 

861 

862 def __init__(self, handler: APIHandler): 

863 super().__init__(handler) 

864 self.connection = self.handler.connect() 

865 

866 def select(self, query: ast.Select) -> pd.DataFrame: 

867 data = self.connection.get("A_BusinessPartnerRating") 

868 df = pd.DataFrame.from_records(data) 

869 return self.apply_query_params(df, query) 

870 

871 

872class BusinessPartnerRoleTable(CustomAPITable): 

873 """Business partner role data fields of all the records available records in the system""" 

874 

875 name: str = "business_partner_role" 

876 columns: List[str] = [ 

877 "id", 

878 "uri", 

879 "type", 

880 "BusinessPartner", 

881 "BusinessPartnerRole", 

882 "ValidFrom", 

883 "ValidTo", 

884 "AuthorizationGroup", 

885 ] 

886 

887 def __init__(self, handler: APIHandler): 

888 super().__init__(handler) 

889 self.connection = self.handler.connect() 

890 

891 def select(self, query: ast.Select) -> pd.DataFrame: 

892 data = self.connection.get("A_BusinessPartnerRole") 

893 df = pd.DataFrame.from_records(data) 

894 return self.apply_query_params(df, query) 

895 

896 

897class BusinessPartnerTaxNumberTable(CustomAPITable): 

898 """Tax number data of all the available records linked to business partners in the system""" 

899 

900 name: str = "business_partner_tax_number" 

901 columns: List[str] = [ 

902 "id", 

903 "uri", 

904 "type", 

905 "BusinessPartner", 

906 "BPTaxType", 

907 "BPTaxNumber", 

908 "BPTaxLongNumber", 

909 "AuthorizationGroup", 

910 ] 

911 

912 def __init__(self, handler: APIHandler): 

913 super().__init__(handler) 

914 self.connection = self.handler.connect() 

915 

916 def select(self, query: ast.Select) -> pd.DataFrame: 

917 data = self.connection.get("A_BusinessPartnerTaxNumber") 

918 df = pd.DataFrame.from_records(data) 

919 return self.apply_query_params(df, query) 

920 

921 

922class BusPartAddrDepdntTaxNumberTable(CustomAPITable): 

923 """Address dependent tax number data of all the available records linked to business partners in the system""" 

924 

925 name: str = "business_partner_address_dependent_tax_number" 

926 columns: List[str] = [ 

927 "id", 

928 "uri", 

929 "type", 

930 "BusinessPartner", 

931 "AddressID", 

932 "BPTaxType", 

933 "BPTaxNumber", 

934 "BPTaxLongNumber", 

935 "AuthorizationGroup", 

936 ] 

937 

938 def __init__(self, handler: APIHandler): 

939 super().__init__(handler) 

940 self.connection = self.handler.connect() 

941 

942 def select(self, query: ast.Select) -> pd.DataFrame: 

943 data = self.connection.get("A_BusPartAddrDepdntTaxNmbr") 

944 df = pd.DataFrame.from_records(data) 

945 return self.apply_query_params(df, query) 

946 

947 

948class CustAddrDepdntExtIdentifierTable(CustomAPITable): 

949 """Address dependent external identifiers of all the available records linked to customers in the system""" 

950 

951 name: str = "cust_addr_depdnt_ext_identifier" 

952 columns: List[str] = [ 

953 "id", 

954 "uri", 

955 "type", 

956 "Customer", 

957 "AddressID", 

958 "CustomerExternalRefID", 

959 ] 

960 

961 def __init__(self, handler: APIHandler): 

962 super().__init__(handler) 

963 self.connection = self.handler.connect() 

964 

965 def select(self, query: ast.Select) -> pd.DataFrame: 

966 data = self.connection.get("A_CustAddrDepdntExtIdentifier") 

967 df = pd.DataFrame.from_records(data) 

968 return self.apply_query_params(df, query) 

969 

970 

971class CustAddrDepdntInformationTable(CustomAPITable): 

972 """General data of all the customer records available in the system""" 

973 

974 name: str = "customer" 

975 columns: List[str] = [ 

976 "id", 

977 "uri", 

978 "type", 

979 "Customer", 

980 "AuthorizationGroup", 

981 "BillingIsBlockedForCustomer", 

982 "CreatedByUser", 

983 "CreationDate", 

984 "CustomerAccountGroup", 

985 "CustomerClassification", 

986 "CustomerFullName", 

987 "BPCustomerFullName", 

988 "CustomerName", 

989 "BPCustomerName", 

990 "DeliveryIsBlocked", 

991 "FreeDefinedAttribute01", 

992 "FreeDefinedAttribute02", 

993 "FreeDefinedAttribute03", 

994 "FreeDefinedAttribute04", 

995 "FreeDefinedAttribute05", 

996 "FreeDefinedAttribute06", 

997 "FreeDefinedAttribute07", 

998 "FreeDefinedAttribute08", 

999 "FreeDefinedAttribute09", 

1000 "FreeDefinedAttribute10", 

1001 "NFPartnerIsNaturalPerson", 

1002 "OrderIsBlockedForCustomer", 

1003 "PostingIsBlocked", 

1004 "Supplier", 

1005 "CustomerCorporateGroup", 

1006 "FiscalAddress", 

1007 "Industry", 

1008 "IndustryCode1", 

1009 "IndustryCode2", 

1010 "IndustryCode3", 

1011 "IndustryCode4", 

1012 "IndustryCode5", 

1013 "InternationalLocationNumber1", 

1014 "InternationalLocationNumber2", 

1015 "InternationalLocationNumber3", 

1016 "NielsenRegion", 

1017 "PaymentReason", 

1018 "ResponsibleType", 

1019 "TaxNumber1", 

1020 "TaxNumber2", 

1021 "TaxNumber3", 

1022 "TaxNumber4", 

1023 "TaxNumber5", 

1024 "TaxNumberType", 

1025 "VATRegistration", 

1026 "DeletionIndicator", 

1027 "ExpressTrainStationName", 

1028 "TrainStationName", 

1029 "CityCode", 

1030 "County", 

1031 ] 

1032 

1033 def __init__(self, handler: APIHandler): 

1034 super().__init__(handler) 

1035 self.connection = self.handler.connect() 

1036 

1037 def select(self, query: ast.Select) -> pd.DataFrame: 

1038 data = self.connection.get("A_Customer") 

1039 df = pd.DataFrame.from_records(data) 

1040 return self.apply_query_params(df, query) 

1041 

1042 

1043class CustomerCompanyTable(CustomAPITable): 

1044 """Customer company data fields of all the available records in the system linked to customer""" 

1045 

1046 name: str = "customer_company" 

1047 columns: List[str] = [ 

1048 "id", 

1049 "uri", 

1050 "type", 

1051 "Customer", 

1052 "CompanyCode", 

1053 "APARToleranceGroup", 

1054 "AccountByCustomer", 

1055 "AccountingClerk", 

1056 "AccountingClerkFaxNumber", 

1057 "AccountingClerkInternetAddress", 

1058 "AccountingClerkPhoneNumber", 

1059 "AlternativePayerAccount", 

1060 "AuthorizationGroup", 

1061 "CollectiveInvoiceVariant", 

1062 "CustomerAccountNote", 

1063 "CustomerHeadOffice", 

1064 "CustomerSupplierClearingIsUsed", 

1065 "HouseBank", 

1066 "InterestCalculationCode", 

1067 "InterestCalculationDate", 

1068 "IntrstCalcFrequencyInMonths", 

1069 "IsToBeLocallyProcessed", 

1070 "ItemIsToBePaidSeparately", 

1071 "LayoutSortingRule", 

1072 "PaymentBlockingReason", 

1073 "PaymentMethodsList", 

1074 "PaymentReason", 

1075 "PaymentTerms", 

1076 "PaytAdviceIsSentbyEDI", 

1077 "PhysicalInventoryBlockInd", 

1078 "ReconciliationAccount", 

1079 "RecordPaymentHistoryIndicator", 

1080 "UserAtCustomer", 

1081 "DeletionIndicator", 

1082 "CashPlanningGroup", 

1083 "KnownOrNegotiatedLeave", 

1084 "ValueAdjustmentKey", 

1085 "CustomerAccountGroup", 

1086 ] 

1087 

1088 def __init__(self, handler: APIHandler): 

1089 super().__init__(handler) 

1090 self.connection = self.handler.connect() 

1091 

1092 def select(self, query: ast.Select) -> pd.DataFrame: 

1093 data = self.connection.get("A_CustomerCompany") 

1094 df = pd.DataFrame.from_records(data) 

1095 return self.apply_query_params(df, query) 

1096 

1097 

1098class CustomerCompanyTextTable(CustomAPITable): 

1099 """Customer company text records attached to customer company in the system""" 

1100 

1101 name: str = "customer_company_text" 

1102 columns: List[str] = [ 

1103 "id", 

1104 "uri", 

1105 "type", 

1106 "Customer", 

1107 "CompanyCode", 

1108 "Language", 

1109 "LongTextID", 

1110 "LongText", 

1111 ] 

1112 

1113 def __init__(self, handler: APIHandler): 

1114 super().__init__(handler) 

1115 self.connection = self.handler.connect() 

1116 

1117 def select(self, query: ast.Select) -> pd.DataFrame: 

1118 data = self.connection.get("A_CustomerCompanyText") 

1119 df = pd.DataFrame.from_records(data) 

1120 return self.apply_query_params(df, query) 

1121 

1122 

1123class CustomerDunningTable(CustomAPITable): 

1124 """Dunning records attached to customer company in the system""" 

1125 

1126 name: str = "customer_dunning" 

1127 columns: List[str] = [ 

1128 "id", 

1129 "uri", 

1130 "type", 

1131 "Customer", 

1132 "CompanyCode", 

1133 "DunningArea", 

1134 "DunningBlock", 

1135 "DunningLevel", 

1136 "DunningProcedure", 

1137 "DunningRecipient", 

1138 "LastDunnedOn", 

1139 "LegDunningProcedureOn", 

1140 "DunningClerk", 

1141 "AuthorizationGroup", 

1142 "CustomerAccountGroup", 

1143 ] 

1144 

1145 def __init__(self, handler: APIHandler): 

1146 super().__init__(handler) 

1147 self.connection = self.handler.connect() 

1148 

1149 def select(self, query: ast.Select) -> pd.DataFrame: 

1150 data = self.connection.get("A_CustomerDunning") 

1151 df = pd.DataFrame.from_records(data) 

1152 return self.apply_query_params(df, query) 

1153 

1154 

1155class CustomerSalesAreaTable(CustomAPITable): 

1156 """Customer sales area data fields of all the available records in the system""" 

1157 

1158 name: str = "customer_sales_area" 

1159 columns: List[str] = [ 

1160 "id", 

1161 "uri", 

1162 "type", 

1163 "Customer", 

1164 "SalesOrganization", 

1165 "DistributionChannel", 

1166 "Division", 

1167 "AccountByCustomer", 

1168 "AuthorizationGroup", 

1169 "BillingIsBlockedForCustomer", 

1170 "CompleteDeliveryIsDefined", 

1171 "CreditControlArea", 

1172 "Currency", 

1173 "CustIsRlvtForSettlmtMgmt", 

1174 "CustomerABCClassification", 

1175 "CustomerAccountAssignmentGroup", 

1176 "CustomerGroup", 

1177 "CustomerIsRebateRelevant", 

1178 "CustomerPaymentTerms", 

1179 "CustomerPriceGroup", 

1180 "CustomerPricingProcedure", 

1181 "CustProdProposalProcedure", 

1182 "DeliveryIsBlockedForCustomer", 

1183 "DeliveryPriority", 

1184 "IncotermsClassification", 

1185 "IncotermsLocation2", 

1186 "IncotermsVersion", 

1187 "IncotermsLocation1", 

1188 "IncotermsSupChnLoc1AddlUUID", 

1189 "IncotermsSupChnLoc2AddlUUID", 

1190 "IncotermsSupChnDvtgLocAddlUUID", 

1191 "DeletionIndicator", 

1192 "IncotermsTransferLocation", 

1193 "InspSbstHasNoTimeOrQuantity", 

1194 "InvoiceDate", 

1195 "ItemOrderProbabilityInPercent", 

1196 "ManualInvoiceMaintIsRelevant", 

1197 "MaxNmbrOfPartialDelivery", 

1198 "OrderCombinationIsAllowed", 

1199 "OrderIsBlockedForCustomer", 

1200 "OverdelivTolrtdLmtRatioInPct", 

1201 "PartialDeliveryIsAllowed", 

1202 "PriceListType", 

1203 "ProductUnitGroup", 

1204 "ProofOfDeliveryTimeValue", 

1205 "SalesGroup", 

1206 "SalesItemProposal", 

1207 "SalesOffice", 

1208 "ShippingCondition", 

1209 "SlsDocIsRlvtForProofOfDeliv", 

1210 "SlsUnlmtdOvrdelivIsAllwd", 

1211 "SupplyingPlant", 

1212 "SalesDistrict", 

1213 "UnderdelivTolrtdLmtRatioInPct", 

1214 "InvoiceListSchedule", 

1215 "ExchangeRateType", 

1216 "AdditionalCustomerGroup1", 

1217 "AdditionalCustomerGroup2", 

1218 "AdditionalCustomerGroup3", 

1219 "AdditionalCustomerGroup4", 

1220 "AdditionalCustomerGroup5", 

1221 "PaymentGuaranteeProcedure", 

1222 "CustomerAccountGroup", 

1223 ] 

1224 

1225 def __init__(self, handler: APIHandler): 

1226 super().__init__(handler) 

1227 self.connection = self.handler.connect() 

1228 

1229 def select(self, query: ast.Select) -> pd.DataFrame: 

1230 data = self.connection.get("A_CustomerSalesArea") 

1231 df = pd.DataFrame.from_records(data) 

1232 return self.apply_query_params(df, query) 

1233 

1234 

1235class CustomerSalesAreaTaxTable(CustomAPITable): 

1236 """Customer sales area tax data fields of all the available records in the system""" 

1237 

1238 name: str = "customer_sales_area_tax" 

1239 columns: List[str] = [ 

1240 "id", 

1241 "uri", 

1242 "type", 

1243 "Customer", 

1244 "SalesOrganization", 

1245 "DistributionChannel", 

1246 "Division", 

1247 "DepartureCountry", 

1248 "CustomerTaxCategory", 

1249 "CustomerTaxClassification", 

1250 ] 

1251 

1252 def __init__(self, handler: APIHandler): 

1253 super().__init__(handler) 

1254 self.connection = self.handler.connect() 

1255 

1256 def select(self, query: ast.Select) -> pd.DataFrame: 

1257 data = self.connection.get("A_CustomerSalesAreaTax") 

1258 df = pd.DataFrame.from_records(data) 

1259 return self.apply_query_params(df, query) 

1260 

1261 

1262class CustomerSalesAreaTextTable(CustomAPITable): 

1263 """Customer sales area text fields of all the available records in the system linked to customer sales areas""" 

1264 

1265 name: str = "customer_sales_area_text" 

1266 columns: List[str] = [ 

1267 "id", 

1268 "uri", 

1269 "type", 

1270 "Customer", 

1271 "SalesOrganization", 

1272 "DistributionChannel", 

1273 "Division", 

1274 "Language", 

1275 "LongTextID", 

1276 "LongText", 

1277 ] 

1278 

1279 def __init__(self, handler: APIHandler): 

1280 super().__init__(handler) 

1281 self.connection = self.handler.connect() 

1282 

1283 def select(self, query: ast.Select) -> pd.DataFrame: 

1284 data = self.connection.get("A_CustomerSalesAreaText") 

1285 df = pd.DataFrame.from_records(data) 

1286 return self.apply_query_params(df, query) 

1287 

1288 

1289class CustomerTaxGroupingTable(CustomAPITable): 

1290 """Customer tax grouping data attached to a customer in the system""" 

1291 

1292 name: str = "customer_tax_grouping" 

1293 columns: List[str] = [ 

1294 "id", 

1295 "uri", 

1296 "type", 

1297 "Customer", 

1298 "CustomerTaxGroupingCode", 

1299 "CustTaxGrpExemptionCertificate", 

1300 "CustTaxGroupExemptionRate", 

1301 "CustTaxGroupExemptionStartDate", 

1302 "CustTaxGroupExemptionEndDate", 

1303 "CustTaxGroupSubjectedStartDate", 

1304 "CustTaxGroupSubjectedEndDate", 

1305 ] 

1306 

1307 def __init__(self, handler: APIHandler): 

1308 super().__init__(handler) 

1309 self.connection = self.handler.connect() 

1310 

1311 def select(self, query: ast.Select) -> pd.DataFrame: 

1312 data = self.connection.get("A_CustomerTaxGrouping") 

1313 df = pd.DataFrame.from_records(data) 

1314 return self.apply_query_params(df, query) 

1315 

1316 

1317class CustomerTextTable(CustomAPITable): 

1318 """Customer text data attached to a customer in the system""" 

1319 

1320 name: str = "customer_text" 

1321 columns: List[str] = [ 

1322 "id", 

1323 "uri", 

1324 "type", 

1325 "Customer", 

1326 "Language", 

1327 "LongTextID", 

1328 "LongText", 

1329 ] 

1330 

1331 def __init__(self, handler: APIHandler): 

1332 super().__init__(handler) 

1333 self.connection = self.handler.connect() 

1334 

1335 def select(self, query: ast.Select) -> pd.DataFrame: 

1336 data = self.connection.get("A_CustomerText") 

1337 df = pd.DataFrame.from_records(data) 

1338 return self.apply_query_params(df, query) 

1339 

1340 

1341class CustomerUnloadingPointTable(CustomAPITable): 

1342 """Unloading point data attached to a customer in the system""" 

1343 

1344 name: str = "customer_unloading_point" 

1345 columns: List[str] = [ 

1346 "id", 

1347 "uri", 

1348 "type", 

1349 "Customer", 

1350 "UnloadingPointName", 

1351 "CustomerFactoryCalenderCode", 

1352 "BPGoodsReceivingHoursCode", 

1353 "IsDfltBPUnloadingPoint", 

1354 "MondayMorningOpeningTime", 

1355 "MondayMorningClosingTime", 

1356 "MondayAfternoonOpeningTime", 

1357 "MondayAfternoonClosingTime", 

1358 "TuesdayMorningOpeningTime", 

1359 "TuesdayMorningClosingTime", 

1360 "TuesdayAfternoonOpeningTime", 

1361 "TuesdayAfternoonClosingTime", 

1362 "WednesdayMorningOpeningTime", 

1363 "WednesdayMorningClosingTime", 

1364 "WednesdayAfternoonOpeningTime", 

1365 "WednesdayAfternoonClosingTime", 

1366 "ThursdayMorningOpeningTime", 

1367 "ThursdayMorningClosingTime", 

1368 "ThursdayAfternoonOpeningTime", 

1369 "ThursdayAfternoonClosingTime", 

1370 "FridayMorningOpeningTime", 

1371 "FridayMorningClosingTime", 

1372 "FridayAfternoonOpeningTime", 

1373 "FridayAfternoonClosingTime", 

1374 "SaturdayMorningOpeningTime", 

1375 "SaturdayMorningClosingTime", 

1376 "SaturdayAfternoonOpeningTime", 

1377 "SaturdayAfternoonClosingTime", 

1378 "SundayMorningOpeningTime", 

1379 "SundayMorningClosingTime", 

1380 "SundayAfternoonOpeningTime", 

1381 "SundayAfternoonClosingTime", 

1382 ] 

1383 

1384 def __init__(self, handler: APIHandler): 

1385 super().__init__(handler) 

1386 self.connection = self.handler.connect() 

1387 

1388 def select(self, query: ast.Select) -> pd.DataFrame: 

1389 data = self.connection.get("A_CustomerUnloadingPoint") 

1390 df = pd.DataFrame.from_records(data) 

1391 return self.apply_query_params(df, query) 

1392 

1393 

1394class CustomerWithHoldingTaxTable(CustomAPITable): 

1395 """Withholding tax records attached to customer company in the system""" 

1396 

1397 name: str = "customer_withholding_tax" 

1398 columns: List[str] = [ 

1399 "id", 

1400 "uri", 

1401 "type", 

1402 "Customer", 

1403 "CompanyCode", 

1404 "WithholdingTaxType", 

1405 "WithholdingTaxCode", 

1406 "WithholdingTaxAgent", 

1407 "ObligationDateBegin", 

1408 "ObligationDateEnd", 

1409 "WithholdingTaxNumber", 

1410 "WithholdingTaxCertificate", 

1411 "WithholdingTaxExmptPercent", 

1412 "ExemptionDateBegin", 

1413 "ExemptionDateEnd", 

1414 "ExemptionReason", 

1415 "AuthorizationGroup", 

1416 ] 

1417 

1418 def __init__(self, handler: APIHandler): 

1419 super().__init__(handler) 

1420 self.connection = self.handler.connect() 

1421 

1422 def select(self, query: ast.Select) -> pd.DataFrame: 

1423 data = self.connection.get("A_CustomerWithHoldingTax") 

1424 df = pd.DataFrame.from_records(data) 

1425 return self.apply_query_params(df, query) 

1426 

1427 

1428class CustSalesPartnerFuncTable(CustomAPITable): 

1429 """Partner function fields of all the available records in the system linked to customer sales areas""" 

1430 

1431 name: str = "customer_sales_partner_func" 

1432 columns: List[str] = [ 

1433 "id", 

1434 "uri", 

1435 "type", 

1436 "Customer", 

1437 "SalesOrganization", 

1438 "DistributionChannel", 

1439 "Division", 

1440 "PartnerCounter", 

1441 "PartnerFunction", 

1442 "BPCustomerNumber", 

1443 "CustomerPartnerDescription", 

1444 "DefaultPartner", 

1445 "Supplier", 

1446 "PersonnelNumber", 

1447 "ContactPerson", 

1448 "AddressID", 

1449 "AuthorizationGroup", 

1450 ] 

1451 

1452 def __init__(self, handler: APIHandler): 

1453 super().__init__(handler) 

1454 self.connection = self.handler.connect() 

1455 

1456 def select(self, query: ast.Select) -> pd.DataFrame: 

1457 data = self.connection.get("A_CustSalesPartnerFunc") 

1458 df = pd.DataFrame.from_records(data) 

1459 return self.apply_query_params(df, query) 

1460 

1461 

1462class CustSlsAreaAddrDepdntInfoTable(CustomAPITable): 

1463 """Address dependent customer sales area data fields of all the available records in the system""" 

1464 

1465 name: str = "customer_sales_area_addr_depdnt_info" 

1466 columns: List[str] = [ 

1467 "id", 

1468 "uri", 

1469 "type", 

1470 "Customer", 

1471 "SalesOrganization", 

1472 "DistributionChannel", 

1473 "Division", 

1474 "AddressID", 

1475 "IncotermsClassification", 

1476 "IncotermsLocation1", 

1477 "IncotermsLocation2", 

1478 "IncotermsSupChnLoc1AddlUUID", 

1479 "IncotermsSupChnLoc2AddlUUID", 

1480 "IncotermsSupChnDvtgLocAddlUUID", 

1481 "DeliveryIsBlocked", 

1482 "SalesOffice", 

1483 "SalesGroup", 

1484 "ShippingCondition", 

1485 "SupplyingPlant", 

1486 "IncotermsVersion", 

1487 ] 

1488 

1489 def __init__(self, handler: APIHandler): 

1490 super().__init__(handler) 

1491 self.connection = self.handler.connect() 

1492 

1493 def select(self, query: ast.Select) -> pd.DataFrame: 

1494 data = self.connection.get("A_CustSlsAreaAddrDepdntInfo") 

1495 df = pd.DataFrame.from_records(data) 

1496 return self.apply_query_params(df, query) 

1497 

1498 

1499class CustSlsAreaAddrDepdntTaxInfoTable(CustomAPITable): 

1500 """Address dependent customer sales area tax data fields of all the available records in the system""" 

1501 

1502 name: str = "customer_sales_area_addr_depdnt_tax_info" 

1503 columns: List[str] = [ 

1504 "id", 

1505 "uri", 

1506 "type", 

1507 "Customer", 

1508 "SalesOrganization", 

1509 "DistributionChannel", 

1510 "Division", 

1511 "AddressID", 

1512 "DepartureCountry", 

1513 "CustomerTaxCategory", 

1514 "CustomerTaxClassification", 

1515 ] 

1516 

1517 def __init__(self, handler: APIHandler): 

1518 super().__init__(handler) 

1519 self.connection = self.handler.connect() 

1520 

1521 def select(self, query: ast.Select) -> pd.DataFrame: 

1522 data = self.connection.get("A_CustSlsAreaAddrDepdntTaxInfo") 

1523 df = pd.DataFrame.from_records(data) 

1524 return self.apply_query_params(df, query) 

1525 

1526 

1527class CustUnldgPtAddrDepdntInfoTable(CustomAPITable): 

1528 """Address dependent customer unloading point data fields of all the available records in the system""" 

1529 

1530 name: str = "customer_unloading_point_addr_depdnt_info" 

1531 columns: List[str] = [ 

1532 "id", 

1533 "uri", 

1534 "type", 

1535 "Customer", 

1536 "AddressID", 

1537 "UnloadingPointName", 

1538 "CustomerFactoryCalenderCode", 

1539 "BPGoodsReceivingHoursCode", 

1540 "IsDfltBPUnloadingPoint", 

1541 "MondayMorningOpeningTime", 

1542 "MondayMorningClosingTime", 

1543 "MondayAfternoonOpeningTime", 

1544 "MondayAfternoonClosingTime", 

1545 "TuesdayMorningOpeningTime", 

1546 "TuesdayMorningClosingTime", 

1547 "TuesdayAfternoonOpeningTime", 

1548 "TuesdayAfternoonClosingTime", 

1549 "WednesdayMorningOpeningTime", 

1550 "WednesdayMorningClosingTime", 

1551 "WednesdayAfternoonOpeningTime", 

1552 "WednesdayAfternoonClosingTime", 

1553 "ThursdayMorningOpeningTime", 

1554 "ThursdayMorningClosingTime", 

1555 "ThursdayAfternoonOpeningTime", 

1556 "ThursdayAfternoonClosingTime", 

1557 "FridayMorningOpeningTime", 

1558 "FridayMorningClosingTime", 

1559 "FridayAfternoonOpeningTime", 

1560 "FridayAfternoonClosingTime", 

1561 "SaturdayMorningOpeningTime", 

1562 "SaturdayMorningClosingTime", 

1563 "SaturdayAfternoonOpeningTime", 

1564 "SaturdayAfternoonClosingTime", 

1565 "SundayMorningOpeningTime", 

1566 "SundayMorningClosingTime", 

1567 "SundayAfternoonOpeningTime", 

1568 "SundayAfternoonClosingTime", 

1569 ] 

1570 

1571 def __init__(self, handler: APIHandler): 

1572 super().__init__(handler) 

1573 self.connection = self.handler.connect() 

1574 

1575 def select(self, query: ast.Select) -> pd.DataFrame: 

1576 data = self.connection.get("A_CustUnldgPtAddrDepdntInfo") 

1577 df = pd.DataFrame.from_records(data) 

1578 return self.apply_query_params(df, query) 

1579 

1580 

1581class SupplierTable(CustomAPITable): 

1582 """General data of all the supplier records available in the system""" 

1583 

1584 name: str = "supplier" 

1585 columns: List[str] = [ 

1586 "id", 

1587 "uri", 

1588 "type", 

1589 "Supplier", 

1590 "AlternativePayeeAccountNumber", 

1591 "AuthorizationGroup", 

1592 "CreatedByUser", 

1593 "CreationDate", 

1594 "Customer", 

1595 "PaymentIsBlockedForSupplier", 

1596 "PostingIsBlocked", 

1597 "PurchasingIsBlocked", 

1598 "SupplierAccountGroup", 

1599 "SupplierFullName", 

1600 "SupplierName", 

1601 "VATRegistration", 

1602 "BirthDate", 

1603 "ConcatenatedInternationalLocNo", 

1604 "DeletionIndicator", 

1605 "FiscalAddress", 

1606 "Industry", 

1607 "InternationalLocationNumber1", 

1608 "InternationalLocationNumber2", 

1609 "InternationalLocationNumber3", 

1610 "IsNaturalPerson", 

1611 "PaymentReason", 

1612 "ResponsibleType", 

1613 "SuplrQltyInProcmtCertfnValidTo", 

1614 "SuplrQualityManagementSystem", 

1615 "SupplierCorporateGroup", 

1616 "SupplierProcurementBlock", 

1617 "TaxNumber1", 

1618 "TaxNumber2", 

1619 "TaxNumber3", 

1620 "TaxNumber4", 

1621 "TaxNumber5", 

1622 "TaxNumberResponsible", 

1623 "TaxNumberType", 

1624 "SuplrProofOfDelivRlvtCode", 

1625 "BR_TaxIsSplit", 

1626 "DataExchangeInstructionKey", 

1627 ] 

1628 

1629 def __init__(self, handler: APIHandler): 

1630 super().__init__(handler) 

1631 self.connection = self.handler.connect() 

1632 

1633 def select(self, query: ast.Select) -> pd.DataFrame: 

1634 data = self.connection.get("A_Supplier") 

1635 df = pd.DataFrame.from_records(data) 

1636 return self.apply_query_params(df, query) 

1637 

1638 

1639class SupplierCompanyTable(CustomAPITable): 

1640 """supplier company data available in the system""" 

1641 

1642 name: str = "supplier_company" 

1643 columns: List[str] = [ 

1644 "id", 

1645 "uri", 

1646 "type", 

1647 "Supplier", 

1648 "CompanyCode", 

1649 "AuthorizationGroup", 

1650 "CompanyCodeName", 

1651 "PaymentBlockingReason", 

1652 "SupplierIsBlockedForPosting", 

1653 "AccountingClerk", 

1654 "AccountingClerkFaxNumber", 

1655 "AccountingClerkPhoneNumber", 

1656 "SupplierClerk", 

1657 "SupplierClerkURL", 

1658 "PaymentMethodsList", 

1659 "PaymentReason", 

1660 "PaymentTerms", 

1661 "ClearCustomerSupplier", 

1662 "IsToBeLocallyProcessed", 

1663 "ItemIsToBePaidSeparately", 

1664 "PaymentIsToBeSentByEDI", 

1665 "HouseBank", 

1666 "CheckPaidDurationInDays", 

1667 "Currency", 

1668 "BillOfExchLmtAmtInCoCodeCrcy", 

1669 "SupplierClerkIDBySupplier", 

1670 "ReconciliationAccount", 

1671 "InterestCalculationCode", 

1672 "InterestCalculationDate", 

1673 "IntrstCalcFrequencyInMonths", 

1674 "SupplierHeadOffice", 

1675 "AlternativePayee", 

1676 "LayoutSortingRule", 

1677 "APARToleranceGroup", 

1678 "SupplierCertificationDate", 

1679 "SupplierAccountNote", 

1680 "WithholdingTaxCountry", 

1681 "DeletionIndicator", 

1682 "CashPlanningGroup", 

1683 "IsToBeCheckedForDuplicates", 

1684 "MinorityGroup", 

1685 "SupplierAccountGroup", 

1686 ] 

1687 

1688 def __init__(self, handler: APIHandler): 

1689 super().__init__(handler) 

1690 self.connection = self.handler.connect() 

1691 

1692 def select(self, query: ast.Select) -> pd.DataFrame: 

1693 data = self.connection.get("A_SupplierCompany") 

1694 df = pd.DataFrame.from_records(data) 

1695 return self.apply_query_params(df, query) 

1696 

1697 

1698class SupplierCompanyTextTable(CustomAPITable): 

1699 """Supplier company text data attached to supplier company in the system""" 

1700 

1701 name: str = "supplier_company_text" 

1702 columns: List[str] = [ 

1703 "id", 

1704 "uri", 

1705 "type", 

1706 "Supplier", 

1707 "CompanyCode", 

1708 "Language", 

1709 "LongTextID", 

1710 "LongText", 

1711 ] 

1712 

1713 def __init__(self, handler: APIHandler): 

1714 super().__init__(handler) 

1715 self.connection = self.handler.connect() 

1716 

1717 def select(self, query: ast.Select) -> pd.DataFrame: 

1718 data = self.connection.get("A_SupplierCompanyText") 

1719 df = pd.DataFrame.from_records(data) 

1720 return self.apply_query_params(df, query) 

1721 

1722 

1723class SupplierDunningTable(CustomAPITable): 

1724 """Dunning records attached to supplier company in the system""" 

1725 

1726 name: str = "supplier_dunning" 

1727 columns: List[str] = [ 

1728 "id", 

1729 "uri", 

1730 "type", 

1731 "Supplier", 

1732 "CompanyCode", 

1733 "DunningArea", 

1734 "DunningBlock", 

1735 "DunningLevel", 

1736 "DunningProcedure", 

1737 "DunningRecipient", 

1738 "LastDunnedOn", 

1739 "LegDunningProcedureOn", 

1740 "DunningClerk", 

1741 "AuthorizationGroup", 

1742 "SupplierAccountGroup", 

1743 ] 

1744 

1745 def __init__(self, handler: APIHandler): 

1746 super().__init__(handler) 

1747 self.connection = self.handler.connect() 

1748 

1749 def select(self, query: ast.Select) -> pd.DataFrame: 

1750 data = self.connection.get("A_SupplierDunning") 

1751 df = pd.DataFrame.from_records(data) 

1752 return self.apply_query_params(df, query) 

1753 

1754 

1755class SupplierPartnerFuncTable(CustomAPITable): 

1756 """Partner function fields of all the available records in the system linked to supplier purchasing organization""" 

1757 

1758 name: str = "supplier_partner_func" 

1759 columns: List[str] = [ 

1760 "id", 

1761 "uri", 

1762 "type", 

1763 "Supplier", 

1764 "PurchasingOrganization", 

1765 "SupplierSubrange", 

1766 "Plant", 

1767 "PartnerFunction", 

1768 "PartnerCounter", 

1769 "DefaultPartner", 

1770 "CreationDate", 

1771 "CreatedByUser", 

1772 "ReferenceSupplier", 

1773 "AuthorizationGroup", 

1774 ] 

1775 

1776 def __init__(self, handler: APIHandler): 

1777 super().__init__(handler) 

1778 self.connection = self.handler.connect() 

1779 

1780 def select(self, query: ast.Select) -> pd.DataFrame: 

1781 data = self.connection.get("A_SupplierPartnerFunc") 

1782 df = pd.DataFrame.from_records(data) 

1783 return self.apply_query_params(df, query) 

1784 

1785 

1786class SupplierPurchasingOrgTable(CustomAPITable): 

1787 """Supplier purchasing organization data attached to supplier records in the system""" 

1788 

1789 name: str = "supplier_purchasing_org" 

1790 columns: List[str] = [ 

1791 "id", 

1792 "uri", 

1793 "type", 

1794 "Supplier", 

1795 "PurchasingOrganization", 

1796 "AutomaticEvaluatedRcptSettlmt", 

1797 "CalculationSchemaGroupCode", 

1798 "DeletionIndicator", 

1799 "EvaldReceiptSettlementIsActive", 

1800 "IncotermsClassification", 

1801 "IncotermsTransferLocation", 

1802 "IncotermsVersion", 

1803 "IncotermsLocation1", 

1804 "IncotermsLocation2", 

1805 "IncotermsSupChnLoc1AddlUUID", 

1806 "IncotermsSupChnLoc2AddlUUID", 

1807 "IncotermsSupChnDvtgLocAddlUUID", 

1808 "IntrastatCrsBorderTrMode", 

1809 "InvoiceIsGoodsReceiptBased", 

1810 "InvoiceIsMMServiceEntryBased", 

1811 "MaterialPlannedDeliveryDurn", 

1812 "MinimumOrderAmount", 

1813 "PaymentTerms", 

1814 "PlanningCycle", 

1815 "PricingDateControl", 

1816 "ProdStockAndSlsDataTransfPrfl", 

1817 "ProductUnitGroup", 

1818 "PurOrdAutoGenerationIsAllowed", 

1819 "PurchaseOrderCurrency", 

1820 "PurchasingGroup", 

1821 "PurchasingIsBlockedForSupplier", 

1822 "RoundingProfile", 

1823 "ShippingCondition", 

1824 "SuplrDiscountInKindIsGranted", 

1825 "SuplrInvcRevalIsAllowed", 

1826 "SuplrIsRlvtForSettlmtMgmt", 

1827 "SuplrPurgOrgIsRlvtForPriceDetn", 

1828 "SupplierABCClassificationCode", 

1829 "SupplierAccountNumber", 

1830 "SupplierIsReturnsSupplier", 

1831 "SupplierPhoneNumber", 

1832 "SupplierRespSalesPersonName", 

1833 "SupplierConfirmationControlKey", 

1834 "IsOrderAcknRqd", 

1835 "AuthorizationGroup", 

1836 "SupplierAccountGroup", 

1837 ] 

1838 

1839 def __init__(self, handler: APIHandler): 

1840 super().__init__(handler) 

1841 self.connection = self.handler.connect() 

1842 

1843 def select(self, query: ast.Select) -> pd.DataFrame: 

1844 data = self.connection.get("A_SupplierPurchasingOrg") 

1845 df = pd.DataFrame.from_records(data) 

1846 return self.apply_query_params(df, query) 

1847 

1848 

1849class SupplierPurchasingOrgTextTable(CustomAPITable): 

1850 """Supplier purchasing organization text data attached to purchasing organization in the system""" 

1851 

1852 name: str = "supplier_purchasing_org_text" 

1853 columns: List[str] = [ 

1854 "id", 

1855 "uri", 

1856 "type", 

1857 "Supplier", 

1858 "PurchasingOrganization", 

1859 "Language", 

1860 "LongTextID", 

1861 "LongText", 

1862 ] 

1863 

1864 def __init__(self, handler: APIHandler): 

1865 super().__init__(handler) 

1866 self.connection = self.handler.connect() 

1867 

1868 def select(self, query: ast.Select) -> pd.DataFrame: 

1869 data = self.connection.get("A_SupplierPurchasingOrgText") 

1870 df = pd.DataFrame.from_records(data) 

1871 return self.apply_query_params(df, query) 

1872 

1873 

1874class SupplierTextTable(CustomAPITable): 

1875 """Supplier text data attached to purchasing organization in the system""" 

1876 

1877 name: str = "supplier_text" 

1878 columns: List[str] = [ 

1879 "id", 

1880 "uri", 

1881 "type", 

1882 "Supplier", 

1883 "Language", 

1884 "LongTextID", 

1885 "LongText", 

1886 ] 

1887 

1888 def __init__(self, handler: APIHandler): 

1889 super().__init__(handler) 

1890 self.connection = self.handler.connect() 

1891 

1892 def select(self, query: ast.Select) -> pd.DataFrame: 

1893 data = self.connection.get("A_SupplierText") 

1894 df = pd.DataFrame.from_records(data) 

1895 return self.apply_query_params(df, query) 

1896 

1897 

1898class SupplierWithHoldingTaxTable(CustomAPITable): 

1899 """Withholding tax records attached to supplier company in the system""" 

1900 

1901 name: str = "supplier_withholding_tax" 

1902 columns: List[str] = [ 

1903 "id", 

1904 "uri", 

1905 "type", 

1906 "Supplier", 

1907 "CompanyCode", 

1908 "WithholdingTaxType", 

1909 "ExemptionDateBegin", 

1910 "ExemptionDateEnd", 

1911 "ExemptionReason", 

1912 "IsWithholdingTaxSubject", 

1913 "RecipientType", 

1914 "WithholdingTaxCertificate", 

1915 "WithholdingTaxCode", 

1916 "WithholdingTaxExmptPercent", 

1917 "WithholdingTaxNumber", 

1918 "AuthorizationGroup", 

1919 ] 

1920 

1921 def __init__(self, handler: APIHandler): 

1922 super().__init__(handler) 

1923 self.connection = self.handler.connect() 

1924 

1925 def select(self, query: ast.Select) -> pd.DataFrame: 

1926 data = self.connection.get("A_SupplierWithHoldingTax") 

1927 df = pd.DataFrame.from_records(data) 

1928 return self.apply_query_params(df, query)