×

[PR]この広告は3ヶ月以上更新がないため表示されています。
ホームページを更新後24時間以内に表示されなくなります。




Sapass

 Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> Bapi>RetailMaterial



Index

RetailMaterial

RetailMaterial


The business object Retail material is a material which is primarily traded.


Structure
The following types of retail materials exist:


  • Single material

  • Prepack

  • Display

  • Sales set

  • Generic material

  • Generic material variant

  • Value-only material

  • Retail materials that are only traded in a season are called seasonal materials.


    For empties processing, full products and "empties" materials are used.


    Retail materials that are asssigned to other retail materials to
    support effective presentation of the latter in sales are called additionals. Some typical additionals are: shelf-edge and material
    labels, hangers, special services such as pressing etc.


    Note
    Retail materials are used exclusively for SAP Retail.


    Preconditions


    Ihr R/3-System ist als SAP-Retail-System ausgepr臠t.


    11-Dec-2005


    Methods

    Available Methods


    • Availability : ATP information [ BAPI_MATERIAL_AVAILABILITY ]
    • Clone : Create and change material master data (retail) [ BAPI_MATERIAL_MAINTAINDATA_RT ]
    • Create : Create material [ BAPI_RETAILMATERIAL_CREATE ]
    • Delete : Discontinue material [ BAPI_RETAILMATERIAL_DELETE ]
    • Display : Display material [ BAPI_MATERIAL_DISPLAY ]
    • Edit : Change material [ BAPI_MATERIAL_EDIT ]
    • ExistenceCheck : Check existence of object [ BAPI_MATERIAL_EXISTENCECHECK ]
    • GetBatchCertificate : Quality certificate for batch in PDF [ BAPI_MATERIAL_GETBATCHCERT ]
    • GetBatches : Batches for material [ BAPI_MATERIAL_GETBATCHES ]
    • GetCharacsMerchandiseHierachy : Provides the characteristics of a retail material for class type 26 [ BAPI_MATERIAL_GETCHARMERCHHIER ]
    • GetComponents : Explode structured materials [ BAPI_MATERIAL_GETCOMPONENTS ]
    • GetDetail : Determine details on material [ BAPI_MATERIAL_GET_DETAIL ]
    • GetInternalNumber : Assign new internal numbers for a material type [ BAPI_MATERIAL_GETINTNUMBERRET ]
    • GetList : List with description [ BAPI_MATERIAL_GETLIST ]
    • GetProductHierarchy : Read product hierarchy [ BAPI_MATERIAL_GET_PRODUCTHIER ]
    • GetVariantNumbers : Provides material numbers for new variants of a generic material [ BAPI_MATERIAL_GETVARNUMBERS ]
    • SaveAdditionalsReplicas : Create and change additionals (retail) [ BAPI_ADDITIONAL_MAINTAINDATA ]
    • SaveRPLParametersReplicaMult : Create and change replenishment master data [ BAPI_RTMAT_RPL_SAVEREPLICAMULT ]

    11-Dec-2005


    Availability

    Availability


    Using this function module, you can determine the receipt quantitystill available for a particular material in a certain plant according to ATP logic (MRPII).

    The availability check is carried out on transferring the materialnumber, the plant and the input table (WMDVSX). The scope of the check,
    that is, which stocks, receipts and issues are to be included in thecheck is defined by the combination of checking group (material master)and cheking rule. In the function module, the system uses the checkingrule defined in Sales & Distribution (A). You can overrule this
    checking rule by using an interface or a user-exit (exit_saplw61v_001).A similar procedure is also valid for the plant parameters. Thecustomer number in the user-exit means that the plant selection can becontrolled via the customer. If no plant parameters are given via the
    interface, the system uses the parameter 'WRK' saved in the user's fixed values.

    The results of the availability check are recorded in the output table(WMDVEX). This table contains dates and available receipt quantities(ATP quantities). The results of the check depends on the following entries:


  • If no date and no quantity is transferred, the system displays the ATPsituation from today's date into the future as the result.
  • If only a date and no quantity is transferred, the system displays the ATP situation from the corresponding date as the result.
  • If both a date and a quantity are transferred, the system calculates the availability situation for the quantity specified.
  • In the last two cases, the parameter 'DIALOGFLAG' is supplied. This can result in the following:

  • ' ' (blank) <=> quantity completely available

  • 'X' <=> only partial quantity available or not available at
    all
  • 'N' <=> Material not included in the availability check
    (Material not relevant to the availability check)

  • The system also displays the end of the replenishment lead time (ENDLEADTME).


    11-Dec-2005


    Clone

    Clone


    You use this method to create new material master data or to change existing material master data.

    Besides creating and changing material master data, you can also delete data for the following structures:

  • MATERIALDESCRIPTION
  • UNITSOFMEASURE

  • INTERNATIONALARTNOS
  • VENDOREAN
  • UNITOFMEASURETEXTS
  • LAYOUTMODULEASSGMT
  • MATERIALLONGTEXT
  • For the system to recognize that a data record is to be deleted, the field FUNCTION must contain the value 003 in the corresponding structure. This field is of no relevance when creating or changing data.


    If the material specified in structure HEADDATA is a generic material, you can specify data onthe generic material and also on the variants in the structuresconcerned (CLIENTDATA, and so on). Normally, this is of use only if youwant to maintain special data on the variant differently from the data
    on the generic material. If no explicit data on the variants exists, itis created automatically on the basis of the data on the generic material.

    If a variant is created, an entry must be defined in structureVARIANTSKEYS for this variant. This makes it possible to also create new variants for an existing generic material.


    If a structure contains fields for units of measurement (such asstructure CLIENTDATA, field BASE_UOM), language indicators (such asstructure MATERIALDESCRIPTION, field LANGU), or country indicators(such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is
    always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or astandardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP
    code internally for further processing. The ISO code is used only ifthe SAP code is not transferred. If you use ISO codes, you must ensurethat the SAP code can be uniquely determined from the ISO code inCustomizing for units of measurement, language indicators, and country indicators.


    The data transferred is updated synchronously; that is, not using anupdate task. This is necessary because this method is also used in distribution by Application Link Enabling (ALE), where asynchronous updating cannot be supported in inbound processing because the processing status of the assigned IDocs
    cannot otherwise be set reliably.

    If a serious database error occurs during synchronous updating of theapplication data, a rollback for all database changes made so far istriggered in the method. If the method is called in a commit unittogether with other methods, the database changes of the previously
    executed method calls are also rolled back as a result. The rollback isnecessary to prevent database inconsistencies due to only part of the application data being updated correctly.

    Any information or error messages that are issued while the data is
    being processed are recorded in the application log. If you want toview these messages, a commit must be performed after this method iscalled so that the data in the application log is written to the database. Even if the structure RETURN returns an E-type (error)
    message in field TYPE, a commit must be performed so that theapplication log is written. In the event of an error, the method itselfensures that the data is reset correctly. The commit is also necessaryto trigger the updating of the classification data because the update
    module for the classification data is registered by means of PERFORM ON COMMIT and is started only by a COMMIT WORK.

    Notes

    To create or change data, you require the necessary authorizations for maintaining the corresponding material master data.


    Further Information

    As of Release 4.5A, this method can also be used to distribute deletionflags correctly. Deletion flags are only set in retail for client-specific material data (parameter CLIENTDATA) and plant-specificmaterial data (parameter PLANTDATA). If deletion flags (field DEL_FLAG)
    are transferred for one of these two parameters, a correspondingworkflow is generated during updating. Depending on the value of thedeletion indicator, this workflow triggers the discontinuation of thematerial for the client or for a specific plant, or the cancelling of an existing deletion flag.


    For more information, see the SAP library documentation LO SAP Retail -> Articles: Article Discontinuation.


    11-Dec-2005


    Create

    Create


    You can use this method to create a material.

    Notes

    You can use internal and external number assignment if allowed for thematerial type required. With internal number assignment, leave the parameter NewMaterial blank.

    The number of the material created is returned in the parameter NewMaterial.


    11-Dec-2005


    Delete

    Delete


    You can use this method to discontinue a material.

    Further Information

    Access the transaction Discontinue Materials (WSE1) and choose Help -> Application help.


    11-Dec-2005


    Display

    Display


    You can use this method to display a material.


    11-Dec-2005


    Edit

    Edit


    You can use this method to change a material.


    11-Dec-2005


    ExistenceCheck

    ExistenceCheck


    This method checks the existence of a material.

    Notes

    Messages are returned in the parameter RETURN. The return codes and their meanings are contained in this parameter documentation.


    11-Dec-2005


    GetBatchCertificate

    GetBatchCertificate


    This method creates a table in MIME format. This table contains aquality certificate for a batch in edited form. Only the format PDF (Adobe Acrobat(TM) Reader) is currently supported.

    Besides the batch ID, you need to enter a customer number since the
    data in the quality certificate comes from a customer-specific view.

    Notes

    Messages are returned in the parameter RETURN. The parameter documentation contains the return values and their meanings.

    If no certificate can be created, you can use the table parameter MESSAGETABLE to obtain detailed information.


    If you do not know the batch you require, you can use the method GetBatches to create a list of batches for a material.


    11-Dec-2005


    GetBatches

    GetBatches


    This method is used to create a list of batches for a material. You can restrict this list by specifying input parameters.

    For example, you can create a list of the batches whose shelf life expiration date is not yet exceeded.

    Notes


    Messages are returned in the RETURN parameter.
    For the return values and their meanings, see the documentation for theRETURN parameter.

    You can combine the parameters EXPIRYDATEFROM and EXPIRYDATETO (or AVAILABLEDATEFROM and AVAILABLEDATETO) as follows:


  • If you enter an earliest and a latest availability date,
    the system selects only the batch records whose availability date is within this interval.
  • If you enter an earliest and a latest shelf life expiration date,
    the system selects only the batch records whose shelf life expiration date is within this interval.


  • 11-Dec-2005


    GetCharacsMerchandiseHierachy

    GetCharacsMerchandiseHierachy


    This method provides the characteristics with value assignment for aretail material. Only the special class type for the material group hierarchy is considered.

    Notes

    If none of the language parameters LANGUAGE or LANGUAGE_ISO have been
    transferred, the descriptions of the characteristics and of the characteristic values are displayed in the logon language.


    11-Dec-2005


    GetComponents

    GetComponents


    This method breaks down a structured material into its components. Thematerial number of the structured material, the SAP unit of measure,and the ISO unit of measure, can be transferred to the method. Thecomponents are returned in a list showing the quantity ratios. The
    component quantities are converted to the unit of measure entered for the structured material.

    The method always returns the ISO unit of measure if one exists for the SAP unit of measure.

    Notes

    Messages are returned in the RETURN paramter. See this parameter documentation for the return values and their meaning.



    11-Dec-2005


    GetDetail

    GetDetail


    This method provides a selection of client-specific, plant-specific,and valuation-area-specific or valuation-type-specific detail data for a given material.

    The material number is a required parameter. If only the materialnumber is transferred, the method provides only client-specific detail data for the material.


    Plant-specific detail data can optionally be output for the material ifthe method has been provided with a plant (PLANT). The output ofvaluation-area-specific or valuation-type-specific detail data for thematerial requires a valuation area (VALUATIONAREA) to be specified.


    Notes

    For the data to be read successfully, you must be authorized to display material master data.

    Messages are returned in the parameter RETURN. For the return valuesand their meanings, see the documentation for this parameter.



    11-Dec-2005


    GetInternalNumber

    GetInternalNumber


    This method supplies a set (to be determined) of new internally assigned numbers for a material type.

    Notes

    To use these functions, you require the authorization for the material type.

    Internal number assignment must be allowed for this material type. An
    internal number range must also be assigned to the material type.

    If the method is ended with an error message, it is possible that partof the material numbers requested have already been assigned. These material numbers are then contained in the output parameter
    MATERIAL_NUMBER.


    11-Dec-2005


    GetList

    GetList


    For the selection parameters specified, this method supplies a list ofmaterials with material description for the logon language.

    Example

    Selection of ALL given materials in plant 0001, storage location 0001 or storage location 002:


    MATNRSELECTION : 'I', 'CP', '*' , ' '
    PLANTSELECTION : 'I', 'EQ', '0001', ' '
    STORAGELOCATIONSELECT : 'I', 'EQ', '0001', ' '
    'I', 'EQ', '0002', ' '

    Selection of all given materials in plant 0001 and whose description begins with 'XY':


    MATERIALSHORTDESCSEL : 'I', 'CP', 'XY*' , ' '
    PLANTSELECTION : 'I', 'EQ', '0001', ' '

    Notes

    Messages are returned in the parameter RETURN. The return codes and their meanings are contained in this parameter documentation.

    The relationship between the selection parameters follows this schema:


  • A material is selected if it satisfies the selection criteria formaterial number (MATNRSELECTION) OR for the material description (MATERIALSHORTDESCSEL) for the logon language.
  • Additionally, it must comply with the selection criteria for plant (PLANTSELECTION) and
    storage location (STORAGELOCATIONSELECT) if specified
  • or it has the manfacturer part number specified(MANUFACTURERPARTNUMB) - in this case the plant/storage location is ignored.

  • 11-Dec-2005


    GetProductHierarchy

    GetProductHierarchy


    Implementation of class method getProductHierarchy()

    All subordinate nodes and pages are read for a product hierarchy. If the parameter Product hierarchy is not set, all product hierarchies are read.


    11-Dec-2005


    GetVariantNumbers

    GetVariantNumbers


    For a generic material, this method supplies numbers for variants.


    11-Dec-2005


    SaveAdditionalsReplicas

    SaveAdditionalsReplicas


    This BAPI is used to post additionals master data sent using an IDoc via the ALE layer in the R/3 system.

    Since additionals are only sub-objects of the material master, please see the documentation for the material master.


    11-Dec-2005


    SaveRPLParametersReplicaMult

    SaveRPLParametersReplicaMult


    This BAPI is used for creating or changing material replenishmentmaster data. It can be used for distributing replenishment master datain ALE distribution and for transferring replenishment master data from legacy systems.

    A prerequisite for creating or changing replenishment master data is
    that the basic data and, if necessary, the plant data (MARC segment)for the material have already been created in the system. Also, customer or plant master data must already exist in the system.

    No commit work command is executed in the BAPI.

    When you are creating or changing replenishment material master data
    using this BAPI, the following must be taken into consideration:

  • Data is transferred at the plant/material or customer/material level.
  • You cannot transfer replenishments master data for generic materials or variants.
  • No entries in material master table MARC can be changed. If a MARC
    segment exists for a transferred replenishment master data record,reorder point (MARC-MINBE), safety stock (MARC-EISBE), and MRP type (MARC-DISMM) are transferred from this MARC segment.
  • Locks are set (lock object EMMARGE) for MARC for all the records that
    were transferred. When replenishment master data is changed forreference plants, only the dependent plants that have newly been added do not have any locks.
  • The function module takes the mass maintenance logic for the integratedmaterial master into consideration. This means that this data is passed
    on to all dependent plant that were not maintained differently when replenishment master data for reference plants is transferred.
  • When different data for a dependent plant is maintained, variants for the plant in question are generated.

    Possible error messages:


  • Object is locked
  • Customer master data F2 153 does not exist
  • Material master data MG 305 does not exist
  • The material category is generic article or variant MU 019
  • Material is not listed in plant WM 138


  • 11-Dec-2005