Fonction SAP BAPI_SAG_GETDETAIL - Read Out Details from Scheduling Agreement

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ACCOUNT_DATA BAPIFLAG-BAPIFLAG C 1 SPACE X Account Assignment Data
CONDITION_DATA BAPIFLAG-BAPIFLAG C 1 SPACE X Conditions
EXPORT_DATA BAPIFLAG-BAPIFLAG C 1 SPACE X Export/Import Data
ITEM_DATA BAPIFLAG-BAPIFLAG C 1 'X' X Item Data
PARTNER_DATA BAPIFLAG-BAPIFLAG C 1 SPACE X Partner Data
PURCHASINGDOCUMENT BAPIMEOUTHEADER-NUMBER C 10 Purchasing Document Number
SCHEDULE_DATA BAPIFLAG-BAPIFLAG C 1 SPACE X Schedule Line Data
SC_COMPONENT_DATA BAPIFLAG-BAPIFLAG C 1 SPACE X Subcontracting Components
SHIPPING_DATA BAPIFLAG-BAPIFLAG C 1 SPACE X Shipping Data
TEXT_DATA BAPIFLAG-BAPIFLAG C 1 SPACE X Long Texts

Paramètre Reférence Type Long. Description
HEADER BAPIMEOUTHEADER u 347 Header Data Outline Agreement
HEAD_EXPORT_IMPORT BAPIMEOUTEIKP u 17 Foreign Trade Data Header - Outline Agreement

Paramètre Reférence Long. Facultatif Description
ACCOUNT BAPIMEOUTACCOUNT 420 X Account Assignment Data - Outline Agreement
DELIVERY_ADDRESS BAPIMEOUTADDRDELIVERY 1301 X PO Item: Address Structure BAPIADDR1 for Inbound Delivery
EXPORT_IMPORT BAPIMEOUTEIPO 45 X Foreign Trade Data - Outline Agreement
EXTENSIONOUT BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
HEADER_TEXT BAPIMEOUTTEXT 139 X Header Text - Outline Agreement
HEAD_CONDITION BAPIMEOUTHEADERCOND 101 X Master Conditions in Outline Agreement (Header)
HEAD_COND_SCALE_QUAN BAPIMEOUTSCALE 39 X Quantity Scale
HEAD_COND_SCALE_VAL BAPIMEOUTSCALEVALUE 46 X Value Scale
HEAD_COND_VALIDITY BAPIMEOUTHEADVALIDITY 26 X Validity Periods of Header Conditions
ITEM BAPIMEOUTITEM 1000 X Item Data of Contract
ITEM_CONDITION BAPIMEOUTCONDITION 106 X Master Conditions in Outline Agreement
ITEM_COND_SCALE_QUAN BAPIMEOUTITEMSCALEQUAN 44 X Quantity Scale
ITEM_COND_SCALE_VALUE BAPIMEOUTITEMSCALEVAL 51 X Value Scale
ITEM_COND_VALIDITY BAPIMEOUTVALIDITY 35 X Validity Periods of Conditions
ITEM_TEXT BAPIMEOUTITEMTEXT 144 X Text Data - Outline Agreement
PARTNER BAPIMEOUTPARTNER 41 X Partner Information for Outline Agreement
RETURN BAPIRET2 548 X Return Parameter(s)
SCHEDULE BAPIMEOUTSCHEDULE 132 X Delivery Schedule Line Data Outline Agreement
SC_COMPONENT BAPIMEOUTCOMPONENT 170 X Subcontracting Components
SHIPPING BAPIMEPOSHIPPEXP 196 X Shipping Data

Functionality
BAPI to read out details from a scheduling agreement.

Example
Sample Code

