Functionality You can use this method to create a sales order with BOS. Notes Minimum requirements for creating a sales order> The following parameters, at least, must be transferred:
- Order header data via parameter OrderHeaderIn>
,,DOC_TYPE,,>sales document type ,,SALES_ORG,,>sales organization ,,DISTR_CHAN,,>distribution channel ,,DIVISION,,>division The sales document type must be entered in correspondance with thelogon language.
- Partner data via parameter OrderPartners>
,,PARTN_ROL,,>partner function AG (sold-to party),, ,,PART_NUMB,,>customer number If you do not enter a ship-to party, then ship-to party = sold-toparty. The partner function must be consistent with the logon language. Minimum entry requirements for creating a document item>
- Document item data via parameter OrderItemsIn>
,,ITM_NUMBER ,,>item number ,,MATERIAL,,>material number There are two options for number assignment:
- If you choose external number assignemnt via parameter
IntNumberAssignment>, you must enter the item number in fieldITM_NUMBER>.
- If you choose internal number assignment via parameter
IntNumberAssignment>, the system assigns the item numbersaccording to your settings in Customizing. For internal numberassignment, field ITM_NUMBER> must remain initial. Minimum entry requirements for creating a document item with BOS> In addition to the document items, you must also transfer the followingparameters if you want to create a document item with BOS:
- The package number for the BOS PCKG_NO > must be transferred via
parameter OrderItemsIn>. This must correspond to the PCKG_NO > of the initial node (uppermost outline level with hierarchy level0) in transfer parameter OrderServices/>.> There must be exactly one schedule line for a document item with BOS.You must set a quantity of 1>. You enter the dtaes via theschedule line data. You must enter the following data via parameter OrderSchedulesIn >: ,,ITM_NUMBER,,>item number ,,SCHED_LINE,,>schedule line number ,,REQ_DATE,,>schedule line date ,,REQ_QTY ,,>order quantity in sales unit of measure Creating Services> You can transfer service data for the order item via parametersOrderServices> and OrderServicesText> and OrderServicesCond>. Customer fields - tables VBAK>, VBAP>, VBEP> and ESLL> can be transferred via parameter ExtensionIn>. Transfer of Configuration Data> If you are dealing with configurable data, you must transfer theconfiguation data in the following parameters: ,,OrderCfgsRef,,,,>configuration: reference data ,,OrderCfgsInst,,,,>configuration: instances ,,OrderCfgsPartOf,,,,>configuration: instances ,,OrderCfgsValue,,,,>configuration: characteristic values Commit Control> This method does not include a database commit. This means that thecalling application must exit the commit so that changes can be made onthe database. The following method is available for this:BAPI_TRANSACTION_COMMIT>. Return Values> After you have created the sales order successfully, the documentnumber is returned via parameter SalesDocument>. If errors occur during processing, they are returned to table parameterReturn>. Information messages are also logged in this parameter.Further information SAP note number 93091 contains general information for BAPIs inSales and Distribution (SD)>.Description This parameter returns the sales order number created by the BAPI. Description This parameter controls the program reaction when an error occurs. INCLUDE BOS_BAPI_BEHAVEWHENERROR OBJECT DOKU ID TX Description Describes the significance that the link between two objects (in theirroles) has. Description This parameter is for entering the costing variant. If you create a cost estimate in an operative BOS, the system requiresyou to assign a costing variant. It means that, via the costingvariant, different additions, deductions and assessments are availableon costing item level. Description Indicator for item number assignment There are two options for assigning item numbers:
- If you do not set the indicator, you must assign the item numbers
manually via field ITM_NUMBER> in table parameter OrderItemsIn>.
- If you set the indicator, the system assigns the item numbers (internal
number assignment) according to your Customizing settings. For internalnumber assignment, field ITM_NUMBER> in table parameterOrderItemsIn> must remain initial. &EXAMPLE&> In some cases, internal number assignment is required, for example, forarticles for which a BOM is exploded in the order. An order with two items and a schedule line for each is to be created.For this, you enter item numbers 10 and 20 in OrderItemsIn> andOrderSchedulesIn>. If the article for item 10 now receives asales BOM, it can be exploded and a sub-item 20 is created. Thereference schedule line (VBEP>) - item (VBAP>) no longerexists. Internal number assignment is required here.Value range
Space,,>external item number assignment
X,,>internal item number assignmentDefault
Space> INCLUDE BOS_BAPI_LOGICSWITCH OBJECT DOKU ID TXDescription This parameter contains document header data. INCLUDE BOS_BAPI_ANKREUZLEISTE OBJECT DOKU ID TX Value range Field UPDATEFLAG> contains the value SPACE > or I>(for creation). The checkboxes are not to be filled.Default For field UPDATEFLAG>:
SPACE>,,create a new quotationDescription This parameter is for entering the SD document number. Value range You have two options for SD document number assignment:
- You can assign the SD document number manually. In this case, enter the
number in the appropriate field.
- The system assigns the SD document number (internal number assignment).
In this case, the number is assigned on the basis of your Customizingsettings.Description This parameter is for entering the sending system. The entry is required if object references are to be written. Description This parameter serves as a test indicator. If the indicator is set, the document is not saved. Value range
Space>,,document is saved
X>,,document is not savedDefault
Space> INCLUDE BOS_BAPI_EXTENSIONIN OBJECT DOKU ID TX INCLUDE BOS_BAPI_KREDITKARTENDATEN OBJECT DOKU ID TX INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TXDescription This parameter contains the condition data for the document item. INCLUDE BOS_BAPI_KONDITION OBJECT DOKU ID TX Description This parameter contains the costing items for service lines. A service line or an outline level is identified by the package numberPCKG_NO and the internal line number LINE_NO . A cost item is identified via the following fields (key):
- ITM_NUMBER >,,Quotation Item
- PCKG_NO>,,,,Package number
- LINE_NO>,,,,Internal Line number
- ITEM_NUMBER>,,Costing item number
You must transfer further identification fields for a costing item thatyou want to create.
- Item category in field ITEM_CATEGORY>
- Cost element in field COST_ELEM>
- Quantity in field QUANTITY/PRICE_QUNATITY>
If you are dealing with an amount you need to specify:
- Currency in field CURRENCY>
- Price in field PRICE_TOTAL/ PRICE_FIXED>
- Unit of measure BASE_UOM/PRICE_QUANTITY_UNIT>
Note
- For each costing item there must be a corresponding data record (the
same PCKG_NO and LINE_NO ) in transfer parameter Orderservices>
- It is not possible to attach cost item with outline and main item.
- LogicSwitch> must have a value in it if you want to transfer cost
back to service line levelDescription This parameter contains the costing model for service lines. A service line or an outline level is identified by the package numberPCKG_NO> and the internal line number LINE_NO>. A costing model is identified via the following fields (key):
- ITM_NUMBER> Sales Order Item
- PCKG_NO> Package number
- LINE_NO> Internal Line number
Additionally, you must transfer identification field COSTMODEL>for the costing model which you wish want to create. Note
- For each costing model there must be a corresponding data record, the
same PCKG_NO> and LINE_NO> in transfer parameterOrderServices>.
- It is not possible to attach costing item with outline and main item.
- LogicSwitch> must have a value in it if, you wish to transfer
cost back to service line level.Description This parameter contains item data for the sales order. You must fill at least the following fields if you want to create aBOS:
- If you choose external number assignment via parameter
ExtNumberAssignment>, you have to enter the item number in fieldITM_NUMBER>.
- If you choose internal number assignment via parameter
IntNumberAssignment>, the system assigns the item numbers.Internal item number assignment takes place on the basis of yourCustomizing settings. Field ITM_NUMBER> msut remain initial.
- If you want to be able to create a BOS, a material number with the
appropriate settings in field MATERIAL> must be transferred.
- The PCKG_NO> of the document item must correspond to the
PCKG_NO> of the top node (uppermost outline level with hierarchylevel 0) in transfer parameter OrderServices>. You can find further information on the meaning of the individualparameter fields in the appropriate data element documentation in theABAP dictionary. INCLUDE BOS_BAPI_ANKREUZLEISTE OBJECT DOKU ID TXValue range Field UPDATEFLAG> contains the value SPACE > (forcreation). The checkboxes are not to be filled.Default Field UPDATEFLAG>: ,,SPACE> Checkboxes:,, SPACE>Description This parameter contains the cost model characteristic for cost model. A service line or an outline level is identified by the package numberPCKG_NO >and the internal line number LINE_NO> . A cost model is identified via the following fields (key):
- ITM_NUMBER >,,Quotation Item
- PCKG_NO>,,Package number
- LINE_NO,,>,,Internal Line number
You must transfer further identification fields for a cost modelcharacteristic for cost model
- Characteristic field CHARACTERISTIC>
- Characteristic value CHARA_VAL>
Note For each cost model characteristic there must be a corresponding datarecord (the same PCKG_NO> and LINE_NO>) in transferparameter OrderServices >and OrderCostModell>. INCLUDE BOS_BAPI_PARTNERDATEN OBJECT DOKU ID TX INCLUDE BOS_BAPI_EINTEILUNGSZEILEN OBJECT DOKU ID TX There must be exactly one schedule line with the quantity 1 for adocument item with a BOS. For this, you must enter the following data (at least): ITM_NUMBER>,,item number SCHED_LINE>,,schedule line number REQ_DATE>,,schedule line date REQ_QTY >,,quantity in sales unit of measure INCLUDE BOS_BAPI_ANKREUZLEISTE OBJECT DOKU ID TXValue range Field UPDATEFLAG> contains the value SPACE > (forcreation). The checkboxes are not to be filled.Default Field UPDATEFLAG>:,,SPACE> Checkboxes: ,,SPACE>Description This transfer parameter contains the service lines and the outlinelevels for the order bills of services that are to be created. INCLUDE BOS_BAPI_SERVICE_IDENTIFY OBJECT DOKU ID TX INCLUDE BOS_BAPI_CREATESERVICELINE OBJECT DOKU ID TX INCLUDE BOS_BAPI_CREATEOUTLINE OBJECT DOKU ID TX
- You are free to assign the PCKG_NO> as you wish. The system
converts this number to an internal value. The initial node of a BOS> (uppermost outline level withhierarchy level 0) must also exist in the transfer parameter. For this,create an outline level and transfer the PCKG_NO> and LINE_NO >. The PCKG_NO> must correspond to field PACKNO> of theappropriate document item in the transfer structure OrderItem>.Description This parameter contains the service conditions for the service lines.You cannot create or change header conditions. A service line or an outline level is identified by the package numberPCKG_NO> and the internal line number LINE_NO>. A service condition record is identified via the following fields(key): ITM_NUMBER,,>order item PCKG_NO,,>package number LINE_NO,,>internal line number COND_ST_NO,,>condition level COND_COUNT,,>counter within the condition level The following fields also have to be transferred in addition to theidentification fields for a condition record that you want to create:
- Conditio type in field COND_TYPE>
- Condition amount in field COND_VALUE>
- If you are dealing with an amount:
currency in field CURRENCY>(according to Customizing settings) Condition price unit in filed COND_P_UNT> Condition unit of measure in field COND_UNIT> Please note:
- You must transfer the basic price of a newly created service line
(condition type of condition category H in Customizing for BOS underBOS Pricing). An exception is the transfer of a service line from theservice master record. In this case, the conditions from the servicemaster conditions can be read.
- There must be a correpsonding data record (the same PCKG_NO> and
LINE_NO>) in transfer parameter OrderServices> for eachcondition record.
- Field PRICING> in parameter LogicSwitch> must be have an
entry in it when you transfer condition records for the BOS if you wantto be able to price anew on service line level. INCLUDE BOS_BAPI_LEISTUNGSKONDITION OBJECT DOKU ID TX INCLUDE BOS_BAPI_SERVICESTEXTS OBJECT DOKU ID TXValue range The following entries are possible for field TEXT_ID>:
LTXT>,,line long text / outline long text
LLTX>,,serviec long text If FORMAT_COL> is left empty, the standard format key * isassigned. INCLUDE BOS_BAPI_TEXTE OBJECT DOKU ID TXDescription If errors occur during processing, they are returned in the tableparameter Return>. Information messages are also logged in thistable parameter.Value range If no error occurs, the return parameter is initial. Otherwise theappropriate error messages with short text are displayed.
|