Ansicht
Dokumentation

ANASTR_FROM_ORDFIELD - Derive Analysis Structure from Order Fields

ANASTR_FROM_ORDFIELD - Derive Analysis Structure from Order Fields

ABAP Short Reference   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

This documentation describes, how to fill the analysis structure of Treasury and Risk Management (TRM) with fields of Commodity Derivative Order and Trade Execution (CDOTE). This is required to correctly transfer free characteristics from CDOTE to TRM.

The following example illustrates the steps, how to transfer free characteristics for commodity future transactions from CDOTE to TRM. The mentioned BAdI and Customizing settings are called whenever a commodity futures transaction is created. The same will happen, if a Trade At Settlement order creates a commodity forward.

Note, that this documentation does not cover steps to setup an analysis structure. The knowledge about the derivation tool is seen as a prerequisite.

  1. Customizing Settings to Derive Analysis Structure
    As the example covers commodity futures, you must perform the Customizing settings under Financial Supply Chain Management → Treasury and Risk Management → Basic Analyzer Settings → Automatic Integration of Financial Objects in Transaction Master Data → Securities and Listed Derivatives Define Derivation Strategy for Lot-Based Position in Futures Account.
    1. Chose the analysis structure relevant for your use case, and add a new derivation step of type Enhancement.
    2. Define all fields required to determine whether this step should be executed as Source Fields, and all fields you want to fill as Target Fields.
    3. Save your entries.
    4. If required, add additional steps to fill the remaining analysis structure.
  2. Implement BAdI to Get Analysis Structure Filled

  • To access the commodity derivative order request ID, fill ID, and fill packet, you can use the CDOTE-specific class CL_CMMFDAU_ API_FIL_PROC_IN_TRM, and call the static method GET_CURRENT_INSTANCE.

  • If an instance is found, it will contain the order request ID, fill ID, and fill packet currently worked on.
    See the following example BAdI implementation:

METHOD if_tan_pos3_derivation_enh~derive_characteristics.
    FIELD-SYMBOLS: TYPE i75cmm1.
    FIELD-SYMBOLS: TYPE i75cmm1.

    MOVE-CORRESPONDING i_fob TO e_fob.
    MOVE-CORRESPONDING i_temp TO e_temp.

    ASSIGN i_rm_char TO .
    ASSIGN e_rm_char TO .

    IF -wyq07s = '70D'.
      DATA(lo_cdote_data) = cl_cmmfdau_api_fil_proc_in_trm=>get_current_instance( ).
      IF lo_cdote_data IS BOUND.
**Place here your logic to derive analysis characteristics using CDOTE data
        -wycms = 'MY STRATEGY'.
        -wycmp = 'CM_CCAT_01'.
        e_exit_is_active = abap_true.
      ENDIF.
    ENDIF.
  ENDMETHOD.






General Material Data   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 4401 Date: 20240523 Time: 224337     sap01-206 ( 61 ms )