/
Determination by table/field structure.

Determination by table/field structure.

Transaction /EDGE/FC_SPRO → Configuration Folder "Automatic business unit determination" → Subfolder "Table/Structure - field determination".

You can access this configuration only if an automatic determination has been previously selected.

This configuration allows you to specify the names of the structures or internal tables that are sent to the context of the process when it is started. What this means is that, at the ABAP level, these structures and/or internal tables must be passed to the automatic determination procedure through a class that contains them.

As an example, let's consider the implementation of the BADI for SD invoice accounting, where the initiation of a process depends on the invoice data. This data is stored in structures and internal tables.

Below is the code:

    FIELD-SYMBOLS<fs_xvbrk> TYPE vbrk_tab,
                   <fs_xvbrp> TYPE vbrp_tab,
                   <fs_xvbpa> TYPE vbpa_tab,
                   <fs_xkomv> TYPE komv_tab.
    DATAlr_params  TYPE REF TO /edge/cl_fc_start_process_para,
          lt_data    TYPE abap_trans_resbind_tab,
          wa_data   LIKE LINE OF lt_data,
          lr_exc    TYPE REF TO /edge/cx_fc_einvoice_exception,
          lr_cxroot TYPE REF TO cx_root,
          lr_cx2    TYPE REF TO cx_root,
          lr_log    TYPE REF TO /edge/cl_fc_einvoice_util_logs.

    TRY .
        wa_data-name 'VBRK_TAB'.
        CREATE DATA wa_data-value TYPE vbrk_tab.
        ASSIGN wa_data-value->TO <fs_xvbrk>.
        <fs_xvbrk> xvbrk.
        APPEND wa_data TO lt_data.

        wa_data-name 'VBRP_TAB'.
        CREATE DATA wa_data-value TYPE vbrp_tab.
        ASSIGN wa_data-value->TO <fs_xvbrp>.
        <fs_xvbrp> xvbrp.
        APPEND wa_data TO lt_data.

        wa_data-name 'VBPA_TAB'.
        CREATE DATA wa_data-value TYPE vbpa_tab.
        ASSIGN wa_data-value->TO <fs_xvbpa>.
        <fs_xvbpa> xvbpa.
        APPEND wa_data TO lt_data.

        wa_data-name 'KOMV_TAB'.
        CREATE DATA wa_data-value TYPE komv_tab.
        ASSIGN wa_data-value->TO <fs_xkomv>.
        <fs_xkomv> xkomv.
        APPEND wa_data TO lt_data.

        CREATE OBJECT lr_params
          EXPORTING
            pi_data lt_data.

        /edge/cl_fc_start_process_ext=>start_process_syncEXPORTING pi_do_commit abap_false
                                                            CHANGING pc_params lr_params ).
      CATCH /edge/cx_fc_einvoice_exception INTO lr_exc.
        TRY .
            CREATE OBJECT lr_log
              EXPORTING
                pi_object    /edge/cl_fc_constants=>log_object
                pi_subobject /edge/cl_fc_constants=>sublog_startp
                pi_alprog    sy-cprog.
            lr_log->add_messages_from_exceptionlr_exc ).
          CATCH cx_root INTO lr_cx2.
*           Nothing to do!!!
        ENDTRY.

      CATCH cx_root INTO lr_cxroot.
        TRY .
            CREATE OBJECT lr_log
              EXPORTING
                pi_object    /edge/cl_fc_constants=>log_object
                pi_subobject /edge/cl_fc_constants=>sublog_startp
                pi_alprog    sy-cprog.
            lr_log->add_messages_from_exceptionlr_cxroot ).
          CATCH cx_root INTO lr_cx2.
*           Nothing to do!!!
        ENDTRY.

    ENDTRY.


In the previous code, you can see that the process was initiated by passing the internal tables VBRK_TAB, VBRP_TAB, VBPA_TAB, and KOMV_TAB. This way, they are sent to the beginning of the process to be obtained by the automatic determination process.

Next, in the functional configuration, the following fields must be specified:

  • Table Name
    This corresponds to the name of the internal table or structure that was passed as an input parameter to the process. There is a default structure that is always considered, which is the SY structure, which should be entered as SYST at the ABAP dictionary level.
    If any of these tables or structures do not reach the automatic determination process, the process assumes a false determination and concludes its execution.
    In the case of indicating internal tables, each of their records is verified, and if at least one meets the condition of the indicated field, the determination returns true for that table.

  • Field Name
    This corresponds to the name of the field that will be checked in the structure or table indicated in the previous field. If the field does not exist in the internal table or structure, the determination will return false.

  • Name validation
    Name that identifies the validation. This information is only for traceability purposes in the log.


After configuring the fields of the internal tables and/or structures that must be validated to determine whether to instantiate the business unit for automatic determination, you must configure the values that these fields must have in the internal table or structure. This is done through the option: Values for Determination.

Here is an example of the configuration of the fields:

Related content

Avvale 2024