ERPIMPDEL/TR - SAP Import TRADE Processes



Jump to

What is ERPIMPTR (run mode 3)
This is the Sales Contract Import process for Refineries from SAP to ITAS. This process will be activated manually by the user and the contents of the shared SAP/ITAS folder (S01 parameters specify the path) will be processed. The files will be named with an extension of .SI6 and on completion of successful processing of import the files will be renamed with extension of .SI7 and passed to sub directory /old.
Each successfully validated row will be imported in ITAS using a TRADE template (S01/Physicals/Main/page 4 nominated reference). The data contents of each validated row will create a new TRADE, with automated ITAS contract numbering. A message for each successful completion will be placed in the MLP and the standard overnight OPRINT will secure a permanent copy of MLP.  The log produced by the import process is always secured in OPRINT.
The layout of the records is fixed columns as per:-
1-10      SAP contract reference  e.g. 0040018097; secured in TRADE/Misc/Other Ref
11-25    Quantity with leading –ve sign and max 3 decimal places. The weight code e.g. LBS is assigned from the TRADE template.
26-40    Price, expressed with max 3 decimal places. The price code e.g. CPB is assigned from the TRADE template.
41-46    Valuation period e.g. YYYYMM. Will be validated with Dept/Style i.e. EXP look for NY11 else NY16  This entry is used to generate an appropriate Delivery period , basis year quarter
47-54    Contract date e.g. YYYYMMDD
55-57    Department/style e.g. DOM, EXP.   If Dept = EXP or 800 then Valuation Market = ‘NY11’ else will apply ‘NY16’
58         OPTIONAL - Market Type . If = ‘D’ (domestic) then output currency = ‘EUR’. If = ‘E’ (export) then output currency = ‘USD’. Leave blank to use the TRADE template currency code.
59-73    OPTIONAL - CIF price, expressed with max 3 decimal places. The price code e.g. CPB is assigned in the TRADE template. This value will populate the TRADE, if there is a Cost Type named as ‘CIF’ in the Cost Grid.
74-77    OPTIONAL - ZRAW
78-97    OPTIONAL - Reject reason, not imported to ITAS
98         MANDATORY Type, A =create, B=amend, C= close/cancel, D = create/add tranche record to existing SAP imported trade, R = re-open closed trade records
99-110  MANDATORY User Name, ITAS translates using CMP username to locate Initials for import to TRADE
111-118 OPTIONAL - Date, e.g. YYYYMMDD, imported as Quote date
119-124 OPTIONAL - Time e.g. HHMMSS, imported as Quote time HH:MM
125-134 OPTIONAL - Status , not imported to ITAS
135-142 OPTIONAL - Unique Ref, not imported to ITAS
143-177 OPTIONAL - RSI Reject reason, not imported to ITAS
178-183 MANDATORY when Amendment record. Not required when Create or Cancel. Must link the Valuation period of the original record i.e. YYYYMM
186-221 OPTIONAL, SAP counter party name. to be imported into TRADE client reference.
225-227  Optional, currency code. This will replace the code on TRADE template and the D/E coding from Market Type (col 58)

