Fonction SAP BS01_INQUIRY_GETDETAIL - Customer Inquiry: Display Customer Inquiry

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
INTERNAL_USE XFELD C 1 SPACE X Field for which default is intended
SALESDOCUMENT BAPIVBELN-VBELN C 10 Sales and Distribution Document Number

Paramètre Reférence Type Long. Description
INQUIRY_HEADER BAPISDHD u 817 Document Header Data

Paramètre Reférence Long. Facultatif Description
EXTENSIONOUT BAPIPAREX 990 X Customer enhancements for export
INQUIRY_ADDRESS BAPISDCOAD 629 X BAPI Structure of SADRVB with English Field Names
INQUIRY_BUSINESS BAPISDBUSI 672 X Business Data for Document Numbers
INQUIRY_CFGS_CUBLBS BAPICUBLBM 269 X Configuration BLOB for Document Numbers
INQUIRY_CFGS_CUCFGS BAPICUCFGM 410 X Configuration Data for Document Numbers
INQUIRY_CFGS_CUINS BAPICUINSM 246 X Instance Data for Document Numbers
INQUIRY_CFGS_CUPRTS BAPICUPRTM 136 X PartOf Data for Document Numbers
INQUIRY_CFGS_CUREFS BAPICUREFM 33 X Instance in the Configuration for Document Numbers
INQUIRY_CFGS_CUVALS BAPICUVALM 289 X Characteristic Value Assignment for Document Numbers
INQUIRY_CFGS_CUVKS BAPICUVKM 68 X Variant Condition Keys in Configurations
INQUIRY_CONTRACTS BAPISDCNTR 158 X Contract Data for Document Numbers
INQUIRY_FLOWS BAPISDFLOW 328 X Document Flows for Document Numbers
INQUIRY_ITEMS BAPISDITBOS 1784 X Item data output
INQUIRY_PARTNERS BAPISDPART 180 X Partner
INQUIRY_SCHEDULE_LINES BAPISDHEDU 344 X Schedule Lines
INQUIRY_SERVICES BAPISDESLLBOS 648 X Services
INQUIRY_SERVICES_TEXT BAPIESLLTX 158 X Text for Service Line
INQUIRY_STATUSHEADERS BAPISDHDST 97 X Header Status for Document Numbers
INQUIRY_STATUSITEMS BAPISDITST 55 X Item Status for Document Numbers
INQUIRY_TEXTHEADERS BAPISDTEHD 385 X Text Header Information for Document Numbers
INQUIRY_TEXTLINES BAPITEXTLI 232 X Text Lines for Document Numbers
RETURN BAPIRET2 548 Return Messages

Functionality
You can use this function module to read the data for a customerinquiry and return this data to the calling program.
The sales document number must be transferred as import parameter(parameter SALESDOCUMENT). A customer inquiry is identified by thissearch criterion.
The following data for the customer inquiry can be returned:

  • Order header data (via table INQUIRY_HEADER)

    • Sold-to party (export parameter SOLD_TO_PARTY), ship-to party (export
    • parameter SHIP_TO_PARTY) and payer (export parameter PAYING_PARTY)
      • Partner data (via table INQUIRY_PARTNERS)

        • Schedule line data (via table INQUIRY_SCHEDULE_LINES)

          • Item data (via table INQUIRY_ITEMS)

            • If you are delaing with configurable items, the configuration data can
            • transferred from the following tables:
              INQUIRY_CFGS_REF
              INQUIRY_CFGS_INST
              INQUIRY_CFGS_PART_OF
              INQUIRY_CFGS_VALUE
              • Service data for order item (via tables INQUIRY_SERVICES and
              • INQUIRY_SERVICES_TEXT)
                Customer fields tables VBAK, VBAP, VBEP and ESLL can be read usingstructure EXTENSIONOUT.
                Errors which may occur are made known via parameter RETURN.

                Description
                This parameter contains data for the sales document header.
                You can find information on the meaning of the individual parameterfields in the appropriate data element documentation in the ABAPdictionary.

                Description
                The sales document number (parameter SALESDOCUMENT) has to betransferred as import parameter.

                Description
                If you have defined customer fields in tables VBAK, VBAP, VBEP andESLL, you can read the data in these fields using this parameter.

                Further information
                You can find further information in note 143580.

                Description
                This parameter contains item output data for the sales order.

                Description
                This table contains partner data such as sold-to party and ship-toparty.

                Description
                This parameter contains the schedule line data. You can findinformation on the meaning of the individual parameter fields in theappropriate data element documentation in the ABAP dictionary.

                Description
                The table contains the services and service outline layout for theorder.
                You can define a line as an outline line via field OUTL_IND. FeldOUTL_IND.
                Assignment of a service line to to an outline line takes place viafields PCKG_NO (service line) and SUBPCKG_NO (outline line).
                The hierarchy for the outline is represented by fields LINE_NO andHI_LINE_NO. Field HI_LINE_NO links to field LINE_NO of the superioroutline in the hierarchy.
                You can find further information on the meaning of the individualparameter fields in the appropriate data element documentation in theABAP dictionary.

                Description
                The table contains the long text for the service line:

                • In field TEXT_ID the text type LTXT for long text

                • In field TEXT_LINE the actual text lines

                • The package number (PCKG_NO) creates the link to the service line forwhich the text is to be read.

                  Description
                  The return code of the function module is returned in this structure.
                  Structure
                  TYPE Message type: S Success, E Error, W Warning, I Information
                  CODE Message code
                  MESSAGE Message text
                  LOG_NO Application log: log number
                  LOG_MSG_NO Application log: sequence number of message

                  Value range
                  If no error occurs, the return parameter is initial (blank). Otherwise,the appropriate error message with short text is displayed.