> For the complete documentation index, see [llms.txt](https://docs.editran.onesait.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.editran.onesait.com/documentacion-editran/documentacion-editran-editran-sepa-v3-open-en/uso-de-la-zona-libre-de-los-registros/plano-a-xml.md).

# Flat file to XML

For its part, when the client is the one generating the flat-format files, it may make use of certain free areas to store information that would otherwise be impossible to transfer to the XML file resulting from the conversion. These are the following:

**Issuance of transfers and checks:**

The content of:

* 70 positions, starting at 290, of the Payer Header to `<InitgPty><Nm>`. This functionality is used to be able to transform several flat logical files that do not match in payer names into a single XML.
* 4 positions, starting at 360, of the Payer Header to as many elements `<PmtInf><PmtInfId>` as need to be built in the resulting XML file. This mapping makes it possible to report and preserve this concept (which is not contemplated in either format) so that it can be returned in the bank statements sent by La Caixa (AEB 43).
* 12 positions, starting at 364, of the Payer Header to `<InitgPty><Id><OrgId>` or to `<InitgPty><Id><PrvtId>`, as appropriate. This functionality is used to be able to convert several flat logical files that do not match in payer identifiers into a single XML file, this being the Presenter Id that will be reported.
* When the value `H`, is found in position 23 of the \[SEPA Transfers Header Record], `<PmtInf><PmtTpInf><InstrPtry>` will be completed `HIGH` with the code
* 18 positions, starting at 41 of the \[General Total Record], to `<GrpHdr><CtrlSum>`. It will be used to capture amounts of 18 digits in total (the flat-format standard allows up to 17).
* 15 positions, starting at 59 of the \[General Total Record], to `<GrpHdr><NbOfTxs>`. It will be used to capture individual record numbers whose value exceeds the 8 digits allowed by the flat format.
* 18 positions, starting at 41 of the \[SEPA Transfers Total Record], \[Other Transfers Total Record], or \[Checks Total Record], as appropriate by block type, to `<PmtInfId><CtrlSum>`. It will be used to capture amounts of 18 digits in total (the flat-format standard allows up to 17).
* 15 positions, starting at 59 of the \[SEPA Transfers Total Record], \[Other Transfers Total Record], or \[Checks Total Record], as appropriate by block type, to `<PmtInfId><NbOfTxs>`. It will be used to capture individual record numbers whose value exceeds the 8 digits allowed by the flat format.
* Booklet versions in SEPA Transfer Block:

  * Files with booklet version 34156 are converted to payment blocks with `SDCL` in `<LclInstrm><Cd>`.
  * Files with booklet version 34167 are converted to payment blocks with value `HIGH` in `<InstrPrty>`.
  * Files with booklet version 34171 are converted to payment blocks with `INST` in `<LclInstrm><Cd>`.
  * Files with booklet version 34182 are converted to payment blocks with `VOP` in `<LclInstrm><Prtry>`.

  In all cases, `<PmtTpInf>` will be reported at payment block level (`<PmtInf>`).
* The value `URGP` in:
  * Position 58 of the \[Other Transfers Payer Header Record] is mapped to `<SvcLvl>` of `<PmtTpInf>` reported at payment block level (`<PmtInf>`).
  * Position 426 of the \[First Beneficiary Record of Other Transfers] is mapped to `<SvcLvl>` of `<PmtTpInf>` reported at individual transaction level (`<CdtTrfTxInf>`).

**Direct debits (basic and B2B schemes):**

* Presentations, the content of:
  * Basic scheme only: the content of field 10 together with the first six positions of the free field in the \[Optional Fourth Individual Record] to `<OrgnlDbtrAgt><FinInstnId><BIC>` if it is a BIC, or to `<OrgnlDbtrAgt><FinInstnId><Othr><Id>` in any other case.
  * 18 positions, starting at 81, of the \[Creditor Total Record by collection date] to `<PmtInf><CtrlSum>`. It will be used to capture amounts of 18 digits in total (the flat-format standard allows up to 17).
  * 15 positions, starting at 99, of the \[Creditor Total Record by collection date] to `<PmtInf><NbOfTxs>`. It will be used to capture individual record numbers whose value exceeds the 8 digits allowed by the flat format.
* Rejections, the content of:
  * 11 positions, starting at 167, of the \[Presenter Header] record to `<OrgnlGrpInfAndSts><StsRsnInf><Orgtr><Id><OrgId><BICorBEI>` if it is a BIC, or to `<OrgnlGrpInfAndSts><StsRsnInf><Orgtr><Nm>` if it is not.
  * 4 positions, starting at 178, of the \[Presenter Header] record to `<OrgnlGrpInfAndSts><StsRsnInf><Rsn><Cd>`
  * 11 positions, starting at 370, of the \[Creditor Header by collection date] record, to `<OrgnlPmtInfAndSts><StsRsnInf><Orgtr><Id><OrgId><BICorBEI>` if it is a BIC, if not to `<OrgnlPmtInfAndSts><StsRsnInf><Orgtr><Nm>`
  * 4 positions, starting at 381, of the \[Creditor Header by collection date] record, to `<OrgnlPmtInfAndSts><StsRsnInf><Rsn><Cd>`
  * 11 positions, starting at 586, of the \[First Individual Record] to `<OrgnlPmtInfAndSts><TxInfAndSts><StsRsnInf><Orgtr><Id><OrgId><BICorBEI>` if it is a BIC, if not to `<OrgnlPmtInfAndSts><TxInfAndSts><StsRsnInf><Orgtr><Nm>`
* Reversals, the content of:
  * 18 positions, starting at 81, of the \[Creditor Total Record by collection date] to `<OrgnlPmtInfAndRvsl><OrgnlNbOfTx>`. It will be used to capture amounts of 18 digits in total (the flat-format standard allows up to 17).
  * 15 positions, starting at 99, of the \[Creditor Total Record by collection date] to `<OrgnlPmtInfAndRvsl><OrgnlNbOfTx>`. It will be used to capture individual record numbers whose value exceeds the 8 digits allowed by the flat format.
* Presentations and reversals, the content of:
  * 18 positions, starting at 38, of the \[General Total Record] to `<GrpHdr><CtrlSum>`. It will be used to capture amounts of 18 digits in total (the flat-format standard allows up to 17).
  * 15 positions, starting at 56, of the \[General Total Record] to `<GrpHdr><NbOfTxs>`. It will be used to capture individual record numbers whose value exceeds the 8 digits allowed by the flat format.
* Rejections and returns, the content of:
  * 35 positions, starting at 335, of the \[Creditor Header by collection date] record to `<OrgnlPmtInfAndSts><OrgnlPmtInfId>`.
  * 18 positions, starting at 81, of the \[Creditor Total Record by collection/return date] to `<OrgnlPmtInfAndSts><OrgnlNbOfTx>`. It will be used to capture amounts of 18 digits in total (the flat-format standard allows up to 17).
  * 15 positions, starting at 99, of the \[Creditor Total Record by collection/return date] to `<OrgnlPmtInfAndSts><OrgnlNbOfTx>`. It will be used to capture individual record numbers whose value exceeds the 8 digits allowed by the flat format.
  * 18 positions, starting at 38, of the \[General Total Record] to `<OrgnlGrpInfAndSts><OrgnlCtrlSum>`. It will be used to capture amounts of 18 digits in total (the flat-format standard allows up to 17).
  * 15 positions, starting at 56, of the \[General Total Record] to `<OrgnlGrpInfAndSts><OrgnlNbOfTxs>`. It will be used to capture individual record numbers whose value exceeds the 8 digits allowed by the flat format.
* Returns, the content of:

  An \[Optional Second Individual Record] is contemplated, which will begin with `2319143004`. This record does not exist in the standard but is necessary to store the information detailed below and which cannot be mapped to the \[First Mandatory Individual Record], since it does not have enough space in the free field.

  * 35 positions starting at position 11, of the \[Optional Second Individual Record] to the tag `<TxInfAndSts><StsId>`
  * 35 positions starting at 46, of the \[Optional Second Individual Record], to the tag `<TxInfAndSts><OrgnlInstrId>`
  * 105 positions, starting at 81, of the \[General Total Record] to `<OrgnlGrpInfAndSts><StsRsnInf><AddtlInf>`.

The converter will first look for this information in the free fields. If they were empty, the mapping will be performed as is usually done for each of those fields.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.editran.onesait.com/documentacion-editran/documentacion-editran-editran-sepa-v3-open-en/uso-de-la-zona-libre-de-los-registros/plano-a-xml.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