The S01 TRADE Import parameters need to be setup before can execute the Import. The mandatory Import fields are TakeonRef = SAP Ref, Cliref =Customer Name, Quote expiry date, Quote expiry time, Contract Price,  traders Initials.
A close/cancel request, i.e. Type=C needs the SAP Reference and the Valuation period (41-46) columns completed. The quantity can be maintained to cancel in part. The process will check that the TRADE record is unallocated and will move the tonnage from its TRADE record to a Write-off split record.
An amendment request, i.e. Type=B needs the SAP Reference and 178-183 columns completed whereby any of the other columns can be maintained for changes to ITAS record. The process will check that there is only 1 record with that reference and it is Open status and is not marked as Invoiced.  When the amendment field is the weight, the following process occurs; ITAS open quantity needs to be adjusted by the difference in ITAS ordered quantity and the revised Ordered quantity.  ERPIMPTR will verify that there sufficient Open quantity to action the request.  #####  5apr12 ####
An additional import/create, i.e. Type = D will action the same as type=A but will check that existing SAP reference exists and will create a new tranche (if sufficient tranche code available)   .
The alternative layout can also be used for companies setup where ctrl50_loadstyle <> ‘R’:
1-10       SAP contract reference  e.g. 0040018097; secured in TRADE/Misc/Other Ref
11-25     Quantity with zero decimal places as kilos
26-40    Price, expressed in TRADE UOM
41-46    Blank/spaces
47-54    Contract date e.g. YYYYMMDD. This will be used with the TRADE template to create a TRADE record with reference DDMMYY.nnn e.g. 011211 (1st December 2011)
55-63     Delivery Period in YYMMDD format, where DD can =  32 to represent a period
64-97    Blank/spaces
98         Type, A =create, B=amend, C= close/cancel, R = re-open closed trade records
99-110  User Name, ITAS translates using CMP username to locate Initials for import to TRADE
111-185 Blank/spaces
186-221 SAP counter party name. to be translated/imported into TRADE counterparty and imported as sap identity into TRADE counterparty reference
222-224  SAP Row reference, this is used with SAP contract Reference (1-10) to build a different TRADE x ‘Other Reference’  i.e. a 13 character string
225-227  Optional, currency code. This will replace the code on TRADE template

What is ERPIMPDEL

(run mode 4)
This is the Sales Deliveries Import process which will be activated manually by the user and the contents of the shared SAP/ITAS folder (S01 parameters specify the path) will be processed. The files will be named with an extension of .SI4 and on completion of successful processing of import the files will be renamed with extension of .SI5 and passed to sub directory /old
Each successfully validated row will be imported in ITAS applying these delivery details with the associated TRADE record and create sub records numbered with successive sufficies e.g. S00001.001, S00001.002. A message for each successful completion will be placed in the MLP and the standard overnight OPRINT will secure a permanent copy of MLP. The log produced by the import process is always secured in OPRINT.
The delivered sub record is allocated and assigned to the stock WIP account that is nominated in S01/View/Stocks/page1{ctrl50_transbucket} in conjunction with the WIP extension that is maintained in import record position 34-36 e.g. DOM.
The layout of the records is fixed columns as per:-
1-10      SAP contract ref, will be used to locate TRADE with Other Reference setup correspondingly
11-25    Quantity of delivery, -ve sign for a Return tonnage. Denomination is assumed to be the same as the TRADE. If there is insufficient quantity remaining on the TRADE, a message will be logged AND the process will create the requested calloff.  The open TRADE quantity is reduced to ZERO. The TRADE Contracted Quantity will show over delivery as will the total delivered weight (phys01_finalwt).
26-33    Delivery date, YYYYMMDD, imported into TRADE, shipping status date
34-36    Inventory position e.g. DOM, EXP.  If left blank the inventory position WHT.000 (e.g. S01 nomination as above) will be applied else will apply the content of this field as a suffix to the stem part of the S01 nomination e.g. S01 = WHT.000 and this field = EXP so apply against Inventory a/c WHT.EXP
37-43    Delivery Price, optional. Will apply any non zero NUMERIC value on the delivery record else will use Sale TRADE price. See note ‘Delivery Price’ below for alternate settings
44-46    Tolling Inventory position, optional. In a tolling situation this code will represent from where the Stock is being transferred, in order to satisfy the Tolling situation e.g. HED (Hershey Domestic), HEE (Hershey export). See  Note2 below for more detail
47- 56     Optional, Memo which is added to calloff TRADE in external Memo field
57-60    Optional Location code (terminal/depot), will update calloff TRADE and the accounting records.
61-63    Optional, SAP row number nnn format to assist location of relevant TRADE record

