SAP Function BAPI_REQUISITION_CREATE - Create Purchase Requisition

Parameter Reference Type Length Default Optional Text
AUTOMATIC_SOURCE BAPIMMPARA-SELECTION C 1 'X' X Automatic Source Determination
SKIP_ITEMS_WITH_ERROR BAPIMMPARA-SELECTION C 1 X Skip Faulty Items

Parameter Reference Type Length Text
NUMBER BAPIEBANC-PREQ_NO C 10 Purchase Requisition Number

Parameter Reference Length Optional Text
EXTENSIONIN BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
REQUISITION_ACCOUNT_ASSIGNMENT BAPIEBKN 485 X Account Assignment Data for Item
REQUISITION_ADDRDELIVERY BAPIMERQADDRDELIVERY 1311 X PO Item: Address Structure BAPIADDR1 for Inbound Delivery
REQUISITION_CONTRACT_LIMITS BAPIESUCC 90 X Limits with Contract Reference
REQUISITION_ITEMS BAPIEBANC 823 Item Data
REQUISITION_ITEM_TEXT BAPIEBANTX 153 X Text for Item
REQUISITION_LIMITS BAPIESUHC 103 X Limits
REQUISITION_SERVICES BAPIESLLC 636 X Services
REQUISITION_SERVICES_TEXT BAPIESLLTX 158 X Text for Service Line
REQUISITION_SRV_ACCASS_VALUES BAPIESKLC 40 X Value/Link to Service Account Assignment
RETURN BAPIRETURN 452 X Return Messages

Functionality
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 tableRequisitionItems. The data that has to be passed on is listed inthe 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 inthe transfer table RequirementAccountAs. The account assignmentcategory determines which costing-relevant objects must be passed on inthe account assignment data. If the account assignment is K, forexample, 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 thiscase, 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 isgenerated.
      Texts
      Texts for purchase requisition item can be passed on in the tableRequirementItemText.
      Limits
      Limit data pertaining to the requisition item can be passed on in thetables RequisitionLimits and RequisitionContractLimits.
      Services
      Service data pertaining to the requisition item can be passed on in thetables RequisitionServices andRequisitionSrvAccAssValues.
      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 andreturned in the parameter Number.
      Messages returned
      INCLUDE BAPI_RET

      Description
      INCLUDE BAPI_KEYFIELD

      Description
      If the indicator has been set, faulty items are skipped and only theerror-free items are created.

      Description
      The table contains the account assignment data for the purchaserequisition item.
      INCLUDE BAPI_DATAELEMENT

      Description
      The table contains the purchase requisition limits with reference to acontract.
      INCLUDE BAPI_DATAELEMENT

      Description
      The table contains the purchase requisition item data.
      INCLUDE BAPI_DATAELEMENT
      At least the following data is required:

      • Item counter (field PREQ_ITEM)

      • Material number (field MATERIAL)

      • The following can also be passed on as an alternative to the materialnumber:
        Material group (field MATL_GROUP) and
        Short text (field SHORT_TEXT) and
        Unit of measure (field PREQ_UNIT) and
        Price (field PREQ_PRICE) and
        Purchasing group (field PUR_GROUP)
        If the material number is passed on, the material group, the short textetc., are adopted from the material master record.
        • Requested quantity (field PREQ_QTY)

        • Requested date (field DELIV_DATE always in the format YYYYMMDD) and
        • date category (field DEL_DATCAT (internal representation, e.g. 1 forcurrent date) or DEL_DATCAT_EXT (external representation, e.g. T forcurrent date))
          • Document type for purchase requisitions (field DOC_TYPE)

          • Plant (field PLANT)
          • Description
            In the table RequisitionItemText you pass on texts pertaining tothe purchase requisition item. You can pass on the following in thespecified fields:

            • the allowed text types (e.g. item or delivery texts) in the field
            • TEXT_ID
              • a SAPscript format key in the field TEXT_FORM

              • the actual text lines in the field TEXT_LINE

              • If TEXT_ID is empty, an item text is always generated. If TEXT_FORM isempty, the standard format key * is assigned.
                INCLUDE BAPI_DATAELEMENT

                Description
                The table contains the limits defined for the purchase order.
                INCLUDE BAPI_DATAELEMENT

                Description
                The table contains the services and service outlines of the purchaserequisition.
                The marking of a line as an outline line is carried out via the fieldOUTL_IND. The assignment of service lines to the outline lines iscarried out via the fields PCKG_NO (of the service line) and SUBPCKG_NO(of the outline line).
                The hierarchy of the outline is formed via the fields LINE_NO andHI_LINE_NO. The field HI_LINE_NO refers to the field LINO_NO of thehierarchically superior outline level.

                Description
                In this table, you pass on texts for the service line. You can pass onthe following:

                • In the field TEXT_ID: the allowed text types (e.g. line text, service
                • text)
                  • In the field TEXT_FORM: a SAPscript format key

                  • In the field TEXT_LINE: the actual text lines

                  • If TEXT_ID is empty, a line text is always generated. If FORMAT_COL isempty, the standard format key * is assigned.
                    INCLUDE BAPI_DATAELEMENT

                    Description
                    The table contains the values of the account assignments at servicelevel and a link to the overall account assignment of the PO item(table REQUISITION_ACCOUNT_ASSIGNMENT, field SERIAL_NO). The actualaccount assignment data (cost center etc.) is stored in the accountassignment table REQUISITION_ACCOUNT_ASSIGNMENT and is identified viathe link.

                    Description
                    INCLUDE BAPI_TABLE

                    Value range
                    Type,,ID,,Number,,Message
                    E,,W5,,002,,No items exist (not
                    ,,,,,,possible to save)
                    E,,W5,,057,,Purchase requisition & & will not be created
                    E,,W5,,061,,An error has occurred in enhancement &
                    ,,,,,,(Please check)
                    E,,W5,,069,,Please also pass on a unit of measure
                    ,,,,,,for the quantity
                    E,,BM,,034,,No measurement unit assigned to ISO-Code &
                    E,,B1,,882,,ISO code & not assigned to a currency key
                    ,,,,,,
                    Other possible messages
                    You may see messages from other function modules or programs, e.g.
                    E,,ME,,083,,Please enter & &

499627FAQ: BAPIs for purchase requisitions
1417829Multiple account assignment shopping carts end up in error
1276091No commitment update in Funds Management area
760328BAPI_REQUSITION_CREATE: Jurisdiction code not derived
180921BAPI_REQUISITION_CREATE copies cost center from PID
584902BAPI_REQUISITION_CHANGE: ExtensionIn not connected
851485Delete long text not copied into PReq
336692BAPI_REQUISITION_CREATE: Customer enhancements
701327AFS: Capacity and quota check in BAPI_REQUISITION_xxx
783640BAPI_TE_REQUISITION_ITEM: Enhancement category not numeric
586419Disturbing dummy data record in ESUH and runtime error
182787No planning file entry with PReqs from SD/PP/PS
589411AFS: BAPIs in purchasing
603444DCM: PReq via ME_REQUISITION_EXT, no release strategy
600274BAPI_REQUISITION_CREATE: VEND_MAT not copied
162391W5069 for BAPI_REQUISITION_CREATE
566481Planning file entry for SD or third-party requisition
217437ME21N/ME51N: Batch input and CATT not possible
300377MM-SRV: E601 during BAPI call
206796BAPI__REQUISITION_CREATE: Limit data is lost