CreateFromData
Method of creating a requirement coverage request. The latter can be a purchase requisition, if the requirement cannot be satisfied on the desired date by existingstocks on hand in the warehouse or stores, ora reservation, if adequate stocks are on hand.
As of SAP Release 4.0A, use the method CreateFromData of the business objects PurchaseRequisition and MaterialReservation. NotesThe following authorization objects are checked:
M_BANF_BSA Document type in requisition
M_BANF_EKG Purchasing group in requisitionM_BANF_EKO Purchasing org. in requisitionM_BANF_WRK Plant in requisitionM_RES_BWA Reservations: Movement typeM_MRES_WWA Reservations: Plant
Data transferItem data The item data of the requirement coverage request is passed on in the table RequirementItems, whereby at least the following data is necessary: Item counter (field PREQ_ITEM)
Material number (field MATERIAL) The following can also be given as an alternative to the material number:Material group (field MAT_GRP) and Short text (short description) (field SHORT_TEXT) and
Unit of measure (field UNIT) and Price (field C_AMT_BAPI) and Purchasing group (field PUR_GROUP) If the material number is passed on, the material group, short text etc. are taken from the material master record.
Requested quantity (Feld QUANTITY)Requested date (field DELIV_DATE in the format YYYYMMDD) and date type (field DEL_DATCAT) If the current date is passed on, the date type must be '1'. Alternative types are '2' (week format) or '3' (month format); here
too, DELIV_DATE must be passed on in the format YYYMMDD and is then adjusted accordingly when displayed.Object type (field RES_REQ_ID) If a purchase requisition is to be created, this field must contain'X'. In the case of a reservation it must be 'Y'.
The following fields are also necessary. If they are not passed on inthe method, the specifications are taken from the relevant user masterrecord (parameter values). Note that they must at all events be available. Document type for purchase requisitions (field DOC_TYPE) Parameter ID BSA
Plant (Feld PLANT) Parameter ID WRKStorage location (field STORE_LOC) Parameter ID LAGAccount assignments Account assignment data for each requirement coverage request item(cost center field COST_CTR can be passed on in the transfer table ReqAccountAssignment.
If it is not passed on, costs are assigned to the cost center stored inthe user master record (parameter ID CNT). A precondition for this isthat the account assignment category (field ACCTASSCAT) that is passed on is not SPACE. If the account assignment category is not passed on, a purchase requisition item without account assignment is generated.
SAP user master record The parameter ID BWA (movement type for reservations) must be maintained in the relevant user master record. ReturnThe method then returns the object number (parameter NUMBER) underwhich the requirement coverage request was created. The parameter ITEM
is present for technical reasons and is always returned with its initial value. If errors have occurred, these are shown in the table Return. Number assignment If no external object number was passed on (table RequirementItems, field PREQ_NO), the number is assigned
internally by the method. A precondition for internal number assignmentis that the number range object RESB (reservations) is adjusted in theCustomizing facility of the Inventory Management component of the R/3 System as follows: Change the interval with the number 01 to 0000000001 to 0019999999
Add a new interval with the number 10 from 0090000000 to 0099999999.You can maintain the number range in the Implementation Guide (IMG): Define number assignment for reservations This adjustment is necessary because in the standard system the same
interval has also been created for the external assignment of purchaserequisition numbers. This means that one and the same number can beassigned for reservations and purchase requisitions. For example, justone number is assigned if both lines that are to be saved as purchase
requisitions and lines that are to be saved as reservations are to be transferred in the table RequirementItems.
|