Accounting for Deliveries
Each completed delivery creates a movement of STOCK tons and value from Stock (via an IT document) to the relevant PLR account.
Standard Postings:
If a transit WIP account exists and SAP Delivery Postings (ctrl10_sapdelposting) is activated, a journal (IT or JL) is generated with the following legs:
Debit counterparty with sale proceeds
Credit the DEPT x nominal ledger sales account (cmy102_assales) with the sale proceeds.
If ctrl10_sapdelposting = 4 then also post 2 extra legs as:
Credit the transit WIP account with the stock value e.g. WHT.DOM (follows dept entered in delivery instruction i.e. 44-46)
Debit the DEPT x COS account (cmy102_ascos) with the stock value
If the contract is 3rd Party Sale, then only generate legs 3 and 4; if the delivery is a toll order we post to the toll WIP account instead of the client.
If there any Sale x CIF Costs:
Debit the Counter Party with the value of the CIF Costs
Credit the CIF x WIP P&L account with the value of the CIF costs.
Credit the CIF x WIP account with the value of the CIF stock (pro-rata from the WIP account)
Debit the CIF x WIP P&L account with the value of the CIF stock.
Note1: Returned delivered weight will locate the latest delivery date records and amend accordingly i.e. LIFO
Note2: Delivery Price. If 37-43 has content = ‘FCC’, this condition represents Sale has been delivered by FCC and Refinery stocks do not need adjusting. If 37-43 has content = ‘PRICE’, this condition represents a FCC Sale has been delivered by the Refinery and the subject of the delivery is a FCC x Spot Sale TRADE (standard linkage is the SAP contract reference). This process will generate a spot price calloff/delivery record using  TPRICE for NY16 nearest prompt month

Tolling Deliveries
Style 1  where a 3rd party (e.g. Hershey) negotiate the Purchase of RAW with ANO and assign that tonnage to the Refinery for the tolling operation. 
Setup ITAS x 3rd party Purchase and 3rd party sale which are invoiced via ITAS invoicing processes. Inventory management will intake the 3rd party RAW purchase and designate the owner accordingly.
Style 2 where a 3rd party (e.g. Hershey) negotiate with the Refinery and buy Refinery RAW inventory for tolling.
a) Setup a standard Sale via TRADE
b) assign the Sale TRADE to a specific 3rd Party Inventory unit e.g. WHT.HED using WIP/contracts/assign
c) Invoice via SINV whereby debit AR and credit the 3rd Party Inventory a/c [EXP = SALE]
e) Deliveries are entered via ERPIMPDEL which will debit WHT.HED [expense = SALE] and credit the Refinery Inventory a/c [EXP = STOCKO]. The relevant Sale contract is located on a FIFO basis i.e. when the Sale TRADE was assigned to the Inventory (step b)

