Functionality Using this method you can create customer sales and distributiondocuments. The minimum input parameters for this are:
- Order header data (via the structure SALES_HEADER_IN) and
- Partner data (via the table SALES_PARTNERS)
You provide the item data via the table SALES_ITEMS_IN. There are two ways to assign the item numbers:
- Manual - you complete the relevant fields
- Automatic - the relevant fields remain blank or 0. The item number is
in this case assigned according to the customizing settings. If they are configurable items you have to provide configuration datain the following tables:
- SALES_CFGS_REF
- SALES_CFGS_INST
- SALES_CFGS_PART_OF
- SALES_CFGS_VALUE
Via the structure BAPICCARD, credit card data can be transferred - thisis data on card identification and on authorization that took place onan external system. After creation of the sales order has been effected, you get back thedocument number (field SALESDOCUMENT) and details via the participatingpartner (via the structures SOLD_TO_PARTY, SHIP_TO_PARTY andBILLING_PARTY). Errors that may arise are notified via the parameter RETURN.Description The parameter contains the number of the generated sales document. Description This parameter controls program behavior if an error arises. Till now,an error caused the BAPI to terminate. This meant if you created anorder with several items and one item was incorrect, the system did notcreate the order.. By using this parameter, you can create an order even if an item isincorrect. Value range Space = If any error occurs during processing the program terminates immediately and the sales document is not saved. P = If an error occurs you can save the sales document. Incorrect items are not processed, however the system logs them. R = As P, however the sales document is not saved. Default Space Description The paramater contains the business object. Value range
- BUS2030 for customer inquiries
- BUS2031 for customer quotations
- BUS2032 for sales orders
- BUS2096 for service entry sheets (debit memo requests)
Description The parameter activates internal provision of the item number.Sometimes the SAP System has to internally provide an item number, forinstance, for articles when a BOM is exploded in an order. &EXAMPLE&> You have to create an order with two items each with schedule line. Todo this you enter item numbers 10 and 20 in the fields SALES_ITEM_INand SALES_SCHEDULES_IN. If the article in item 10 contains a sales BOM, you can trigger it. Inthis case the system creates a sub-item with item number 20. This meansthat the reference from the schedule line to the item is lost. Therefore, the item number has to be provided internally.Default Space: the system tries to create the order with external item numbers. Description This parameter controls internal program behavior. It is intended to beused to switch off certain processing if data is to be copied externally. Example> Pricing is performed by SPE (Sales Pricing Engine). The results have tobe copied to the sales document. SAP System should not perform pricing. This is also valid for SCE (Sales Configuration Engine)Value range PRICING = G The results of external pricing are copied by item. SAP System performspricing by item using Pricing Type G. Default Space Notes You can only copy external pricing terms if you use external provisionof the item number. Description This parameter is for entering a document number if the number isprovided externally. Default Space = Internal provision of document number. Description This parameter contains the data from the sales document header. Information on the individual parameters is contained in the relevantdata element documentation in the ABAP Dictionary. Description You use this parameter for the following two activities:
- Control of the processing functionality by the value in field
UPDATEFLAG (change pointer). You can enter the following: ' ': Create a new sales document I : Create a new sales document U : Change an existing sales document D : Delete an existing sales document
- Control of field entry by check box fields
If you set field UPDATEFLAG, the system only copies those fields fromthe parameter ORDER_HEADER_IN that have an 'X' in the check box.Description The parameter is a test switch. If you set the switch the system doesnot save the document. Value range Space = Document is saved X = Document is not saved Default Space Description This table collects the messages that occur on creating a salesdocument. Structure > TYPE ,,,,Message type: S Success, E Error, W Warning, IInformation ID ,,,,Message ID NUMBER ,,,,Message number MESSAGE ,,Message text LOG_NO ,,,,Application log: Log number LOG_MSG_NO ,,Application log: sequence number of message MESSAGE_V1 ,,Message variable MESSAGE_V2 ,,Message variable MESSAGE_V3 ,,Message variable MESSAGE_V4 ,,Message variable PARAMETER ,,Parameter name ROW ,,,,Row in parameter FIELD ,,,,Field in parameter SYSTEM ,,,,System (logical syste) from which message comes. Description The table contains credit card data, and data for identification andauthorization. For a currency-related conversion of the amount field, you have tospecify the currency. Description This paramater contains condition data. Value range On entering the fields COND_VALUE and CURRENCY differentiate betweenthe following cases:
- The calculation rule for the condition is in percent.
In this case, leave the fieldd CURRENCY blank, and enter the percent tothe correct decimal place. Example: You enter 20% as 20,0000 in field COND_VALUE.
- The calculation rule for the condition is not in percent.
In this case field COND_VALUE is a currency amount field. To obtain thecorrect conversion, you have to enter field CURRENCY or CURRENCY_ISO.The amount must be entered to the correct decimal place. If you do not enter the field CURRENCY or CURRENCY-ISO, the systemassumes the entry is a percentage. However, if the condition type isnot percent, the system calculates the wrong amount.Description This parameter contains the item entry data from the sales document. Information on the individual parameter fields is contained in therelevant data element documentation in the ABAP Dictionary. Description You use this parameter for the following two activities:
- Control of the processing functionality by the value in field
UPDATEFLAG (change pointer). You can enter the following: ' ': Create a new sales document item I : Create a new sales document iem U : Change an existing sales document item D : Delete an existing sales document item
- Control of field entry by check box fields
If you set field UPDATEFLAG, the system only copies those fields fromthe data parameter that have an 'X' in the check box.Description You enter the partners, such as sold-to party, ship-to party, usingthis table parameter. You can do this on header or item level. You must at least enter a sold-to party on header level. The systemdetermines the other partner functions automatically. You can enter different addresses in the structure. If you do this, youhave to specify the language. Description This parameter contains the scheduling data. Information on the individual parameter fields is contained in therelevant data element documentation in the ABAP Dictionary. Description You use this parameter for the following two activities: Control of the processing functionality by the value in fieldUPDATEFLAG (change pointer). You can enter the following: ' ': Create new schedule lines I : Create new schedule lines U : Change existing schedule lines D : Delete existing schedule lines Control of field entry by check box fields If you set field UPDATEFLAG, the system only copies those fields fromthe data parameters that have an 'X' in the check box. Value range Default Description The table contains the services and outline layouts. A line is marked as an outline line using field OUTL_IND. You assignservice lines to outline lines using fields PCKG_NO (of service line)and SUBPCKG_NO (of outline line). The outline hierarchy is generated using fields LINE_NO and HI_LINE_NO.Field HI_LINE_NO refers to the field LINO_NO of the superior outline inthe hierarchy. Information on individual parameter fields is contained in the relevantdata element documentation in the ABAP Dictionary. Description You transmit service line text in the table. You can transmit:
- the valid text type in field TEXT_ID, such as service line text
- a SAPscript format key in field TEXT_FORM
- the actual text line in field TEXT_LINE
If TEXT_ID is empty the system always generates a line text. IfFORMAT_COL is empty, the system assigns the default format key *.
Description The table contains the services and outline layouts for the salesdocument. A line is marked as an outline line using field OUTL_IND. You assignservice lines to outline lines using fields PCKG_NO (of service line)and SUBPCKG_NO (of outline line). The outline hierarchy is generated using fields LINE_NO and HI_LINE_NO.Field HI_LINE_NO refers to the field LINO_NO of the superior outline inthe hierarchy. Information on individual parameter fields is contained in the relevantdata element documentation in the ABAP Dictionary.
|