Fonction SAP BAPI_WRF_MATGRP_CHANGE - BAPI_WRF_MATGRP_CHANGE

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
DESCRIPTION_HIERARCHY BAPI_WRF_DESC_CH_HIER_TTY h 44 BAPI CHANGE Structure: Article Hierarchy Description
DESCRIPTION_STRUCTURE BAPI_WRF_DESC_CH_STRUC_TTY h 122 BAPI CHANGE Structure: Hierarchy Node Description
EXTENSION_IN BAPI_WRF_EXTENSION_TTY h 990 Return
HIERARCHY_DATA BAPI_WRF_HIER_CHANGE_HEAD u 14 BAPI-CHANGE Structure: Article Hierarchy Header
HIERARCHY_ITEMS BAPI_WRF_HIER_CH_ITEMS_TTY h 53 BAPI CHANGE Structure: Article Assignment
HIERARCHY_STRUCTURE BAPI_WRF_HIER_CH_STRUC_TTY h 69 BAPI CHANGE Structure: Article Hierarchy
NO_VARIANT_DETERMINATION XFELD C 1 X Checkbox
TESTRUN BAPI_WRF_TESTRUN_STY u 1 Simulation (X or Space)

Paramètre Reférence Type Long. Description
RETURN BAPI_WRF_RETURN_TTY h 548 Return

Functionality
Changing an existing article hierarchy
Using the BAPI BAPI_WRF_MATGRP_CHANGE, you can change an existingarticle hierarchy, delete it, or insert substructures. The functionalityapplies to the hierarchy, the language-dependent texts, and thearticles.
Using the parameter HIERARCHY_DATA, the data for identification of aheader record of an article hierarchy is transferred. This data consistsof the hierarchy ID and the node. In addition, you have to set theindicator CHANGE for control of the functionality of the BAPI. Theindicator CHANGE can have the values Update, Delete orInsert.
The required information is transferred by way of the tablesDESCRIPTION_HIERARCHY, HIERARCHY_STRUCTURE, DESCRIPTION_STRUCTURE andHIERARCHY_ITEMS. The BAPI can only carry out its function if no errormessages have been generated in the table Return. This is the case if ithas been possible to process the header data and all items withouterrors.
The structure HIERARCHY_ITEMS contains the import parameterNO_REFERENCE_HANDLING, with which you can control if the header data ofthe generic article is to be passed to the variant. If the parameter isset, then no header data is passed to the variant. As default, theparameter is not set.
The parameter test run is used in order to check the structurebefore actually creating the hierarchy in the database. Creating thehierarchy is only simulated here and the data is not updated (posted).

Example

  • Assignments that are to be newly created are created with the current
  • date.
    • In cases where an assignment (scheduled) is reassigned, both the old and
    • new parent node is to be entered in table HIERARCHY_STRUCTURE.

      Notes
      If the number assignment is made internally in the system by way of aninternal number range interval, then the node numbers entered in tableHIERARCHY_STRUCTURE are replaced and created by a sequential internalnumber.