Further information
The following authorization objects are checked when the function moduleis invoked with activity 03:

  • M_RAHM_BSA Document type of scheduling agreement

  • M_RAHM_EKO Purchasing organization in scheduling
  • agreement
    • M_RAHM_EKG Purchasing group in scheduling agreement

    • M_RAHM_WRK Plant in scheduling agreement

    • The following Business Add-Ins, which can beimplemented multiple times, are available:
      • MEOUT_BAPI_CUST for customer implementations

      • MEOUT_BAPI_IBS for internal SAP implementations
      • Description
        The parameter contains the field information of the scheduling agreementheader.

        Description
        If a vendor located in a foreign country is specified in the schedulingagreement, the parameter returns the information on the foreign tradedata.

        Value range
        In SAP ECC 6.0, only three fields are supported.

        Description
        Output of account assignment data.

        Value range
        The parameter can have the following instances:

        • 'X' means that the account assignment data for all items is read out.

        • ' ' means that the account assignment data is not passed on to the
        • invoker.

          Default
          In the standard system, the parameter is inactive.

          Description
          Output of the conditions is desired.

          Value range
          The parameter can have the following instances:

          • 'X' means that the conditions for all items are read out.

          • ' ' means that the conditions are not passed on to the invoker.
          • Default
            In the standard system, the parameter is inactive.

            Description
            Output of the foreign trade data is desired.

            Value range
            The parameter can have the following instances:

            • 'X' means that the foreign trade data for all items is read out.

            • ' ' means that the foreign trade data is not passed on to the invoker.
            • Default
              In the standard system, the parameter is inactive.

              Description
              Output of the item data is desired.

              Default
              In the standard system, output of the item data is active.

              Description
              Output of partner data is desired.

              Value range
              The parameter can have the following instances:

              • 'X' means that the partner data is read out.

              • ' ' means that the partner data is not passed on to the invoker.
              • Default
                In the standard system, the parameter is inactive.

                Description
                Uniquely describes the document number of the scheduling agreement.

                Description
                Output of the delivery scheduling data is desired.

                Value range
                The parameter can have the following instances:

                • 'X' means that the account assignment data for all items is read out.

                • ' ' means that the account assignment data is not passed on to the
                • invoker.

                  Default
                  In the standard system, the parameter is inactive.

                  Description
                  Output of the subcontracting components is desired.

                  Value range
                  The parameter can have the following instances:

                  • 'X' means that the subcontracting components for all items are read out.

                  • ' ' means that the subcontracting components are not passed on to the
                  • invoker.

                    Default
                    In the standard system, the parameter is inactive.

                    Description
                    Output of the shipping data for stock transport scheduling agreements isdesired.

                    Value range
                    The parameter can have the following instances:

                    • 'X' means that the shipping data for all items is read out.

                    • ' ' means that the shipping data is not passed on to the invoker.
                    • Default
                      In the standard system, the parameter is inactive.

                      Description
                      Output of header and item long texts is desired.

                      Value range
                      The parameter can have the following instances:

                      • 'X' means that the header and item long texts for all items are read
                      • out.
                        • ' ' means that the header and item long texts are not passed on to the
                        • invoker.

                          Default
                          In the standard system, the parameter is inactive.

                          Description
                          The parameter contains the account assignment data sorted according toscheduling agreement items.

                          Description
                          The parameter contains the information on the delivery address specifiedin the associated scheduling agreement item.

                          Description
                          If the item is to be delivered to a foreign country, the parametercontains the foreign trade data.

                          Value range
                          In SAP ECC 6.0, only eight fields are supported.

                          Description
                          With the ExtensionIn and ExtensionOut parameters, youenable customers to enhance the interface of a BAPI without modificationand achieve the automatic processing of customer-specific data.
                          The data is passed on in a table. The format of the individual datarecords of this table is determined by the structure BAPIPAREX. Thiscontains several data record fields (VALUEPART1, VALUEPART2, ...) and afield for the name of an auxiliary structure (STRUCTURE). Because thedata is written piece-wise consecutively into the data record fieldsavailable for the purpose for each data record, an auxiliary structureis needed to interpret the data.
                          In the event that an SAP database table is to be extended by additionalfields, BAPI table extensions are particularly suitable as auxiliarystructures. A BAPI table extension can either be predefined by SAP orcreated by the customer. Examples of auxiliary structures and BAPI tableextensions can be found in the description of the various options forcustomer enhancement, under enhancement of the BAPI based on existingSAP database tables, enhancement of the BAPI through inclusion ofadditional, customers' own database tables, and under enhancement of theBAPI by import data that does not show up at database level.
                          Note that only fields of the data type CHAR and similar data types maybe used in the BAPI parameters ExtensionIn/ExtensionOut.
                          If the customer include contains differing parameters, the configurablemessage ME 887 is processed. The data is not adopted in thetarget structure from the container however.

                          Description
                          The parameter contains the long text of the scheduling agreement header.

                          Description
                          INCLUDE BAPI_CONTRACT_SAG_KOND_KOPF OBJECT DOKU ID TX

                          Description
                          INCLUDE BAPI_CONTRACT_SAG_KOND_KOPF OBJECT DOKU ID TX

                          Description
                          INCLUDE BAPI_CONTRACT_SAG_KOND_KOPF OBJECT DOKU ID TX

                          Description
                          INCLUDE BAPI_CONTRACT_SAG_KOND_KOPF OBJECT DOKU ID TX

                          Description
                          The parameter contains the general item data for a scheduling agreementinstance.

                          Description
                          INCLUDE BAPI_CONTRACT_SAG_KOND_POSI OBJECT DOKU ID TX

                          Description
                          INCLUDE BAPI_CONTRACT_SAG_KOND_POSI OBJECT DOKU ID TX

                          Description
                          INCLUDE BAPI_CONTRACT_SAG_KOND_POSI OBJECT DOKU ID TX

                          Description
                          INCLUDE BAPI_CONTRACT_SAG_KOND_POSI OBJECT DOKU ID TX

                          Description
                          The parameter contains the item long text.

                          Description
                          The parameter contains the partner data specified for this schedulingagreement at header level.

                          Description
                          With this parameter, messages relating to exception situations orsuccess messages are returned to the calling program.
                          Currently an assignment of the messages is possible for the followingstructures/tables only:

                          • Header data HEADER

                          • Item data ITEM

                          • Account assignment data ACCOUNT

                          • Delivery schedule line data SCHEDULE
                          • Description
                            The parameter contains the scheduling agreement delivery schedule linessorted according to items.

                            Description
                            In the case of a subcontracting item, this parameter contains theassigned subcontracting components.

                            Description
                            In the case of a stock transfer item, the parameter contains thespecified shipping data (EKPV).