Skip to main content

Bank statement (Fiori Draft, multi-line)

Use the curated action statement/create_bank_statement. Pass one or more lines. The first line fills the draft’s auto-created row; extra lines are added through the item navigation automatically. (Background: Overview.)

from abstra.connectors import run_connection_action

run_connection_action(
connection_name="my_sap",
action_name="statement/create_bank_statement",
params={
"companyCode": "1000",
"houseBank": "HB01",
"houseBankAccount": "ACC01",
"bankStatementDate": "2026-01-31",
"lines": [
{"amount": "100.00", "valueDate": "2026-01-31", "manualTransactionType": "001"},
{"amount": "250.00", "valueDate": "2026-01-31", "manualTransactionType": "001"},
],
"activate": False, # draft; set true to effectivate
},
)

Smart Chat:

Using my "my_sap" connector, create a bank statement for company 1000,
house bank HB01 account ACC01, dated 2026-01-31, with two lines:
100.00 and 250.00 (value date 2026-01-31). Keep it as a draft.
Why you can't just POST line items

On the bank-statement service a plain POST to the item entity set raises a RAISE_SHORTDUMP. The draft auto-creates the first item row (set it via MERGE); additional lines must be POSTed through the parent’s to_Item navigation. The curated action does both for you — you only pass lines.

Single line

For a one-line statement you can skip lines and pass the flat amount/valueDate/manualTransactionType fields directly — they become the single line.