SD BAPI RFC Used the same way in S/4HANA

BAPI_INQUIRY_CREATEFROMDATA2 Create Customer Inquiry

Creates a customer inquiry from header, item, partner and schedule line data, like VA11. It is used when requests from portals or e-mail tools are recorded in SD before a quotation is made. Fill the X structures, check RETURN and 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

ParameterTypeDescriptionRequired
SALESDOCUMENTINBAPIVBELN-VBELNExternal sales document number—
INQUIRY_HEADER_INBAPISDHD1Inquiry header dataYes
INQUIRY_HEADER_INXBAPISDHD1XInquiry header change flags (X structure)—
SENDERBAPI_SENDERLogical sender system (ALE)—
BEHAVE_WHEN_ERRORBAPIFLAG-BAPIFLAGError handling behavior—
TESTRUNBAPIFLAG-BAPIFLAGTest run (no update)—
CONVERTBAPIFLAG-BAPIFLAGConvert partner roles and document types to internal format—
LOGIC_SWITCHBAPISDLSSD logic switch (pricing, ATP control)—

Exporting parameters

ParameterTypeDescription
SALESDOCUMENTBAPIVBELN-VBELNInquiry number created

Tables parameters

ParameterTypeDescriptionRequired
RETURNBAPIRET2Return messages—
INQUIRY_ITEMS_INBAPISDITMInquiry item data—
INQUIRY_ITEMS_INXBAPISDITMXInquiry item change flags (X structure)—
INQUIRY_PARTNERSBAPIPARNRInquiry partnersYes
INQUIRY_SCHEDULES_INBAPISCHDLSchedule lines—
INQUIRY_SCHEDULES_INXBAPISCHDLXSchedule line change flags (X structure)—
INQUIRY_CONDITIONS_INBAPICONDPricing conditions—
INQUIRY_CONDITIONS_INXBAPICONDXCondition change flags (X structure)—
INQUIRY_TEXTBAPISDTEXTTexts—
INQUIRY_KEYSBAPISDKEYReference keys of created objects—
PARTNERADDRESSESBAPIADDR1Partner addresses—
EXTENSIONINBAPIPAREXCustomer 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_INQUIRY_CREATEFROMDATA2'
  EXPORTING
    inquiry_header_in = lv_inquiry_header_in
  IMPORTING
    salesdocument = lv_salesdocument
  TABLES
    return = lt_return
    inquiry_items_in = lt_inquiry_items_in
    inquiry_items_inx = lt_inquiry_items_inx
    inquiry_partners = lt_inquiry_partners
    inquiry_schedules_in = lt_inquiry_schedules_in
    inquiry_schedules_inx = lt_inquiry_schedules_inx
    inquiry_conditions_in = lt_inquiry_conditions_in
    inquiry_conditions_inx = lt_inquiry_conditions_inx
    inquiry_text = lt_inquiry_text
    inquiry_keys = lt_inquiry_keys.

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.

Request a custom report