Проверенные примеры BAdI для Exposure Management, проверки эффективности хеджирования, платёжных заявок и интеграции с One Exposure в SAP S/4HANA On-Premise 2025 FPS01.
5 мин чтения·База знаний
Ревизия 1Применимость к указанным контекстамЧастичное покрытиеКонтекст: CTX-S4-ONPREMдокументальная опора: недостаточно данных
Справочный материал. Контракты данных, архитектурные решения и ограничения применения. Источники приведены в материалах, где используются внешние основания.
В TRM нет одной универсальной точки расширения «для сделки». Требуемое изменение может относиться к derivation полей, экспорту позиции, расчёту эффективности, подготовке платёжного запроса или передаче потоков ликвидности. Для каждого случая SAP документирует свой объект и место вызова. Установка BAdI в одном потоке не означает, что тот же код выполнится в другом приложении, релизе или варианте обработки.
Ниже перечислены примеры для SAP S/4HANA On-Premise 2025 FPS01. Это карта мест, где сначала искать контракт и условия вызова. Она не утверждает, что конкретная система активировала enhancement или что авторский ABAP уже проверен.
Для Exposure Management 2.0 SAP описывает настройку derivation strategy для полей raw exposure и два отдельных BAdI: enhancement для derivation полей и export enhancement для exposure positions. Экспортная точка связана с enhancement spot ES_TEX_POSITION и BAdI BADI_TEX_POSITION_EXPORT; её назначение - передавать данные позиции в другие приложения или marketplaces.
Не смешивайте получение полей raw exposure с экспортом уже сформированной позиции. До реализации установите, на каком этапе поле возникает, что является входом и выходом BAdI, как проходят release и update raw exposure и какой идентификатор позиции сохраняется при передаче. Экспорт одной позиции не доказывает, что принимающая сторона приняла её или что исходная позиция получила новый статус.
Для метода linear regression в effectiveness test SAP перечисляет три способа определить параметры: хранить независимые значения в методе, использовать condition types для градиента и R² либо применить customer enhancement BAdI Linear Regression Assessment Method Enhancement. Профиль хеджирования ссылается на метод; для теста и оценок также требуются соответствующие рыночные данные, сценарии или сдвиги.
Это расширение метода оценки, а не обход самой проверки эффективности. Сначала подтвердите, что нужные параметры и данные теста соответствуют сценарию, и сохраните детальный расчёт. В пользовательском методе отдельно проверяйте граничные случаи, единицы, знак изменений и пустые или недостаточные рыночные наблюдения. Ни один пользовательский критерий не следует считать подтверждением соответствия IFRS 9 или US GAAP без самостоятельного утверждения учётной политики.
В сценарии платёжных заявок SAP документирует BAdI TPM_EXT_PAYMENT_TRPR для использования другой платёжной программы, например In-House Cash. Это изменение интеграции платёжного потока, а не универсальная замена создания и учёта сделки. Настройка и ответственность за следующие этапы зависят от целевой платёжной программы.
Перед расширением составьте трассу от flow к payment request, вызову платёжного процесса, платёжному документу, payment medium и обратной банковской информации. Убедитесь, на каком этапе вызывается BAdI, каким ключом связаны записи, как обрабатывается частичный отказ и что происходит при повторном запуске. Запрос на платёж сам по себе не означает, что средства ушли или поступили.
В классическом процессе передачи TRM в One Exposure документированы BADI_FQM_DERIVE_LQITEM_TRM для derivation liquidity item по дополнительным TRM-параметрам и BADI_FQM_FLOW_ADJUST_CORE для корректировки потока, например flow type. Эти BAdI не вызываются в упрощённом процессе передачи. Это различие нужно проверить до разработки: изменение может работать на одном пути, но не на другом.
Сверяйте исходный TRM flow и соответствующую строку One Exposure: тип потока, liquidity item, planning level, company code, сумму, валюту и business transaction. Проверьте активацию источника TRM, инициализацию, update types и применяемый способ transfer. Различайте правила, которые реализованы в Customizing query, от изменения, выполненного BAdI.
Реализуйте узкое изменение через документированный enhancement point и авторизованный ABAP-проект. Избегайте модификации стандартных объектов и прямого обновления внутренних таблиц.
Проверьте тесты для всех relevant branches: классический и упрощённый процесс там, где применимо, пустые или неполные данные, отмена, повторная обработка, новая версия и параллельные valuation areas.
После обновления релиза подтвердите статус и сигнатуру точки расширения, повторите проверки результата и проверьте, что стандартный путь без реализации продолжает работать.
Практический артефакт должен содержать техническое имя точки, версию системы, конфигурацию вызова, код реализации, тестовые входы, ожидаемый и фактический результат, логи и проверку регрессии. Здесь не приведены код ABAP, транспорт, активная конфигурация или фактический запуск.
Все примеры взяты из SAP S/4HANA On-Premise 2025 FPS01. Совпадающий BAdI может иметь другой статус или условие вызова в другой версии или edition. В частности, классический и упрощённый путь One Exposure имеют различный набор вызываемых BAdI. Клиентская система, реализация, транспорт и runtime не проверялись.
TRM does not have one universal extension point "for the transaction." A change may concern field derivation, position export, effectiveness calculations, payment-request processing, or liquidity-flow transfer. SAP documents different objects and invocation points for these cases. Installing one BAdI in one flow does not mean the same code runs in another app, release, or processing variant.
The following examples are for SAP S/4HANA On-Premise 2025 FPS01. This is a map of where to find the contract and invocation conditions, not a claim that a particular system has activated an enhancement or that custom ABAP has been tested.
For Exposure Management 2.0, SAP documents a derivation strategy for raw-exposure fields and two separate BAdIs: one for field derivation and another for exporting exposure positions. The export point is associated with enhancement spot ES_TEX_POSITION and BAdI BADI_TEX_POSITION_EXPORT; its purpose is to transfer position data to other applications or marketplaces.
Do not confuse filling raw-exposure fields with exporting an already created position. Before implementation, identify when the field is created, the BAdI input and output, how raw-exposure release and update work, and which position identifier is retained in the transfer. Exporting a position does not prove that the receiving system accepted it or that the source position received a new status.
For a linear-regression effectiveness test, SAP lists three ways to determine parameters: store independent values in the method; use condition types for gradient and R-squared; or apply the customer enhancement BAdI Linear Regression Assessment Method Enhancement. The hedging profile refers to the method. The test and valuations also require appropriate market data, scenarios, or shifts.
This extends the assessment method; it does not bypass the effectiveness test. First confirm that the required parameters and test data fit the scenario, and retain a detailed calculation. In a custom method, separately test edge cases, units, change signs, and missing or insufficient market observations. A custom criterion is not proof of compliance with IFRS 9 or US GAAP without independent approval of the accounting policy.
For payment requests, SAP documents BAdI TPM_EXT_PAYMENT_TRPR as an option for using another payment program, such as In-House Cash. This changes integration of the payment flow; it is not a universal replacement for trade creation and accounting. Configuration and responsibility for later steps depend on the target payment program.
Before implementing the extension, trace the flow from TRM to payment request, payment-process invocation, payment document, payment medium, and bank response. Verify when the BAdI is called, which keys link the records, how partial failure is handled, and what happens on retry. A payment request alone does not mean funds were sent or received.
For the classic transfer from TRM to One Exposure, SAP documents BADI_FQM_DERIVE_LQITEM_TRM to derive a liquidity item from additional TRM parameters and BADI_FQM_FLOW_ADJUST_CORE to adjust a flow, for example its flow type. These BAdIs are not called in the simplified transfer process. Check this distinction before development: a change may run on one path but not the other.
Reconcile the source TRM flow and the corresponding One Exposure row: flow type, liquidity item, planning level, company code, amount, currency, and business transaction. Check activation of the TRM source, initialization, update types, and transfer mode. Distinguish rules implemented in Customizing queries from changes made by a BAdI.
Identify the product, edition, release, process, object, and invocation point.
Find the official documentation for the BAdI, enhancement spot, filters, parameters, invocation condition, and Customizing settings.
Check whether standard configuration, derivation rules, an application, or a released API can solve the requirement.
Define the expected outcome, inputs, errors, retries, and traceability.
Implement a narrow change through the documented enhancement point in an authorized ABAP project. Avoid modifying standard objects or directly updating internal tables.
Test every relevant branch: classic and simplified One Exposure flows where applicable, empty or incomplete data, reversal, retry, new revision, and parallel valuation areas.
After an upgrade, confirm the extension point's status and signature, repeat result checks, and verify that the standard path still works without the implementation.
A practical artifact should record the technical enhancement point, system version, invocation configuration, implementation code, test inputs, expected and actual results, logs, and regression check. This article does not provide ABAP code, a transport, an active configuration, or an execution result.
All examples are from SAP S/4HANA On-Premise 2025 FPS01. The same BAdI name may have a different status or invocation condition in another edition or release. In particular, the classic and simplified One Exposure paths call different sets of BAdIs. A customer system, implementation, transport, and runtime were not checked.