When this method is called, data for an additional is created in theform of an IDoc. The IDoc is transferred asynchronously by ALE to the requesting party.
Assume that an additionals vendor received an order for tickets for aparticular product. To generate the tickets, the vendor uses this
function 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:
application = '02'
docheadid = '4500000815'
docitemno = '00010'
docscheduleline = '0001'
runningno = '0002'
addisupplier = 'TICKET007 '
return = return.
An additionals IDoc is generated for the additional (0002) for purchaseorder 4500000815, item 10, schedule line 1. The number for the additional 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. Thesystem 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.
A further method for the commit must be called so that the IDoc is actually generated.