Sapass

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



Index

PurchaseRequisition

PurchaseRequisition


The business object Purchase requisition contains the request or
instruction to Purchasing to procure a certain quantity of a material
or a service so that it is available at a certain point in time.

Structure

A purchase requisition consists of a number of items, for each of which
a certain procurement type is defined. The following procurement types exist:
o Standard
o Subcontracting
o Consignment

o Stock transfer
o Service

The item contains the quantity and delivery date of the material to be
supplied or the quantity of the service to be performed.
With respect to items involving subcontracting work, the material
components to be provided to the subcontractor can be specified for each delivery date.

An item of the procurement type "service" comprises a set of service
specifications. The specifications are structured by means of outline
levels and the quantity ordered and delivery date are set out in
service lines. Value limits are stipulated in place of service lines for services that cannot be specified precisely.

If services are requested against contracts, the requisition item can contain a value limit relating to a certain contract.

The costs incurred as a result of the procurement can be apportioned
among different Controlling objects through the account assignment.

Comment

A purchase requisition can be fulfilled by means of purchase orders or outline purchase agreements.


11-Dec-2005


Methods

Available Methods


  • Change : Change purchase requisition [ BAPI_REQUISITION_CHANGE ]
  • CreateFromData : Create purchase requisition [ BAPI_REQUISITION_CREATE ]
  • Delete : Delete/close purchase requisition [ BAPI_REQUISITION_DELETE ]
  • GetDetail : Display purchase requisition details [ BAPI_REQUISITION_GETDETAIL ]
  • GetItems : Read purchase requisition item [ BAPI_REQUISITION_GETITEMS ]
  • GetItemsForRelease : List purchase requisitions awaiting release [ BAPI_REQUISITION_GETITEMSREL ]
  • GetReleaseInfo : Detailed release information on purchase requisition [ BAPI_REQUISITION_GETRELINFO ]
  • Release : Release purchase requisition [ BAPI_REQUISITION_RELEASE_GEN ]
  • ResetRelease : Cancel release of purchase requisitions [ BAPI_REQUISITION_RESET_REL_GEN ]

11-Dec-2005


Change

Change


This method can be used to change purchase requisitions.

Notes

