Architecture & Data Flow
System landscape, data flow, responsibilities
System Landscape
The Bilendo SAP Integration operates in three zones:
Zone 1: SAP ERP
The source system. Here master data (KNA1/KNB1), open items (BSID), cleared items (BSAD) and optionally orders (VBAK/VBAP) are read and written as flat TXT files to the SAP application server.
Involved SAP modules: FI-AR (Accounts Receivable), optionally FI-GL and SD (Sales & Distribution).
Zone 2: Middleware / Data Transport
Files are transferred from the SAP application server to Bilendo via SFTP. Typical middleware options:
| Middleware | Usage Context |
|---|---|
| SAP CPI (Cloud Platform Integration) | S/4HANA Cloud, BTP environments |
| Seeburger BIS | On-Premise EDI/EAI |
| Lobster Integration | On-Premise, hybrid scenarios |
| CLI / Cron-based SFTP | Minimal variant, e.g., via sftp or scp |
Zone 3: Bilendo
The SaaS platform reads the files from the SFTP server and processes them. Bilendo in turn provides CSV files for reintegration.
Data Flow: Export (SAP → Bilendo)
SAP Tables SAP Application Server Bilendo SFTP Bilendo
───────────── ────────────────────── ──────────── ───────
KNA1/KNB1 ─┐
├─ ZCL_FI_BILENDO_ASSIST_V2
BSID ─┤ ↓
│ get_kna1() → kna1_file_to_server() → CC_Customers_...txt ──→ SFTP ──→ Import
│ get_bsid() → bseg_file_to_server() → CC_open_...txt ──→ SFTP ──→ Import
BSAD ─┤ get_bsad() → bseg_file_to_server() → CC_cleared_...txt ──→ SFTP ──→ Import
│
VBAK/VBAP ─┘ get_orders() → orders_file_to_server() → CC_orders_...txt ──→ SFTP ──→ ImportDetailed Process
SM36 job starts the report
ZFI_BILENDO_EXPORT_V2(typically: daily at 03:00)Report reads the selection parameters from the variant (e.g.,
BILENDO_DAILY_DELTA)Report selects all relevant company codes from T001 (
WHERE rcomp <> '')For each company code (Loop):
set_bukrs()– sets the active company code in the classget_kna1()– selects customer master data (KNA1 JOIN KNB1 JOIN ADR6)kna1_file_to_server()– writes TXT file to application serverget_bsid()– selects open items (BSID + BSEG additions)get_additional()– adds additional fields (VKORG, BKTXT, VBELN, AUFNR, etc.)bseg_file_to_server()– writes TXT fileget_bsad()– selects cleared items (analogous to BSID)get_additional()+bseg_file_to_server()– analogousget_orders()– selects orders (VBAK + VBAP + VBUK + other tables)orders_file_to_server()– writes Orders TXT file
Middleware (CPI/Seeburger/Lobster) transfers the files via SFTP
Bilendo imports the files automatically
Data Flow: Re-Integration (Bilendo → SAP)
Bilendo Bilendo SFTP SAP Application Server SAP
─────── ──────────── ────────────────────── ───
Platform ──→ Export ──→ bilendo_credit_limits ──→ SFTP ──→ Download
bilendo_credit_informations ──→ SFTP ──→ Download
bilendo_securities ──→ SFTP ──→ Download ┐
bilendo_customers ──→ SFTP ──→ Download ├─ ZFI_BILENDO_IMPORT_V2
bilendo_journal_entries ──→ SFTP ──→ Download ┘ → BAPI/BDCRe-Integration Process
Bilendo places CSV files on the SFTP server (→ Details in 09 - Re-Integration Fields)
Middleware downloads files to the SAP input directory (
/usr/sap/<SID>/COMM/Bilendo_IN/)Report
ZFI_BILENDO_IMPORT_V2is started (manually or via job)Class reads CSV files (
get_files()+read_csv())Write-back:
credit_limit_change()– Credit limit + risk category to KNB5/KNKKcustomer_change()– Dunning level, dunning block, insured receivable to KNB1/KNKAdoc_change()– Dunning level/date at document level (BSEG)
Optional:
delete_files()– Clean up processed files
Data Types
The integration transports four core data types. The complete field definition can be found in 06 - Data Specification.
| Data Type | SAP Source | SAP Table | Bilendo Target | File Type |
|---|---|---|---|---|
| Master Data | Customer Master | KNA1 + KNB1 + KNB5 + ADR6 | Masterdata | CC_Customers_*.txt |
| Open Items | Receivables OP | BSID + BSEG + BKPF | Open Items | CC_open_*.txt |
| Cleared Items | Cleared Items | BSAD + BSEG + BKPF | Cleared Items | CC_cleared_*.txt |
| Orders | Orders/SD | VBAK + VBAP + VBUK + VBKD + VBPA | Orders | CC_orders_*.txt |
Delta Strategy
Bilendo does not work with true delta (no change pointer, no IDOC). Instead, an overlapping time period is selected for each run. The integration offers two delta modes:
Simple Delta Selection (v2.1 Standard)
Selection via CPUDT/BUDAT with overlapping time windows (typically: 7 days). Easy to configure, but has weaknesses in detecting clearing events on documents whose creation date is outside the window.
| Data Type | Selection Field | Recommendation |
|---|---|---|
| Master Data | CPUDT (Creation Date) | Last 7 days, daily |
| Open Items | CPUDT + optionally CPUTM | Last 7 days, daily or hourly |
| Cleared Items | AUGDT (Clearing Date) | Last 7 days, daily |
| Orders | ERDAT (Creation Date) | Last 7 days, daily |
Two-Stage Delta Selection (recommended)
The improved variant uses two-stage logic: first the relevant document contexts are identified via BKPF or AUGDT, then the associated items are loaded from BSID/BSAD. This method is robust against misconfiguration and reliably captures clearing events on old documents.
| Data Type | Method | Stage 1 | Stage 2 | Recommendation |
|---|---|---|---|---|
| Open Items | get_open_delta() | BKPF: CPUDT/AEDAT last 6h | BSID: FOR ALL ENTRIES | Every 6 hours |
| Cleared Items | get_cleared_delta() | BSAD: AUGDT last 24h | BSAD: FOR ALL ENTRIES via AUGBL | Every 6 hours |
| Master Data | get_kna1() | CPUDT-based (as before) | – | Daily |
For details and ABAP code → 04 - Extractor Report#Improved Delta Logic Two-Stage Selection.
The overlap control is done via the selection variant (→ 07 - Variants & Job Planning).
Authorizations
The following authorizations are required for setup and operation:
| Phase | Authorization Object | Relevance |
|---|---|---|
| Installation | S_DEVELOP (ABAP Workbench) | Create report, class, structures |
| Installation | S_TABU_DIS (Table modification) | Activate DDIC objects |
| Operation | S_DATASET (File access) | Read/write on application server |
| Operation | S_BTCH_JOB (Batch processing) | Schedule SM36 job |
| Operation | F_BKPF_BUK (Company code FI) | Access to accounting data |
| Re-Integration | F_KNA1_BED (Modify customer master) | Write back credit limit, dunning level |