Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

DG700003 - DG: Material Exchange and Multiple Component Explosion

DG700003 - DG: Material Exchange and Multiple Component Explosion

TXBHW - Original Tax Base Amount in Local Currency   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

Activating the enhancement DG700003 allows you to make use of two functionalities:

  • Executing a material exchange
  • Explosion of multiple component materials

Material exchange:
The dangerous goods master records are determined for the exchanged materials. The dangerous goods checks access these dangerous goods master records. The dangerous goods data for the exchanged material is output on the delivery note. When dangerous goods data is dispatched via EDI in the delivery and the shipment, the dangerous goods master records of the exchanged materials are used.

Multiple component explosion:
For the exploded materials, the dangerous goods master records are determined and checked by the dangerous goods checks.
The dangerous goods data for the exploded components is not taken into account on the delivery note and during data transfer via EDI

Prerequisites

  • Dangerous goods checks:
    If the "Document items relevant for checks only" indicator is set in Customizing for the dangerous goods checks (DGA1), at the interface between the SD document and the main program for the dangerous goods checks only materials for which the dangerous goods indicator profile is not initial are transferred.
  • Dangerous goods documents
    In the dangerous goods documents, only materials for which the dangerous goods indicator profile is set as relevant for dangerous goods and dangerous goods documents are taken into account.

In a material exchange, materials that are to be taken into account in the dangerous goods checks and when outputting dangerous goods data should therefore have a dangerous goods indicator profile that is set at least as relevant for dangerous goods and dangerous goods documents.

Tasks of the function module exit

The interface of the function module exit contains the assignment table E_CHG_MATTAB in which it is possible to see which materials were exchanged or exploded in further processing in DG checks and documents.
The function module exit must fulfill the following tasks if further processing is to be successful:
Material exchange:

  • The number of the exchanged material must be written to the MATNR_CHG field

  • The FLG_CHG field must be filled as follows:
    Blank: No material exchange took place
    X: The material exchange was successful
    E: An error occurred during the material exchange

Multiple component explosion:

  • For the exploded materials, the item number of the relevant SD item must be written to the POSNR field

  • For the exploded materials, the material number of the relevant SD item must be written to the MATNR field

  • For the exploded materials, the material number of the exploded material must be written to the MATNR_DISLV field

  • For the material of the SD item, the material number of the SD item must be written to the MATNR_DISLV field

  • For the material of the SD item and the exploded materials, the FLG_DISLV field should be filled as follows:
    Blank: No multiple component explosion took place
    X: The multiple component explosion was successful
    E: An error occurred during the multiple component explosion

Description of the Parameters of the Function Module Exit DG700003

I_CHK_LIKP

Header data of the current shipping document to be checked

I_CHK_VBAK_WA

Header data of the current sales document to be checked

I_CHK_VTTKVB_WA

Header data of the current shipment document to be checked

I_CHK_LIPS

Item data of the current shipping document to be checked

I_DG_CHK_START

Parameter by means of which the start mode for the dangerous goods checks can be identified (for example, 01: manual check in shipping document)

I_CHK_VBAPTAB

Item data of the current sales document to be checked

I_CHK_VBEPTAB

Scheduling data of the current sales document to be checked

I_CHK_VTRLPTAB

Item data of the current shipment document to be checked

E_CHG_MATTAB

Table with assignments between the material in the SD item and the exchanged or exploded material

Sample Coding

The following sample coding executes the following tasks:

  • Exchanges material DG_01 with DG_02
  • Explodes material DGCOMP into DGCOMP_01 and DGCOMP_02
    **********************************************************************
    DATA: IDX LIKE SY-TABIX,
    TMP_CHG_MATTAB LIKE RDGCHANGE OCCURS 5 WITH HEADER LINE.

    * initialization
    CLEAR TMP_CHG_MATTAB.
    REFRESH TMP_CHG_MATTAB.


    LOOP AT E_CHG_MATTAB.
    IDX = SY-TABIX.

    * material change
    IF E_CHG_MATTAB-MATNR = 'DG_01'.
    E_CHG_MATTAB-MATNR_CHG = 'DG_02'.
    E_CHG_MATTAB-FLG_CHG = 'X'.
    MODIFY E_CHG_MATTAB INDEX IDX.
    ENDIF.

    * dissolving materials
    IF E_CHG_MATTAB-MATNR = 'DGCOMP'.
    E_CHG_MATTAB-MATNR_DISLV = 'DGCOMP'.
    E_CHG_MATTAB-FLG_DISLV = 'X'.
    MODIFY E_CHG_MATTAB INDEX IDX.

    * append dissolved materials
    * DGCOMP has two components: DGCOMP_01 and DGCOMP_02
    TMP_CHG_MATTAB-VBELN = E_CHG_MATTAB-VBELN.
    TMP_CHG_MATTAB-POSNR = E_CHG_MATTAB-POSNR.
    TMP_CHG_MATTAB-MATNR = E_CHG_MATTAB-MATNR.
    TMP_CHG_MATTAB-MATNR_DISLV = 'DGCOMP_01'.
    TMP_CHG_MATTAB-FLG_DISLV = 'X'.
    APPEND TMP_CHG_MATTAB.
    CLEAR TMP_CHG_MATTAB.

    TMP_CHG_MATTAB-VBELN = E_CHG_MATTAB-VBELN.
    TMP_CHG_MATTAB-POSNR = E_CHG_MATTAB-POSNR.
    TMP_CHG_MATTAB-MATNR = E_CHG_MATTAB-MATNR.
    TMP_CHG_MATTAB-MATNR_DISLV = 'DGCOMP_02'.
    TMP_CHG_MATTAB-FLG_DISLV = 'X'.
    APPEND TMP_CHG_MATTAB.
    CLEAR TMP_CHG_MATTAB.

    ENDIF.

    ENDLOOP.

    * append entries for dissolved materials to export table
    APPEND LINES OF TMP_CHG_MATTAB TO E_CHG_MATTAB.





PERFORM Short Reference   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 7048 Date: 20211208 Time: 014629     sap01-206 ( 62 ms )