The following authorization objects are checked with activity 02 (change):

  • M_BANF_BSA Document type in requisition
  • M_BANF_EKG Purchasing group in requisition

  • M_BANF_EKO Purch. organization in requisition
  • M_BANF_WRK Plant in requisition
  • Transfer

    You must pass on the purchase requisition number and the necessarytables for the items that are to be changed. For more information, refer to the documentation on the table parameters.


    To fill the table parameters correctly with the old status, use the method GetDetail of the business object PurchaseRequisitionbefore invoking this method.

    Return messages

    Messages are returned in the parameter return. The parameter
    documentation shows the return codes and their meanings.


    11-Dec-2005


    CreateFromData

    CreateFromData


    This method enables you to create purchase requisitions.

    Notes

    The following authorization objects are checked with activity 01 (Create):

  • M_BANF_BSA Document type in requisition
  • M_BANF_EKG Purchasing group in requisition

  • M_BANF_EKO Purchasing organization in requisition
  • M_BANF_WRK Plant in requisition
  • The data of the purchase requisition items is passed on to the table RequisitionItems. The data that has to be passed on is listed in the parameter documentation.


    Account assignments

    If the account assignment category is set in the item, accountassignment data can be passed on for each purchase requisition item in the transfer table RequirementAccountAs. The account assignment category determines which costing-relevant objects must be passed on in
    the account assignment data. If the account assignment is K, for example, a cost center must be passed on.
    The account assignment can also be a multiple account assignment, i.e.the account assignment table can contain more than one entry. In this case, the following indicators must be set in the item data:

  • Distribution indicator (DISTRIB)
  • "Partial" invoice indicator (PART_INV)
  • If the account assignment category is not set, a stock item is generated.

    Texts

    Texts for purchase requisition item can be passed on in the table RequirementItemText.


    Limits

    Limit data pertaining to the requisition item can be passed on in the tables RequisitionLimits and RequisitionContractLimits.

    Services

    Service data pertaining to the requisition item can be passed on in the tables RequisitionServices and
    RequisitionSrvAccAssValues
    .

    Number assignment

    If an entry is made in the field PREQ_NO in the item data, the systemchecks whether the number is an allowed external requisition number. Ifno entry is made in this field, the number is assigned internally and returned in the parameter Number.


    Messages returned

    INCLUDE BAPI_RET


    11-Dec-2005


    Delete

    Delete


    This method enables you to delete and/or close purchase requisitions.

    Notes

    The following authorization objects are checked with activity 02 (Change):

  • M_BANF_BSA Document type in requisition
  • M_BANF_EKG Purchasing group in requisition

  • M_BANF_EKO Purchasing organization in requisition
  • M_BANF_WRK Plant in requisition
  • All requisition items for which the deletion indicator and/or the "closed" indicator is to be set are passed on in the tableRequisitionItemsToDe. Since this method changes the purchase requisition, change documents are created when you save.

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.


    11-Dec-2005


    GetDetail

    GetDetail


    This method enables you to list detailed data on a purchase requisition.

    Notes

    The following authorization objects are checked with activity 03 (Display):

  • M_BANF_BSA Document type in requisition
  • M_BANF_EKG Purchasing group in requisition

  • M_BANF_EKO Purchasing organization in requisition
  • M_BANF_WRK Plant in requisition
  • Transfer

    Via the parameters AccountAssignment, ItemTexts, and Services
    , you can specify whether you wish to display information relating to the release process, account assignments,texts, and service items in addition to the other detailed information(document type, responsible purchasing group, requisitioner, etc.).

    In the standard system, the parameters for this additional information
    are not set, i.e. only the detailed data for the item is returned.

    These parameters influence both the volume of data and system performance.

    Return

    The detailed data is returned in table RequisitionItems. If the
    above parameters are set, the data is returned in the relevant tables.

    Return messages

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.


    11-Dec-2005


    GetItems

    GetItems


    This method enables you to list purchase requisition items. The desiredselection criteria (e.g. requisitioner and plant) are passed on in theimport parameters. For further information, refer to the relevant parameter documentation.

    Notes


    The following authorization objects are checked with activity 03 (Display):

  • M_BANF_BSA Document type in requisition
  • M_BANF_EKG Purchasing group in requisition
  • M_BANF_EKO Purchasing organization in requisition

  • M_BANF_WRK Plant in requisition
  • Return

    The items that satisfy the selection criteria are returned in the table RequisitionItems.

    Return messages

    Messages are returned in the parameter return. The parameter
    documentation shows the return codes and their meanings.


    11-Dec-2005


    GetItemsForRelease

    GetItemsForRelease


    This method enables you to list all purchase requisitions that have tobe released with a certain release code and group (collective release).

    Notes

    The authorization object M_EINK_FRG is checked.

    Transfer


    The release code must be passed on in the parameter RelCode and the release group in the parameter RelGroup.
    The parameter ItemsForRelease determines whether only thoserequisitions awaiting release are listed, or only those that have
    already been released. The latter is useful if you wish to have a listfor the purposes of cancelling releases that have already been effected.

    Return

    The result is returned in the table RequisitionItems.

    Return messages


    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings. .

    Further Information

    Weitere Informationen zur Freigabe finden Sie in der Dokumentation MM - Einkauf.


    11-Dec-2005


    GetReleaseInfo

    GetReleaseInfo


    This method enables you to display release information.

    Notes

    The authorization object M_EINK_FRG is checked.

    Transfer

    The purchase requisition number must be passed on. If you wish to seethe release information for one particular item only, pass on the item in the parameter Item
    . If you additionally pass on the release code, the release prerequisites will also be determined.

    Return

    The following information is returned:

  • General release information (e.g. the release group and release strategy)

  • The release prerequisites (only if the release code was passed on)
  • The release codes with which previous releases were effected
  • All release codes involved in the approval procedure
  • Return messages

    Messages are returned in the parameter return. The parameter
    documentation shows the return codes and their meanings.

    Further Information

    For further information, refer to the MM Purchasing documentation (section entitled Release Procedure).


    11-Dec-2005


    Release

    Release


    This method allows you to release all the items of a purchase requisition at once (overall release).

    Release (approval) is necessary if a purchase requisition satisfies the conditions specified in a release_strategy.

    Example: all purchase requisitions whose total value exceeds $10,000 have to be released.


    The requisition number and the release code must be passed on. The new release status and the new release indicator are returned.

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.


    If you wish to release the individual items of a purchase requisition, use the method Release of the business object PurchaseReqItem.

    Notes

    The authorization object M_EINK_FRG is checked.

    Further Information


    For further information, refer to the documentation MM Purchasing, section "Release Procedure", and to the Implementation Guide (IMG) for Purchasing Set up release procedure with classification.


    11-Dec-2005


    ResetRelease

    ResetRelease


    This method allows you to cancel the overall release of purchaserequisitions. The purchase requisition number and the release code mustbe passed on. The release status and the release indicator valid prior to the release are returned.

    Messages are returned in the parameter return. The parameter
    documentation shows the return codes and their meanings.

    If you wish to cancel the release of a purchase requisition item by item, use the method ResetRelease of the business object PurchaseReqItem.

    Notes


    The authorization object M_EINK_FRG is checked.

    Further Information

    For further informationen, refer to the MM Purchasing documentation.


    11-Dec-2005