Ansicht
Dokumentation

BAPI_SALESDOCU_CREATEWITHDIA - Creating a Sales and Distribution Document

BAPI_SALESDOCU_CREATEWITHDIA - Creating a Sales and Distribution Document

BAL Application Log Documentation   ROGBILLS - Synchronize billing plans  
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 conditions.

You must enter at least sales order header data (via the structure ORDER_HEADER_IN) and partner data (via the table ORDER_PARTNERS).

Enter the item data via the table ORDER_ITEMS_IN. You can enter the item number manually, by filling in the relevant fields, or automatically, corresponding to Customizing, by leaving the relevant fields blank. If you decide to enter item numbers using mySAP ERP, no schedule lines or conditions can be entered, 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.

The scheduling data can be published via the structure SALES_SCHEDULE_IN.

Document condtions 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, data on an authorization that has taken place in an external system on the other.

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

Errors which might occur will be announced via the parameter RETURN.

Using the checkbox:

You can generate the individual components for a sales document with or without a checkbox. If you decide on the first possibility, only fields with unequal SPACE will be copied. In the second case (field UPDATEFLAG), only fields which have an 'X' in the box are copied. As a result, fields, which are preassigned to default values by the system, can 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

Further information





Parameters

BINARY_RELATIONSHIPTYPE
CONVERT_PARVW_AUART
INT_NUMBER_ASSIGNMENT
MESSAGE_TYPE
PARTNERADDRESSES
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_CONDITIONS_INX
SALES_HEADER_IN
SALES_HEADER_INX
SALES_ITEMS_IN
SALES_ITEMS_INX
SALES_PARTNERS
SALES_SCHEDULES_IN
SALES_SCHEDULES_INX
SENDER
SYNCHRONOUS

Exceptions

Function Group

VBAK

Addresses (Business Address Services)   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 4315 Date: 20240523 Time: 171217     sap01-206 ( 64 ms )