Functionality You use this method to create exchange agreements (Exchange AgreementHeader). You must provide at least the exchange type and the exchange partner asinput parameters. The system defaults the remaining attributes for the exchange headerfrom Customizing based on the exchange type: see Customizing forIndustry Solution Oil & Gas (Downstream)> under EXG(Exchanges)> -> Transactions> -> Define exchange types>. You can use import parameter EXCHANGE_HEADER_IN to override individualdefaults. Once the exchange agreement has been created successfully, exportparameter EXCHANGE_NUMBER provides the document number. ParameterEXCHANGE_HEADER_OUT provides details about the agreement header. TheRETURN parameter shows any messages that occur. This BAPI provides a business add-in (BAdI) interface for processingcustomer-specific enhancements. Within the BAdI definition'OIA_EXGAGRMNT', the interface 'IF_EX_OIA_EXGAGRMNT' defines twomethods: CREATE_PREPROCESSING,,,,Inbound Processing of Exchange Agreement Data CREATE_POSTPROCESSING,,,,Outbound Processing of Exchange Agreement DataNotes The IS-Oil authorization object 'Exchange Header' (technical name'O_OIA_EXG') is checked when the BAPI is processed. The SAP user thatcalls the BAPI requires appropriate authorizations for exchange type,company code of the exchange partner, and activity type ('create' or'maintain'). For more information, see the documentation for theauthorization object. The BAPI does not issue a database commit. You can use BAPI'BAPI_TRANSACTION_COMMIT' to cause the database to actually carry out aninsert operation. Description In this structure, all attributes of the exchange agreement are returnedto the caller when the document is successfully created. The following fields are available in addition to all import parameters: EXCHANGE_STATUS,,Status of the exchange agreement ,,O - open ,,C - closed ,,A - to be archived CREATED_ON,,UTC time stamp in short form (YYYYMMDDhhmmss) CREATED_BY,,Name of SAP user who created the agreement. CHANGED_ON,,initial with CREATE - method CHANGED_BY,,initial with CREATE - method Description In this parameter, the document number under which the exchangeagreement has been created in the SAP system is passed back to thecaller. Description For all attributes of the exchange agreement, the system uses theexchange type to determine the defaults. You can use this parameter tooverride any defaults. The parameter is optional. The structure of the parameters is as follows: EVERGREEN_TYPE,,Evergreen type of the agreement START_ON,,Starting date of the exchange agreement CLOSE_ON,,Closing date of the exchange agreement REVIEW_ON,,Review date of the exchange agreement NOTICE_PERIOD,,Notice period for exchange agreement PRODUCT_POSTING_RULE,,Posting rule for product FEE_POSTING_RULE,,Posting rule for fees TAX_POSTING_RULE,,Posting rule for taxes IS_NETTING_ACTIVE,,Netting indicator IS_FEE_REQUIRED,,Fee check indicator IS_VAT_ON_PRODUCT,,VAT on internally-posted material NETTING_CYCLE,,Netting cycle (FI blocking indicator) QTY_SCHEDULE_BRKDWN_PERIOD,,Breakdown ind. for scheduling oncontract/call-off level QTY_SCHEDULE_SPLIT_INDICAT,,How to split qty in quantity schedule SUB_BASE_PRODUCT_RELEVANCE,,Sub product/ base product relevenceindicator SUB_BASE_PRODUCT_CHECK,,Sub/base product user exit routine BASE_LOCATION,,Base location for exchange agreement Value range EVERGREEN_TYPE,,N - None, R - Regular, U - Unlimited START_ON,,valid date in format YYYYMMDD CLOSE_ON,,valid date in format YYYYMMDD REVIEW_ON,,valid date in format YYYYMMDD NOTICE_PERIOD,,Numeric character string PRODUCT_POSTING_RULE,,I - internal posting, E - external posting FEE_POSTING_RULE,,I - internal posting, E - external posting TAX_POSTING_RULE,,I - internal posting, E - external posting IS_NETTING_ACTIVE,,Y - netting active, N - netting not active IS_FEE_REQUIRED,,Y - exchange fees applicable, N - no exchange feesapplicable IS_VAT_ON_PRODUCT,,Y - VAT calculation, N - no VAT calculation NETTING_CYCLE,,validated against ERP table T008 QTY_SCHEDULE_BRKDWN_PERIOD,,validated against IS-Oil ERP table TOIA3 QTY_SCHEDULE_SPLIT_INDICAT,,N - No split / no QS / unlimited delivery ,,1 - Split quantity according to calendar days per period ,,2 - Split quantity equally according to periods ,,3 - Assign whole quantity to every period SUB_BASE_PRODUCT_RELEVANCE,,EXG user-exit number for determination ofbase product price SUB_BASE_PRODUCT_CHECK,,EXG user-exit number to validate assignments ofbase products to sub-products BASE_LOCATION,,Any character string Description This parameter is for entering the exchange partner for the exchangeagreement. The system verifies whether the partner has been established as anexchange partner. This parameter is mandatory. Description The exchange type defines the default parameters for an exchangeagreement, e.g. the type of contract ( borrow/loan, buy/sell,evergreen, ...) as well as rules for FI postings with regards toproduct costs and fees, indicators to control the breakdown of quantityschedules or the number range that is assigned to this type. The exchange type is a mandatory parameter. Description Alphanumeric key uniquely identifying an exchange agreement. For exchange types which allow an external number range, this parameterhas to be passed to the BAPI. It will be used as the document number.For exchange types with internal number ranges the parameter has to beinitial. Description This parameter can be used to pass any alphanumeric string to theexchange agreement to hold a reference code for the exchange partner(e.g. the corresponding exchange number in the partner's ERP system). The parameter is optional. Description Text table Via this table a longtext can be added to the exchange agreement. A table row is made up of the following components: LANGU,,,,SAP language key LANGU_ISO,,Language according to ISO 639 FORMAT_COL,,Two character SAPscript formatting option TEXT_LINE,,,,Text line to hold the text If no language is specified, the text will be stored using the currentlogon language. Description This parameter can be used to transfer user-specific enhancements tothe BAPI. The customer has to complete the EXTENSIONIN structure andthe system automatically continues processing it. The following table extension is available to pass customer-addedfields to the exchange agreement database table OIA01: Table extension name: BAPI_TE_OIA01 If no user-specific fields or no additional database tables have beendefined by the customer for exchange agreements, the EXTENSIONINparameter can be omitted. A table row is made up of the following components: STRUCTURE,,Structure name of BAPI table extension (e.g. BAPI_TE_OIA01) VALUEPART1,,Data part of BAPI extension parameter VALUEPART2,,Data part of BAPI extension parameter VALUEPART3,,Data part of BAPI extension parameter VALUEPART4,,Data part of BAPI extension parameter Description This parameter is reserved for customer enhancements to the functionmodule. It is currently not being used. Description Message table Via this table messages are returned to the caller providinginformation on the success or failure of the BAPI processing. A table row is made up of the following components: TYPE ,,,,Message type: S Success, E Error, W Warning, I Information ID ,,,,,,Message ID NUMBER ,,,,Message number MESSAGE ,,,,Message text LOG_NO ,,,,Application log: Log number LOG_MSG_NO ,,Application log: Sequential number of message MESSAGE_V1 ,,Message variable MESSAGE_V2 ,,Message variable MESSAGE_V3 ,,Message variable MESSAGE_V4 ,,Message variable PARAMETER ,,Parameter name ROW ,,,,,,Line in parameter FIELD ,,,,Field in parameter SYSTEM,,,,System (logical system) where the message came from |