SD
BAPI
RFC
Used the same way in S/4HANA
BAPI_CUSTOMERINQUIRY_CHANGE Change Customer Inquiry
Changes an existing customer inquiry, like VA12, including items, schedule lines, partners and conditions. Developers use it to keep inquiries in sync with an external CRM. INQUIRY_HEADER_INX is mandatory; set UPDATEFLAG and the X flags, then call BAPI_TRANSACTION_COMMIT afterwards only when RETURN contains no message of type E or A.
- Function group
- 2030
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| SALESDOCUMENT | BAPIVBELN-VBELN | Sales document number | Yes |
| INQUIRY_HEADER_IN | BAPISDH1 | Inquiry header data | — |
| INQUIRY_HEADER_INX | BAPISDH1X | Inquiry header change flags (X structure) | Yes |
| SIMULATION | BAPIFLAG-BAPIFLAG | Simulation mode (no update) | — |
| BEHAVE_WHEN_ERROR | BAPIFLAG-BAPIFLAG | Error handling behavior | — |
| LOGIC_SWITCH | BAPISDLS | SD logic switch (pricing, ATP control) | — |
| NO_STATUS_BUF_INIT | BAPIFLAG-BAPIFLAG | Do not refresh status buffer | — |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| RETURN | BAPIRET2 | Return messages | Yes |
| INQUIRY_ITEM_IN | BAPISDITM | Inquiry item data | — |
| INQUIRY_ITEM_INX | BAPISDITMX | Inquiry item change flags (X structure) | — |
| PARTNERS | BAPIPARNR | Document partners | — |
| PARTNERCHANGES | BAPIPARNRC | Partner changes | — |
| PARTNERADDRESSES | BAPIADDR1 | Partner addresses | — |
| SCHEDULE_LINES | BAPISCHDL | Schedule lines | — |
| SCHEDULE_LINESX | BAPISCHDLX | Schedule line change flags (X structure) | — |
| CONDITIONS_IN | BAPICOND | Pricing conditions | — |
| CONDITIONS_INX | BAPICONDX | Condition change flags (X structure) | — |
| INQUIRY_TEXT | BAPISDTEXT | Texts | — |
| INQUIRY_KEYS | BAPISDKEY | Reference keys of created objects | — |
| EXTENSIONIN | BAPIPAREX | Customer enhancement fields (EXTENSIONIN) | — |
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'BAPI_CUSTOMERINQUIRY_CHANGE'
EXPORTING
salesdocument = lv_salesdocument
inquiry_header_inx = lv_inquiry_header_inx
TABLES
return = lt_return
inquiry_item_in = lt_inquiry_item_in
inquiry_item_inx = lt_inquiry_item_inx
partners = lt_partners
partnerchanges = lt_partnerchanges
partneraddresses = lt_partneraddresses
schedule_lines = lt_schedule_lines
schedule_linesx = lt_schedule_linesx
conditions_in = lt_conditions_in
conditions_inx = lt_conditions_inx.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.