Ansicht
Dokumentation

SD_SALESDOCUMENT_CREATE - Creating a Sales and Distribution Document

SD_SALESDOCUMENT_CREATE - Creating a Sales and Distribution Document

CL_GUI_FRONTEND_SERVICES - Frontend Services   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

You can use this method to create SD documents with items, schedule lines, and item conditions.

You must specify order header data (using structure ORDER_HEADER_IN) and partner data (using table ORDER_PARTNERS) as input parameters.

Use table ORDER_ITEMS_IN to specify item data. You can carry out the item number assignment manually by filling the appropriate fields, or the system executes it automatically based on the Customizing settings if you leave the corresponding fields initial. If you decide to use mySAP ERP for the item number assignment, no schedule lines or conditions can be specified since there is no recognizable correlation between them and the item.

If the items are configurable, you must specify the configuration data in tables ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF, ORDER_CFGS_VALUE and ORDER_CFGS_BLOB.

You can use structure SALES_SCHEDULE_IN to transfer the schedule line data.

To specify document conditions for creation, you can use structure SALES_CONDITIONS_IN.

You can use structure SALES_CCARD to transfer credit card data, including both data for card identification and data on an authorization that took place in an external system.

Once the SD document has been created successfully, you receive the document number (field SALESDOCUMENT_EX).

The system uses the RETURN parameter to notify you of any errors that occurred.

Using checkboxes:

Each component of an SD document can be created with or without checkboxes. If you want to use checkboxes, the system only copies fields with a value other than SPACE. If you do not want to use checkboxes (the UPDATEFLAG field must be I), the system only copies fields whose value is 'X'. This way, any fields that were assigned default values by the system can be reset to SPACE.

Example

Notes

  1. If you do not want object references to be written, you must initialize the following fields (parameters):
    BINARY_RELATIONSHIPTYPE
    SALES_HEADER_IN-REFOBJECTTYPE
    SALES_HEADER_IN-REFOBJECTKEY
    SALES_HEADER_IN-REFDOCTYPE

  1. If item conditions are specified (SALES_CONDITIONS_IN), we recommend specifying a price date in the header (SALES_HEADER_IN, PRICE_DATE), since the BAPI does not know whether or not the price date will be determined automatically. A date might be required so that the condition records can be read successfully.

Further information





Parameters

BATCH_CHARC
BEHAVE_WHEN_ERROR
BINARY_RELATIONSHIPTYPE
BUSINESS_EX
BUSINESS_OBJECT
CALL_ACTIVE
CAMPAIGN_ASGN
CONDITIONS_EX
CONDITIONS_KONV_EX
CONVERT_PARVW_AUART
EXTENSIONEX
EXTENSIONIN
INCOMPLETE_LOG
INT_NUMBER_ASSIGNMENT
ITEMS_EX
I_CHECK_AG
I_REFRESH_V45I
I_TESTRUN_EXTENDED
I_WITHOUT_INIT
LOGIC_SWITCH
PARTNERADDRESSES
PARTNERS_EX
RETURN
SALESDOCUMENT
SALESDOCUMENT_EX
SALES_CCARD
SALES_CFGS_BLOB
SALES_CFGS_INST
SALES_CFGS_PART_OF
SALES_CFGS_REF
SALES_CFGS_REFINST
SALES_CFGS_VALUE
SALES_CFGS_VK
SALES_CONDITIONS_IN
SALES_CONDITIONS_INX
SALES_CONTRACT_IN
SALES_CONTRACT_INX
SALES_HEADER_IN
SALES_HEADER_INX
SALES_HEADER_OUT
SALES_HEADER_STATUS
SALES_ITEMS_IN
SALES_ITEMS_INX
SALES_KEYS
SALES_PARTNERS
SALES_SCHEDULES_IN
SALES_SCHEDULES_INX
SALES_SCHED_CONF_IN
SALES_TEXT
SCHEDULE_EX
SENDER
STATUS_BUFFER_REFRESH
TESTRUN
TEXTHEADERS_EX
TEXTLINES_EX

Exceptions

Function Group

VBAK

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 7124 Date: 20240604 Time: 111912     sap01-206 ( 84 ms )