×

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




Sapass

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



Index

MaterialReservation

MaterialReservation


The Business Object Material reservation is a request to a plant
to keep ready a quantity of materials at certain points in time.

Structure

The reservation consists of several items that contain the reserved materials.


11-Dec-2005


Methods

Available Methods


  • CreateFromData : Create reservation [ BAPI_RESERVATION_CREATE ] (Obsolete in 46C)
  • CreateFromData1 : BAPI to create individual reservations [ BAPI_RESERVATION_CREATE1 ]
  • Delete : BAPI to delete individual reservations [ BAPI_RESERVATION_DELETE ]
  • GetDetail : Display reservation [ BAPI_RESERVATION_GETDETAIL ]
  • GetItems : List reservations [ BAPI_RESERVATION_GETITEMS ]

11-Dec-2005


CreateFromData

CreateFromData


This method enables you to create reservations.

Notes

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

  • M_RES_BWA Reservations: movement type
  • M_MRES_WWA Reservations: plant

  • The header data of the reservation is passed on in the parameter ReservationHeader. At least the following data is necessary:

  • Movement type (MOVE_TYPE field)
  • If account assignment is defined for the movement type, the account
    assignment object (e.g. the cost center in the field COST_CTR)
  • Base date (RES_DATE field)
  • The item data is passed on in the table ReservationItems. At least the following data is necessary:

  • Plant (PLANT field)
  • Material number (MATERIAL field)

  • Storage location (STORE_LOC field)
  • Quantity (QUANTITY field)
  • The reservation number is returned in the parameter Reservation.

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


    Further Information

    The method can only carry out your function if no error messages weregenerated in the "Return" table. This is the case if the header data and all the items were processed successfully.

    Transaction control is not implemented. The calling program therefore
    has to execute the 'Commit Work' itself after this method has beensuccessfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005


    CreateFromData1

    CreateFromData1


    Create reservation

    Example

    You can use this method to create individual reservations.

    Notes

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

    Reservations: movement type

    Reservations: plant


    The system transfers the header data of the reservation in theReservationHeader parameter. The following data is required for this:

    - movement type (Field MOVE_TYPE)

    - the account assignment object (for example, the cost center in the
    COSTCENTER field) if the movement type requires an account assignment

    The system transfers the item data in the ReservationItems table. The following data is required for this:

    - plant (PLANT field)

    - material number (MATERIAL field)


    - requirement date (REQ_DATE field) if no base date ( RES_DATE field) has been entered in the header data

    The reservation number is returned in the parameter 'Reservation'.

    Messages are returned in the parameter 'Return'. The documentation for
    this parameter contains the return values and their meanings.

    No transaction control is implemented. The caller therefore has to carry out the 'Commit Work' (for example, using theBAPI_TRANSACTION_COMMIT) after this method has been called up successfully; that is, if no errors were displayed in the parameter
    Return'.


    11-Dec-2005


    Delete

    Delete


    Delete reservation

    Example

    You can use this method to delete individual reservations.

    Notes

    The system checks the following authorization objects with the activity 06 (delete):

    - M_MRES_BWA Reservations: movement type


    - M_MRES_WWA Reservations: plant

    The number of the reservation that is to be deleted must be transferred in the RESERVATION parameter

    The TESTRUN parameter can also be set. This has the effect that thesystem carries out all the checks but without creating the reservation.


    Messages are returned in the parameter 'Return'. The documentation forthis parameter contains the return values and their meanings.

    Further Information

    The method can only carry out its function if no error messages were created in the parameter 'Return'.


    No transaction control is implemented. The caller therefore has to carry out the 'Commit Work' (for example, using theBAPI_TRANSACTION_COMMIT) after this method has been called up successfully; that is, if no errors were displayed in the parameter'Return'.



    11-Dec-2005


    GetDetail

    GetDetail


    This method enables you to list detailed data pertaining to a reservation.

    Notes

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

  • M_RES_BWA Reservations: movement type
  • M_MRES_WWA Reservations: plant

  • The header and item data for the reservation number that is passed on is returned in the tables ReservationHeader and ReservationItems respectively.

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

    Further Information

    The method can only carry out your function if no error messages weregenerated in the "Return" table. This is the case if the header data and all the items were processed successfully.


    Transaction control is not implemented. The calling program thereforehas to execute the 'Commit Work' itself after this method has beensuccessfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005


    GetItems

    GetItems


    This method allows you to list reservations. You pass on the desiredselection criteria (e.g. requirement date, plant, goods recipient) inthe import parameters. For further information, refer to the relevant parameter documentation.

    Notes


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

  • M_RES_BWA Reservations: movement type
  • M_MRES_WWA Reservations: plant
  • If errors occur during processing and the reservation cannot be saved, the relevant error messages are returned in the table
    Return. Information messages are also logged in this table.

    Further Information

    The method can only carry out your function if no error messages weregenerated in the "Return" table. This is the case if the header data and all the items were processed successfully.


    Transaction control is not implemented. The calling program thereforehas to execute the 'Commit Work' itself after this method has beensuccessfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005