Ansicht
Dokumentation
DMF_BADI_SALES_ORDR - BAdI: Read Sales Order
TXBHW - Original Tax Base Amount in Local Currency TXBHW - Original Tax Base Amount in Local CurrencyThis documentation is copyright by SAP AG.
This Business Add-In (BAdI) is used in the Logistics Basic Data ( LO-MD) component in the area Logistics Merchandise Lifecycle Optimization. You use this BAdI to retrieve the database entries needed for processing sales order documents.
This BAdI reads all data from the database for DRFOUT initial, change, and manual modes for sales order documents, depending on the method implemented. This BAdI must be implemented to allow output of SAP Fashion Management Solution (FMS) season fields associated with sales order documents and shipment documents.
This BAdI uses the following methods:
- READ_COMPLETE_DATA
- Use this method to customize reading the sales order document data from the database for initial and manual modes only. This method uses the following parameters:
- Importing
- IV_APPLICATION
- Replication Model configured to run with Sales Orders.
- IT_VBELN
- Sales Order numbers that are currently configured in manual mode to run with Sales Orders. This table is optional.
- IT_KUNNR
- Sold-to-parties (customers) that are currently configured in manual mode to run with Sales Orders. This table is optional.
- IT_KUNNR_SH
- Ship-to-parties (customers) that are currently configured in manual mode to run with Sales Orders. This table is optional.
- IT_WERKS
- Supplying plants (locations) that are currently configured in manual mode to run with Sales Orders. This table is optional.
- IT_MATNR
- Material Numbers (MATNR) that are currently configured in manual mode to run with Sales Orders. Materials can be any single, generic with variants, or structured articles. This table is optional.
- IV_DOC_START_DATE
- The start date for looking for sales orders (as compared to VBAK-AUDAT). This is calculated based on the past period in days configuration for sales orders.
- Changing
- CT_DOCUMENT
- DMF Sales Order Document raw data.
- CT_ELIGIBLE_SALES_ORDR_ITEM
- Sales Orders eligible for processing at the sales order item level.
- READ_CHANGED_DATA
- Use this method to customize reading the sales order document data from the database for change mode only. This method uses the following parameters:
- Importing
- IV_APPLICATION
- Replication Model configured to run with Sales Orders.
- IV_LAST_EXECUTED_ON_DATE
- Last executed on date. Date when DRFOUT for Sales Orders was last run successfully for your target system.
- Changing
- CT_DOCUMENT
- DMF Sales Order Document raw data.
- CT_ELIGIBLE_SALES_ORDR_ITEM
- Sales Orders eligible for processing at the sales order item level.
For more information about the standard settings (filters, single or multiple uses), see the Enhancement Spot Element Definitions tab in the BAdI Builder (transaction SE18).
To customize the BAdI methods to include season fields:
- Copy the standard code in the CL_DMF_SALES_ORDR_DBmethod (only the code in the ELSE … ENDIF portion of the if lr_sales_ordr is bound) to your BAdI Implementation method.
- Adjust the code that matches the snippet below (in more than one place) for season fields to be read (if needed).
- If adjustments are being made to method READ_COMPLETE_DATA, find and replace all occurrences of: lv_doc_start_date with iv_doc_start_date, lt_document with ct_document, and lt_eligible_sales_ordr_item with ct_eligible_sales_ordr_item.
- If adjustments are being made to method READ_CHANGED_DATA, find and replace all occurrences of: lv_last_executed_on_date with iv_last_executed_on_date, lt_document with ct_document, and lt_eligible_sales_ordr_item with ct_eligible_sales_ordr_item.
- Save.
- Activate.
Season Fields
The following code snippet can be used to enable the season fields in your implementation by removing the comment character (") from the lines that start with li~fsh_:
…
"Season fields available in FMS or S4HANA only |
"Implement BAdI if season fields are needed (see documentation) |
"li~fsh_season_year as season_yr, |
"li~fsh_season as season_id, |
"li~fsh_collection as ext_collect_id, |
"li~fsh_theme as ext_theme_id, |
rdisp/max_wprun_time - Maximum work process run time General Data in Customer Master
This documentation is copyright by SAP AG.
Length: 7433 Date: 20240523 Time: 170951 sap01-206 ( 78 ms )