Fonction SAP BAPI_STOREORDER_CREATE - Creates Documents (PR, PO, Delivery or Sales order) From Store Orders

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CALL_FROM BAPI6032_CONTROL-WVFBCALL C 1 Call_ROUTINES
ITEM_DOCU_LOGON BAPI6032_CONTROL-DOCU C 1 X Item Documentation
LTSSPLIT BAPI6032_CONTROL-LTSSPLIT C 1 X Split Document in PO if Vendor Subrange Differs
NO_WF BAPI6032_CONTROL-NO_WF C 1 X No Workflow
PR_REQUESTOR BAPI6032_2-AFNAM C 12 X Requestor
SORT_STEP2 BAPI6032_CONTROL-WVFBSORT C 1 X Sort During Step 2
STEP BAPI6032_CONTROL-WVFBSTEP C 1 X Step 1 or 2

Paramètre Reférence Long. Facultatif Description
HEAD_CONDITIONS BAPI6032_CONDI 272 X Header_Conditions
HEAD_PARTNERS BAPI6032_PARTNERS 932 X Header_Partners
ITEM_CONDITIONS BAPI6032_CONDI 272 X Item_Conditions
ITEM_PARTNERS BAPI6032_PARTNERS 932 X Item_Partners
ORDER_ITEMS BAPI6032_ITEMS 629 Order Items
RETURN BAPIRET2 548 Return Messages

Functionality
Use this method to create documents for purchasing or sales anddistribution. The system checks if all the necessary data has beentransferred, for example:

  • Quantity

  • Material number

  • Vendor or customer

  • Organizational data (for example, purchasing organization or
  • distribution chain)
    • Unit of measure

    • The document category defines the document that is to be created. Forexample:
      • Purchase requisition

      • Purchase order

      • Delivery

      • Sales order

      • If there is no document category in the order item, this is definedusing the relevant store order profile for the customer or usinganother combination of customer and material group.Store order profiles can be definedin Customizing using POS inbound.
        Item data is transferred in table ORDER_ITEMS. Document and itemnumbers are assigned using an automatic and internal procedure. FieldBEDNR can be used for defining external numbers.
        After creating the document, the following information is confirmedusing table ORDER_ITEMS:
        • Document number (E_BELNR)

        • Document item (E_POSNR)

        • Document category (E_OBJTYPE)

        • Possible errors are displayed using the RETURN parameter.

          Further information
          For further information, see the documentation for function moduleVWWS_STORD_DISPATCHER.
          Program: Normally '2' for Replenishment.
          Other possibilities with special features:
          Store order using IDOC '1'
          Replenishment '2'
          Goods receipt without purchase order '3'
          Investment Buying '4'
          Perishables '5'
          Additionals '6'
          Online Store '8'
          Load Building '9'
          Purchase order split 'A'
          Activate the documentation for document flow in the Business ObjectRepository (BOR).
          If the flag is marked, order items are grouped by vendor sub-range.Different documents are created for each vendor sub-range.
          Suppress error processing workflow.
          Request document generation.
          Activate the two-step sorting method. Puffered data is sorted againafter it is scanned and then processed in groups according to documentassignments. Grouping is data-dependent: one document per vendor and/orpurchasing organization or customer for each document category.


          • Read and create documents in one step
            • '1'

            • Import and buffer in table WVFB
              • '2'

              • Turn buffered data into documents
                Manual conditions for sales orders or net purchase order prices areallowed.
                You can enter different partner data for the sales order and thepurchase order.
                Manual conditions for sales orders or net purchase order prices areallowed.

                Description
                You can enter different partner data for the sales order and thepurchase order.
                Table of Order Items

                Note
                Action field must be empty (Create Transaction)
                If necessary, the system determines any empty fields itself.
                If the field WBTYP is not filled, the system finds the value from StoreOrder Customizing. All fields that are filled are copied with orwithout being checked.
                Material ID and Quantity are mandatory fields.
                If successful, the output fields are filled as follows:

                • E_BELNR contains the document header number

                • E_POSNR contains the internal document item number

                • E_OBJTYPE contains the business object (the target document type)

                • Purchase Requistion = BUS2105

                • Purchase Order = BUS2012

                • Delivery = LIKP

                • Sales Order = BUS2032

                • Table containing the notes, warnings, and errors that occurred duringprocessing.
                  (You can use Customizing for store order processing to de-activatenotes and warnings).