SAP Function BAPI_SALESORDER_GETLIST - Sales order: List of all Orders for Customer

Parameter Reference Type Length Default Optional Text
CUSTOMER_NUMBER BAPI1007-CUSTOMER C 10 Customer number
DOCUMENT_DATE BAPIORDERS-DOC_DATE D 8 X Entry date
DOCUMENT_DATE_TO BAPIORDERS-DOC_DATE D 8 X Entry date up to and including
MATERIAL BAPIORDERS-MATERIAL C 18 X Material number
MATERIAL_EVG BAPIMGVMATNR u 82 X Long Material Number
PURCHASE_ORDER BAPIORDERS-PURCH_NO C 20 X Customer purchase order number
PURCHASE_ORDER_NUMBER BAPIORDERS-PURCH_NO_C C 35 X Customer Purchase Order Number
SALES_ORGANIZATION BAPIORDERS-SALES_ORG C 4 Sales organization
TRANSACTION_GROUP BAPIFLAG-BAPIFLAG C 1 0 X Single-Character Indicator

Parameter Reference Type Length Text
RETURN BAPIRETURN u 452 Error Text

Parameter Reference Length Optional Text
SALES_ORDERS BAPIORDERS 457 Table of orders for the customer

Functionality
You can use this method to display the sales orders for a customer.

Notes
Mandatory entries:
You must enter the relevant customer number in the SALESDOCUMENTparameter and the requested sales organization in theSALES_ORGANIZATION parameter.
Optional entries:
You can restrict the selection by entering certain criteria. Forexample you can display all the orders for a certain material or ordersfrom a particular time period (MATERIAL or DOCUMENT_DATE andDOCUMENT_DATE TO paramters). You can also find a certain sales orderusing the customer's purchase order number (PURCHASE_ORDER parameter).

Description
Error message

Description
This structure returns the return code of the function module.
Structure
TYPE Message type: S Success, E Error, W Warning, IInformation
CODE Message code
MESSAGE Message text
LOG_NO Application log: log number
LOG_MSG_NO Application log: sequential number of message

Value range
If no errors occure, return parameter is blank. Otherwise the relevanterror messages are issued with a short text.

Description
A key that uniquely identifies the customer within the SAP system.

Description
From customer order date (contract date)

Definition
Starting date for the time period for which you want to create a listof sales documents.

Use
The system checks the date that you have entered against the documentdate of the sales documents.

Description
To sales order date (contract date)

Definition
End date of period, for which you want to create a list of salesdocuments.

Use
The system checks the date that you have entered against the documentdate in the sales documents.

Description
Alphanumeric key that uniquely identifies the material.

Description
Parameter for long material numbers
You can use this parameter to transfer long material numbers that have amaximum length of 40 characters.
To use this parameter, you must switch on the switch for the businessfunction LAMA (long material number) in the system.
The business function LAMA is a component of the business function setfor DIMP.

Value range
None

Default
None

Description
Customer purchase order number

Definition
The customer uses this customer as a unique identification of theirpurchasing document (for example, inquiries or purchase orders).

Use
The number is a link between the customer's purchase order and thesales document that you have created. You can use the customer numberin your correspondance with the customer to find certain documentinformation. If the number refers to a purchase order, you can alsoprint it on the documents that you send to the customer (for example,on the delivery note).

Description
Organizational unit responsible for the sales and distribution ofcertain products and services. The responsibility of the salesorganization can also include the legal liability for the product andthe customer's right to compensation.

Description
The transaction group controls which sales document types you cancontrol with which system transactions during sales processing.

Value range
0,,Sales order
1,,Customer inquiry
2,,Quotation
3,,Scheduling agreement
4,,Contract
5,,Item proposal
6,,Delivery
7,,Billing document

Default
0 sales orders

Description
Table of customer sales orders
You can find more information about the individual paramter fields inthe relevant data element documentation in the ABAP Dictionary.

495964Check incorrect date in the BAPI
390976Address data is no longer issued