Ansicht
Dokumentation

BAPI_SALESDOCU_CREATEFROMDATA1 - Creating a Sales and Distribution Document

BAPI_SALESDOCU_CREATEFROMDATA1 - Creating a Sales and Distribution Document

PERFORM Short Reference   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

Using this method, you can create sales documents with items, schedule lines and item conditons.

You must enter at least sales order header data (via structure ORDER_ HEADER_IN), and partner data (via the table ORDER_PARTNERS) as input parameters.

Enter the item data via the table ORDER_ITEMS_IN. You can enter the item number manually, by filling out the relevant fields, or automatically, corresponding to Customizing, by leaving the relevant fields blank. If you decide to enter the item number using R/3, you cannot enter any schedule lines or conditions, as these cannot be linked to the corresponding item. If you are dealing with configurable items, you must enter the configuration data in the tables ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF, ORDER_CFGS_VALUE and ORDER_CFGS_BLOB.

Scheduling data can be published via the structure SALES_SCHEDULE_IN.

Document conditions to be created can be entered via the structure SALES_CONDITIONS_IN .

Credit card data can be published via the structure SALES_CCARD, card identification data on the one hand, and data regarding an authorization which has taken place in an external system, on the other.

After you have created the sales document successfully, you will receive the document number (SALESDOCUMENT_EX field).

Any errors that might occur are announced via the parameter RETURN.

Using the checkbox:

The individual components of a sales document can be generated with or without a checkbox. If you decide on the first possibility, only fields which have unmatching SPACE are copied. In the second case (field UPDATEFLAG for checkbox must be 1), only fields which have an 'X' in the box are copied. This allows fields which have been preassigned to default values to be set on SPACE again.

Example

Notes

  1. If no object references are to be written, the following fields (parameters) should be initialized:
    BINARY_RELATIONSHIPTYPE
    SALES_HEADER_IN-REFOBJECTTYPE
    SALES_HEADER_IN-REFOBJECTKEY
    SALES_HEADER_IN-REFDOCTYPE

  1. If item conditions (SALES_CONDITIONS_IN) are entered, then it is recommended that you enter a pricing date in the header SALES_HEADER_IN, PRICE_DATE), as the BAPI does not know whether a pricing date is automatically determined. In order to be able to read the condition record successfully, a date is necessary in certain cases.

Further information





Parameters

BINARY_RELATIONSHIPTYPE
INT_NUMBER_ASSIGNMENT
KEY_TABLE
RETURN
SALESDOCUMENT
SALESDOCUMENT_EX
SALES_CCARD
SALES_CFGS_BLOB
SALES_CFGS_INST
SALES_CFGS_PART_OF
SALES_CFGS_REF
SALES_CFGS_VALUE
SALES_CONDITIONS_IN
SALES_HEADER_IN
SALES_HEADER_INX
SALES_ITEMS_IN
SALES_ITEMS_INX
SALES_PARTNERS
SALES_SCHEDULES_IN
SALES_SCHEDULES_INX
SENDER

Exceptions

Function Group

VBAK

Fill RESBD Structure from EBP Component Structure   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 4373 Date: 20240523 Time: 151957     sap01-206 ( 84 ms )