Fonction SAP BAPI_SALESADDIREQ_REPLICATE - Request Detailed Data on Additionals

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ADDIBUYHEADID BAPI2106A-ADDI_BUY_HEAD_NO C 10 X Header Number for Additionals Purchasing Document
ADDIBUYITEMNO BAPI2106A-ADDI_BUY_ITEM_NO N 5 X Item Number for Additionals Purchasing Document
ADDIRUNNINGNO BAPI2106A-ADDI_KEY N 4 X Identification Number for Additional
ADDISUPPLIER BAPI2106A-ADDI_SUPPLIER C 10 X Additionals Vendor
APPLICATION BAPI2106A-APPLICATION C 2 Application
CUSTOMER BAPI2106A-CUSTOMER C 10 X Customer, also Plant
DOCHEADID BAPI2106A-REF_DOC_ID C 10 Header Number for Application Reference Document
DOCITEMNO BAPI2106A-ITEM_NUMBER N 6 X Item Number for Application Reference Document
DOCSCHEDULELINE BAPI2106A-SCHEDULE_NO N 4 X Schedule Line Number for Application Reference Document

Paramètre Reférence Type Long. Description
RETURN BAPIRET2 u 548 Message about Processing Status

Functionality
When this method is called, data for an additional is created in theform of an IDoc. The IDoc is transferred asynchronously by ALE to therequesting party.

Example
Assume that an additionals vendor received an order for tickets for aparticular product. To generate the tickets, the vendor uses thisfunction module to request the most up-to-date data on the sales price,for example, for the product in question.
The function module call is as follows:
call bapi_salesaddireq_replicate
exporting
application = '02'
docheadid = '4500000815'
docitemno = '00010'
docscheduleline = '0001'
runningno = '0002'
addisupplier = 'TICKET007 '
importing
return = return.
An additionals IDoc is generated for the additional (0002) for purchaseorder 4500000815, item 10, schedule line 1. The number for theadditional is sent to the vendor of the original material in thepurchasing document together with the short text for the additional.
The additional itself is manufactured by vendor TICKET007.
The validity of the input parameters is checked in the method. If thecombination of parameters is not allowed, a message is returned.
In the example, the following requirements must be met:

  • PO number 4500000815 must exit with an item 10 and schedule line 1. The
  • system recognizes that this is a purchase order from the parameter'Application'. 02 stands for purchase orders.
    • The event "Purchase order creation" must have led to the creation of an
    • additional with the internal number 0002.
      • The additionals vendor TICKET007 must be assigned to the purchase order
      • referenced for additional 002.

        Notes
        A further method for the commit must be called so that the IDoc isactually generated.

        Description
        In this parameter, the system transfers a messageabout the processing status. If all input parameters are valid, amessage is created that creation of an additionals IDoc was startedsuccessfully.

        Hints
        The additionals IDoc itself is sent to the caller asynchronously.

        Possible messages

        • The module confirms that the additionals IDoc was successfully created
        • with the message Additionals IDoc generation startedsuccessfully.
          • If a data record does not exist for the document data (application,
          • DocHeadID, DOcItemNo, DocScheduleLine and AddiRunningNo), the messageNo additionals document exists is issued.
            • For the input data for which Follow-up action '3'
            • (wait for external request for IDoc) is defined, the system issues themessage IDoc cannot be generated by calling BAPI.
              • So that the system knows where the additionals IDoc is to be sent, a
              • value must be entered for either the customer or the additionalsvendor. This must be a permitted value. The system checks whether theIDoc is requested by a valid customer orvalid additionals vendor.
                • If the additionals IDoc has already been successfully called via BAPI,
                • the system issues the message Additionals IDoc alreadyrequested via BAPI. The IDoc is not created.
                  • The BAPI can be started externally by the vendor of an additional. This
                  • vendor will have received a purchase order for the additional. When theBAPI is called, the corresponding values for purchase order number anditem must be transferred (AddiBuyHeadID und AddiBuyItemNo). If thesedetails are not correct, the system issues the messageWrong reference specified to purchase orders foradditionals.
                    • If the BAPI is called by the vendor of an additional, details on the
                    • additionals purchase order must be transferred (AddiBuyHeadID andAddiBuyItemNo). If these values are missing, the system issues themessage Reference purchase order number for additionalneeded.

                      Description
                      The system can create a purchase order for an additionals IDoc. In thiscase, the system requesting the additionals IDoc must transfer thepurchase order number and item.

                      Hints
                      The system uses this data to check the validity of the call.

                      Description
                      In addition to the purchase order, the calling system must transfer theitem in the purchasing document.
                      See also documentation on AddiBuyHeadID.

                      Description
                      An additional belongs to a material, and several additionals can beassigned to one material. In addition to the additional itself, theunit of measure for the material, and the group of plants for which theadditional applies, form a kind of key. This key is a four-digit numberthat is included in the reference data which is used to fill theparameters for calling the module.
                      The key for the additional is entered in field IDTNR of segment E1EDP19in the orders IDoc, that can be created on the basis of purchaseorders.

                      Value range
                      The key is generated automatically when the additional is created.

                      Description
                      Specialized companies produce a whole series of additionals. Forexample, specialized companies produce additionals such as sales pricelabels, packaging, or sew-in labels. The system can automaticallycreate purchase orders for these vendors. The vendor selected by thesystem is entered in this field.

                      Value range
                      In principle, every vendor entered in the system can act as a vendorfor additionals.

                      Hints
                      When data is prepared for a customer and data is entered for theparameter "Customer", this field can remain empty.

                      Description
                      To assign the referenced document correctly, the parameter for theapplication in which the reference document was created must betransferred to the module.

                      Value range
                      There are three different applications:
                      01: Goods movements
                      02: Purchasing or purchase orders
                      03: Deliveries
                      04: Sales orders
                      The value chosen for the application is determined from the documentused for defining the parameters for the module.

                      Description
                      Data for an additional can be requested by a customer. The customernumber must be entered in this parameter.

                      Value range
                      In principle, all customers can be recipients of additionals IDocs.

                      Hints
                      If data is entered for this parameter, parameter AddiSupplier canremain empty.

                      Description
                      An additional always has a reference to a higher-level document. Thisparameter refers to the header information of the document that isreferenced. This contains the number of a purchasing document, forexample.

                      Value range
                      The value area depends on the application. In principle, values ofreference documents have 10 characters.

                      Description
                      An additional is created for a particular item in a referenceddocument. This item number is transferred in this parameter.

                      Value range
                      Item values for purchasing documents and goods movements have fivedigits, item values for vendors have six digits. Values are alwaysnumerical.

                      Description
                      Schedule lines can be entered for each item in a purchasing document.Data for an additional always reference the particular combination ofdocument, item and schedule line.

                      Value range
                      The schedule line number has four digits and is numerical.