Ansicht
Dokumentation

FREECHARSINORDFILLS - Derive Free Characteristics for Orders Requests and Order Request Fills

FREECHARSINORDFILLS - Derive Free Characteristics for Orders Requests and Order Request Fills

Vendor Master (General Section)   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

To automatically apply free characteristics in order requests by deriving them from the related commodity subaccount, and to automatically apply free characteristics in order request fills by deriving them from the related order request or commodity subaccount, you have to perform the steps described below. Since CDOTE uses the Business Object Processing Framework, these steps apply to both, order requests and order request fills:

  1. Create Enhancement for BOPF Object
    1. Navigate to transaction /BOBF/CUST_UI and search for the BOPF object.
      For the commodity subaccount, it is I_COMMODITYSUBACCOUNTTP.
      For the order request, it is I_COMMODITYORDERREQUESTTP.
      For the order request fill, it is I_COMMODITYORDFILLPACKETTP.
    2. Open the BOPF object you want to enhance. To create a new enhancement, select Business Object Enhancement. A wizard will guide you through the process.
Note:
When creating an enhancement, which has effects on order request fills, before selecting Business Object Enhancement, you have to choose the I_COMMODITYORDERFILLTP node.
  1. Create Determination for BOPF Object
    1. Navigate to transaction /BOBF/CUST_UI and search for your just created enhancement.
    2. Navigate into it and, in the Entity Browser, right-click on New Determination in the menu.
    3. Now, a wizard will guide you through the creation process.
    4. After going through that wizard, you should be able to navigate into a newly created class. Within that class you can now implement the EXECUTE method. This method can then be used to assign the required free characteristics. See the example code below. This example code reads free characteristics from the subaccount database table, and put the data to free characteristics fields in the order request.

  METHOD /bobf/if_frw_determination~execute.
    DATA(lt_order_request) = VALUE itcommodityorderrequesttp( ).
    DATA: lt_chg_fields  TYPE /bobf/t_frw_name.

*--> Retrieving the Order Request Details
    io_read->retrieve( EXPORTING iv_node       = is_ctx-node_key
                                 it_key        = it_key
                       IMPORTING et_data       = lt_order_request
                                 et_failed_key = et_failed_key ).

     LOOP AT lt_order_request REFERENCE INTO DATA(lr_order_request).
      SELECT SINGLE * FROM cmmfsa_d_subacct INTO @DATA(ls_subaccount_data) WHERE commoditysubaccount = @lr_order_request->commoditysubaccount.
      IF sy-subrc <> 0.
        CONTINUE.
      ENDIF.

      CLEAR lt_chg_fields.
      lr_order_request->zz1_ freechar_cmm = ls_subaccount_data-zz1_freechar_cmm.

      APPEND 'ZZ1_FREECHAR_CMM' TO lt_chg_fields.

     io_modify->update(
        EXPORTING
          iv_node           =     is_ctx-node_key
          iv_key            =     lr_order_request->key
          is_data           =     lr_order_request
          it_changed_fields =     lt_chg_fields   ).

    ENDLOOP.

  ENDMETHOD.






General Data in Customer Master   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 5215 Date: 20240523 Time: 203945     sap01-206 ( 64 ms )