Difference between revisions of "SAP SD BAPI NOTES"
From SapWiki
(Created page with " <nowiki>SAP Note 93091 -Information about the BAPIs in Sales and Distribution Note Language: English Version: 18 Validity: Valid Since 23.03.2011 Summary Symptom This...") |
|||
| Line 35: | Line 35: | ||
-BAPI_INQUIRY_CREATEFROMDATA Create customer inquiry BUS2030 | -BAPI_INQUIRY_CREATEFROMDATA Create customer inquiry BUS2030 | ||
| − | For other sales business objects, separate BAPIs do not yet exist. For | + | For other sales business objects, separate BAPIs do not yet exist. For these, you can use BAPI_SALESDOCU_CREATEFROMDATA. It is not released, but you can use it productively (live) like the BAPIs listed in section IV), and it is supported. |
| − | these, you can use BAPI_SALESDOCU_CREATEFROMDATA. | ||
| − | It is not released, but you can use it productively (live) like the BAPIs | ||
| − | listed in section IV), and it is supported. | ||
Example: Creating returns BUS2102; to do this, fill the parameter BUSINESS_OBJECT with 'BUS2102'. | Example: Creating returns BUS2102; to do this, fill the parameter BUSINESS_OBJECT with 'BUS2102'. | ||
| Line 56: | Line 53: | ||
The use of BAPI_SALESDOCU_CREATEFROMDATA is intended for Release 4.0. As of Release 4.5B, you should no longer use BAPI_SALESDOCU_CREATEFROMDATA. | The use of BAPI_SALESDOCU_CREATEFROMDATA is intended for Release 4.0. As of Release 4.5B, you should no longer use BAPI_SALESDOCU_CREATEFROMDATA. | ||
| − | Instead, use the RFC-enabled function module SD_SALESDOCUMENT_CREATE. See | + | Instead, use the RFC-enabled function module SD_SALESDOCUMENT_CREATE. See section IV.) for more information. Miscellaneous information is available further below. |
| − | section IV.) for more information. Miscellaneous information is available | ||
| − | further below. | ||
II.) Configuration: | II.) Configuration: | ||
| Line 64: | Line 59: | ||
How do I have to fill the configuration tables of the BAPIs? | How do I have to fill the configuration tables of the BAPIs? | ||
| − | The BAPIs use the same communication structures as IDoc | + | The BAPIs use the same communication structures as IDoc processing. It is described in detail in the general SAP documentation. |
| − | processing. It is described in detail in the general SAP documentation. | ||
This documentation is available on the DOCU CD under: | This documentation is available on the DOCU CD under: | ||
| Line 73: | Line 67: | ||
-IDoc processing, EDI for configurable materials | -IDoc processing, EDI for configurable materials | ||
| − | Use the field POSEX (PO_ITM_NO) to define the connection between the sales | + | Use the field POSEX (PO_ITM_NO) to define the connection between the sales order item and the configuration (BAPICUFG-POSEX). |
| − | order item and the configuration (BAPICUFG-POSEX). | ||
(ORDER_ITEMS_IN-PO_ITM_NO = ORDER_CFGS_REF-POSEX) | (ORDER_ITEMS_IN-PO_ITM_NO = ORDER_CFGS_REF-POSEX) | ||
| − | As of Release 4.5B, there are BAPIs for changing sales documents. How do I | + | As of Release 4.5B, there are BAPIs for changing sales documents. How do I have to fill the parameters to change a configuration? |
| − | have to fill the parameters to change a configuration? | ||
The following entries are required: | The following entries are required: | ||
| Line 120: | Line 112: | ||
- BAPI_CUSTOMERQUOTATION_CHANGE | - BAPI_CUSTOMERQUOTATION_CHANGE | ||
| − | Even though these BAPIs are not yet released, you can use them | + | Even though these BAPIs are not yet released, you can use them productively (live). Incompatible changes to these BAPIs are made only in urgent and justified exceptional cases. Such a change is documented in Note 187340. |
| − | productively (live). Incompatible changes to these BAPIs are made | ||
| − | only in urgent and justified exceptional cases. Such a change is | ||
| − | documented in Note 187340. | ||
| − | For other sales business objects, there are no separate BAPIs. For | + | For other sales business objects, there are no separate BAPIs. For these, you can use the RFC-enabled function modules SD_SALESDOCUMENT_CREATE and SD_SALESDOCUMENT_CHANGE. You can also use both of these function modules productively (live). However, since they are not released, they may not be fully supported by SAP. This would have to be checked in the individual cases. |
| − | these, you can use the RFC-enabled function modules | ||
| − | SD_SALESDOCUMENT_CREATE and SD_SALESDOCUMENT_CHANGE. You can also | ||
| − | use both of these function modules productively (live). However, | ||
| − | since they are not released, they may not be fully supported by | ||
| − | SAP. This would have to be checked in the individual cases. | ||
Which advantages do these new BAPIs have: | Which advantages do these new BAPIs have: | ||
| Line 139: | Line 123: | ||
-Connection to the Central Address Management (CAM) address (Note 195768) | -Connection to the Central Address Management (CAM) address (Note 195768) | ||
| − | * Requested delivery quantities and the requested delivery date are | + | * Requested delivery quantities and the requested delivery date are schedule line data that has to be entered in the relevant input table (BAPISCHDL). |
| − | schedule line data that has to be entered in the relevant input | ||
| − | table (BAPISCHDL). | ||
| − | * If an error occurs in BAPI_SALESORDER_SIMULATE during processing, | + | * If an error occurs in BAPI_SALESORDER_SIMULATE during processing, processing is ended and the output table ORDER_ITEMS_OUT remains initial. If the parameter BEHAVE_WHEN_ERROR is set to "P", the function module SD_SALESDOCUMENT_CREATE does not return a result if an error occurs. |
| − | processing is ended and the output table ORDER_ITEMS_OUT remains | ||
| − | initial. If the parameter BEHAVE_WHEN_ERROR is set to "P", the | ||
| − | function module SD_SALESDOCUMENT_CREATE does not return a result if | ||
| − | an error occurs. | ||
| − | * You can use a CREATE BAPI to create a sales and distribution | + | * You can use a CREATE BAPI to create a sales and distribution document. You can use a CHANGE BAPI to change the document. Changing a document with a CREATE BAPI is not supported. |
| − | document. You can use a CHANGE BAPI to change the document. | ||
| − | Changing a document with a CREATE BAPI is not supported. | ||
Other terms | Other terms | ||
Latest revision as of 15:33, 6 April 2020
SAP Note 93091 -Information about the BAPIs in Sales and Distribution
Note Language: English Version: 18 Validity: Valid Since 23.03.2011
Summary
Symptom
This note contains information about the BAPIs in Sales and Distribution.
I. General information:
In Release 3.1G, the BAPIs for the business object BUS2032 were delivered for the first time, but were not yet released.
This applies to the following BAPIs:
1. BAPI_CUSTOMERORDER_CREATE
2. BAPI_CUSTOMERORDER_SIMULATE
3. BAPI_CUSTOMERORDER_GET_STATUS
4. BAPI_CUSTOMERORDER_GETLIST
The BAPIs were renamed as follows to ensure that the names of the methods
are correct:
1. BAPI_SALESORDER_CREATEFROMDATA
2. BAPI_SALESORDER_SIMULATE
3. BAPI_SALESORDER_GETSTATUS
4. BAPI_SALESORDER_GETLIST
The BAPI BAPI_SALESORDER_CREATEFROMDATA can also create quotations and inquiries. As a result, this method can be used by several business objects. This is contradictory to the BAPI principles.
As of Release 4.0A, the following BAPIs are available for creating sales documents:
-BAPI_SALESORDER_CREATEFROMDAT1 Create sales order BUS2032
-BAPI_QUOTATION_CREATEFROMDATA Create customer quotation BUS2031
-BAPI_INQUIRY_CREATEFROMDATA Create customer inquiry BUS2030
For other sales business objects, separate BAPIs do not yet exist. For these, you can use BAPI_SALESDOCU_CREATEFROMDATA. It is not released, but you can use it productively (live) like the BAPIs listed in section IV), and it is supported.
Example: Creating returns BUS2102; to do this, fill the parameter BUSINESS_OBJECT with 'BUS2102'.
You can use BAPI_SALESDOCU_CREATEFROMDATA to create the following sales
document categories:
BUS2034 Contracts
BUS2094 Credit memo request
BUS2096 Debit memo request
BUS2102 Returns
BUS2103 Subsequent delivery free of charge
The use of BAPI_SALESDOCU_CREATEFROMDATA is intended for Release 4.0. As of Release 4.5B, you should no longer use BAPI_SALESDOCU_CREATEFROMDATA.
Instead, use the RFC-enabled function module SD_SALESDOCUMENT_CREATE. See section IV.) for more information. Miscellaneous information is available further below.
II.) Configuration:
How do I have to fill the configuration tables of the BAPIs?
The BAPIs use the same communication structures as IDoc processing. It is described in detail in the general SAP documentation.
This documentation is available on the DOCU CD under:
-Logistics - General
-Variant configuration
-IDoc processing, EDI for configurable materials
Use the field POSEX (PO_ITM_NO) to define the connection between the sales order item and the configuration (BAPICUFG-POSEX).
(ORDER_ITEMS_IN-PO_ITM_NO = ORDER_CFGS_REF-POSEX)
As of Release 4.5B, there are BAPIs for changing sales documents. How do I have to fill the parameters to change a configuration?
The following entries are required:
- SALESDOCUMENT Document number of document to be changed
- HEADER_INX-UPDATEFLAG U for update of the document
- ITEM_IN-ITM_NUMBER Item number
- ITEM_IN-PO_ITM_NO POSEX
- ITEM_INX-ITM_NUMER Item number
- ITEM_INX-UPDATEFLAG U update of the document item
-The configuration tables CFGS_REF, CFGS_INST, CFGS_PART_OF, and
CFGS_VALUE have to be filled as when you create, that is, the complete
configuration data of the item to be changed has to be specified.
III.) Input data:
To create a sales document, you must enter at least the following data:
Header: - Order type
- Sales organization
- Distribution channel
- Division
-Item: - Material number, with leading zeros
- Quantity
-Partner: - SP, sold-to party
- Customer number, with leading zeros
IV.) Miscellaneous:
* In Release 4.5B, the following BAPIs were developed:
- BAPI_SALESORDER_CREATEFROMDAT2
- BAPI_CONTRACT_CREATEFROMDATA
- BAPI_INQUIRY_CREATEFROMDATA2
- BAPI_QUOTATION_CREATEFROMDATA2
- BAPISDORDER_GETDETAILEDLIST
- BAPI_SALESORDER_CHANGE
- BAPI_CUSTOMERCONTRACT_CHANGE
- BAPI_CUSTOMERINQUIRY_CHANGE
- BAPI_CUSTOMERQUOTATION_CHANGE
Even though these BAPIs are not yet released, you can use them productively (live). Incompatible changes to these BAPIs are made only in urgent and justified exceptional cases. Such a change is documented in Note 187340.
For other sales business objects, there are no separate BAPIs. For these, you can use the RFC-enabled function modules SD_SALESDOCUMENT_CREATE and SD_SALESDOCUMENT_CHANGE. You can also use both of these function modules productively (live). However, since they are not released, they may not be fully supported by SAP. This would have to be checked in the individual cases.
Which advantages do these new BAPIs have:
-Upload of header and item texts possible
-Upload of n conditions
-Upload of n schedule lines
-Connection to the Central Address Management (CAM) address (Note 195768)
* Requested delivery quantities and the requested delivery date are schedule line data that has to be entered in the relevant input table (BAPISCHDL).
* If an error occurs in BAPI_SALESORDER_SIMULATE during processing, processing is ended and the output table ORDER_ITEMS_OUT remains initial. If the parameter BEHAVE_WHEN_ERROR is set to "P", the function module SD_SALESDOCUMENT_CREATE does not return a result if an error occurs.
* You can use a CREATE BAPI to create a sales and distribution document. You can use a CHANGE BAPI to change the document. Changing a document with a CREATE BAPI is not supported.
Other terms
BAPIs, sales order
Reason and Prerequisites
Solution
SAP Note 93091 -Information about the BAPIs in Sales and
Distribution
Header Data
Release Status: Released for Customer
Released on: 23.03.2011 07:04:33
Master Language: German
Priority: Recommendations/additional info
Category: Consulting
Primary Component: SD-SLS-GF-IF Sales Documents BAPI's
Secondary Components:
BC-MID-API BAPI Tools (for BAPIs see note
813411)
The Note is release-independent
Related Notes
Number Short Text
550431 FAQ: BAPI in sales - general questions
549563 BAPI: Filling the configuration structures
438261 BAPI SD: Error 'V1761' with BAPI_SALESDOCU_CREATEFROMDATA
366265 How should I fill the BAPI parameters?
187340 Parameter changes with BAPIs in SD for Rel. 4.6C
143580 Information on SD BAPIs and customer enhancement concept
102688 Dialog box in SD BAPIs for alternative BOM