ERPIMPDEL Troubleshooting
Error Messages
·         Invalid contract price ‘[price] ' for [SAP Reference]:  Non-numeric contract price found on file. Check the price is valid
·         Invalid delivery date '[date] ' for [SAP Reference]: Delivery date is not in the format YYYYMMDD.
·         Unable to find contract matching ‘[SAP Reference]’: There is no header (“000”) contract in ITAS with a matching take-on reference.
·         Multiple contracts found matching ‘[SAP Reference]’: There are more than one header (“000”) contracts in ITAS with a matching take-on reference.
·         Invalid Location ‘[Terminal’]. There is no terminal in ITAS matching the one on the import file.
·         No splits found for delivery matching ref '[SAP Reference] ' that are open, unallocated, uninvoiced and not assigned to a WIP: No match has been found in ITAS. As well as the criteria in the message, ITAS also checks splits are not written off and there is a contracted quantity on the contract.
·         Insufficient delivered quantity to satisfy reversal: To be eligible for reversals, splits must match on take-on reference, be allocated, have a WIP account, be open, be delivered, be invoiced, and have quantity. If price is present in the import file, they must also match on price within a tolerance of 1.  If the delivery is for an FCC sale, the contract must be spot. If the reversal is a toll order, the contract must also have Toll Order set up as its invoice type.
·         No splits found for delivery assigned to '[WIP]' that are open, unallocated and uninvoiced: For a toll order, splits need to be open sales, unallocated, uninvoiced, assigned to the relevant WIP and have quantity.
·         Not enough splits found for delivery assigned to '[WIP]'. [Quantity] required to delivery, but only [quantity found] available:  For a toll order, the quantity found is not enough to fulfil the delivery. Contracts are located using the criteria above.
·         No splits found for delivery matching ref '[SAP Reference] ' that are open, unallocated, uninvoiced, not assigned to a WIP, spot, with zero quantity and price and price code of '[Price Code] ': For an FCC Sale, contracts must match the specified criteria
·         CIF WIP Account CIF.[Dept] is missing:  There is no WIP account set up for the contract’s department.
Other Issues
·         Why have IT documents been generated with zero value postings for sales proceeds? Check that the contract is priced or fully fixed as the posting value is derived from the contract price so will not calculate for price-fixing contracts.
An alternative layout can also be used for non-ASR companies:
1-10      SAP contract ref, will be used to locate TRADE with Other Reference setup correspondingly
11-25    Quantity of delivery in kilos with zero decimal places. A negative sign indicates a return. If there is insufficient quantity remaining on the TRADE, a message will be logged and the process will create the requested call-off.  The open TRADE quantity is reduced to zero.
26-33    Delivery date, YYYYMMDD, imported into TRADE, shipping status date
34-36    Inventory position e.g. DOM, EXP.  If left blank the inventory position WHT.000 (e.g. S01 nomination as above) will be applied else will apply the content of this field as a suffix to the stem part of the S01 nomination e.g. S01 = WHT.000 and this field = EXP so apply against Inventory a/c WHT.EXP
57-60    Location code (terminal/depot), used to determine the WIP account

What is ERPEXPIS
The purpose of this export is to provide information to SAP of all invoices produced in ITAS for industrial-oriented trades. ITAS sends all invoices created in PINV and SINV that are either Provisional or 100% Commercial, so no final or customs invoices are sent.  Therefore, we read information from the phys01, assuming that there will only be a single invoice to process.
The process is activated by users, as frequently as required. The export file is placed in the common SAP folder.
The export file is named yyyymmdd_hhmmss.SIA, and is placed in the standard ITAS SAP folder. The file has the following fixed layout:
1-10        ITAS contract reference
11-25      Quantity in kilos, no decimal places
26-40      Price expressed in PMT
47-54      Document date in format YYYYMMDD
99-110    Trader user name
135-143   ITAS invoice number
186-221   SAP customer/client account translated using CLI C2C code
222-224   Currency code
225-227  Commodity Code part 1
228-233 Commodity Code part 2
234-238 Commodity Code part 3
239-242 Pack code
243-250 Mill A/c (no .P) [TRADE delivery account]
251-280 Vessel
281-300 Journey No.
301-320 BL ref (1st 20 characters)
321-328 BL date YYYYMMDD
329-337 CounterParty account (no .P)
338-346 CounterParty Invoice ref  ( 1Q12 – not currently available)
347-354 Shipping line account (no .P)
355-362 Port Destination Code
363-370 Contract Terms code
371-378 Contract Terms Port code

Stock Movement Import (ERPIMPMOV)
This is a manual process activated by users whenever SAP files are placed in the nominated SAP folder. The file naming convention is unique.SI8, where unique is the name given by SAP to identify the particular file. Once the file has been processed by ITAS, it will be moved to the “Old” sub-folder and renamed with the SI9 extension. The file has the following layout:
1-4        Location of stock origin (from) - terminal code
11-25    Quantity in kilos, no decimal places
26-33    Movement date in YYYYMMDD format.
34-36    Type of inventory, i.e. IMP or NAC. This is used as the WIP account extension
57-60    Location of stock destination – terminal code


Was this helpful?
Thanks for your feedback