You are on page 1of 13

Learn Oracle OTM

Quick notes for Oracle Transportation Management


Consultants(Beginners). Post corrections to learnotm@outlook.com.
Note: Most of these notes are applicable to OTM Versions 6.X unless
specifically mentioned otherwise.

April 15, 2016

OTM Inbound Integrations


There are two main ways of loading data into OTM system via XML files or CSV files.

Most common way of receiving OTM Inbound data is via XML files. OTM can read XML files
which are in the format specified by GlogXML Schema. You can download this schema
from :

Business Process Automation > Integration > Integration Manager > Retrieve Schemas >
GlogXML.xsd

This file will describe the data structure for each OTM element like 'Location', 'Order
Release', 'Shipment', etc along with some documentation.

Say, if we want to upload a new location to OTM, you follow below steps:

1. Read the GlogXML.xsd and identify the XML structure for element "Location". Once you
map your input data values to OTM XML elements, you will end up coming with XML file
similar to one below:
<Transmission>

<TransmissionHeader>

<UserName>DBA.ADMIN</UserName>

<Password>CHANGEME</Password>

<IsProcessInSequence>Y</IsProcessInSequence>

</TransmissionHeader>

<TransmissionBody>

<GLogXMLElement>

<Location>

<TransactionCode>IU</TransactionCode>

<LocationGid>

<Gid>

<DomainName>ABC</DomainName>

<Xid>TEST SH OTM CORPORATION-45769</Xid>

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
</Gid>

</LocationGid>

<LocationName>TEST SH OTM COR,CLUTE,TX,USA</LocationName>

<Address>

<AddressLines>

<SequenceNumber>1</SequenceNumber>

<AddressLine>1039 EAST PLANTATION</AddressLine>

</AddressLines>

<City>CLUTE</City>

<ProvinceCode>TX</ProvinceCode>

<PostalCode>32830</PostalCode>

<CountryCode3Gid>

<Gid>

<Xid>USA</Xid>

</Gid>

</CountryCode3Gid>

</Address>

<LocationRefnum>

<LocationRefnumQualifierGid>

<Gid>

<Xid>ORIGIN</Xid>

</Gid>

</LocationRefnumQualifierGid>

<LocationRefnumValue>CUSTOMER</LocationRefnumValue>

</LocationRefnum>

<LocationRefnum>

<LocationRefnumQualifierGid>

<Gid>

<Xid>CUSID</Xid>

</Gid>

</LocationRefnumQualifierGid>

<LocationRefnumValue>1130</LocationRefnumValue>

</LocationRefnum>

<LocationRefnum>

<LocationRefnumQualifierGid>

<Gid>

<Xid>CUSNM</Xid>

</Gid>

</LocationRefnumQualifierGid>

<LocationRefnumValue>MOORE SUPPLY CO</LocationRefnumValue>

</LocationRefnum>

<LocationRole>

<LocationRoleGid>

<Gid>

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
<Xid>CUSTOMER</Xid>

</Gid>

</LocationRoleGid>

</LocationRole>

<Corporation>

<CorporationName>OTM CORPORATION</CorporationName>

</Corporation>

</Location>

</GLogXMLElement>

</TransmissionBody>

</Transmission>

2. Save this file with extension '.xml'


3. Once you have XML ready, you can upload to OTM as below: Goto Business Process
Automation -> Integration -> Integration Manager -> Upload XML/CSV Transmission and
Browse XML File.
4. Click Upload.

5. You will see following log:

6. Note the transmission number from the log

7. Navigate to Business Process Automation -> Integration -> Transmission Manager

8. Query for transmission and you should see transmission status as ‘PROCESSED’.

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
In case of errors Report button displays error reasons like foreign key reference missing etc.

Any external system like EBS, SAP can frame this XML structure programatically and 'POST' this xml to
OTM Integration servlet: glog.integration.servlet.WMServlet

Below is an PLSQL program posting Location element to OTM:

DECLARE

-- This is OTM Application URL Where string after GC3 is replaced as shown below

v_chr_url VARCHAR2(1000) := 'http://OTM-SERVER:7777/GC3/glog.integration.servlet.WMServlet';

-- This is OTM USER from which transmission needs to be created

v_otm_user VARCHAR2(100) := 'DBA.ADMIN';

-- This is password for the OTM USER

v_otm_pwd VARCHAR2(100) := 'CHANGEME';

-- You can programtically from the xml string and pass it to this variable

v_data_in VARCHAR2 (10000);

v_http_req UTL_HTTP.req;

v_http_resp UTL_HTTP.resp;

v_chr_resp_val VARCHAR2 (3000);

BEGIN

-- This is a sample transmission that creates location(Shipment Management -> --Shipment Management -> Location Manager) in OTM

-- Note that in the Transmission Body, GLOGXMLElement chosen here is Location. By --choosing appropriate element, you can load

required data.

--In this script file, you see XML structure to send location information.

--You can get this structure by referring the GLOGXML.xsd

--Navigation to fetch this from OTM.

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
--1. Login in to OTM using DBA.ADMIN user

--2. Business Process Automation -> Integration -> Integration Manager -> --GlogXML.xsd

v_data_in := '<Transmission>

<TransmissionHeader>

<UserName>DBA.ADMIN</UserName>

<Password>CHANGEME</Password>

<IsProcessInSequence>Y</IsProcessInSequence>

</TransmissionHeader>

<TransmissionBody>

<GLogXMLElement>

<Location>

<TransactionCode>IU</TransactionCode>

<LocationGid>

<Gid>

<DomainName>WHD</DomainName>

<Xid>TEST SH HAJOCA CORPORATION-45769</Xid>

</Gid>

</LocationGid>

<LocationName>TEST SH HAJOCA COR,CLUTE,TX,USA</LocationName>

<Address>

<AddressLines>

<SequenceNumber>1</SequenceNumber>

<AddressLine>449 TEST PLANTATION</AddressLine>

</AddressLines>

<City>CLUTE</City>

<ProvinceCode>TX</ProvinceCode>

<PostalCode>32830</PostalCode>

<CountryCode3Gid>

<Gid>

<Xid>USA</Xid>

</Gid>

</CountryCode3Gid>

</Address>

<LocationRefnum>

<LocationRefnumQualifierGid>

<Gid>

<Xid>ORIGIN</Xid>

</Gid>

</LocationRefnumQualifierGid>

<LocationRefnumValue>CUSTOMER</LocationRefnumValue>

</LocationRefnum>

<LocationRefnum>

<LocationRefnumQualifierGid>

<Gid>

<Xid>CUSID</Xid>

</Gid>

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
</LocationRefnumQualifierGid>

<LocationRefnumValue>1130</LocationRefnumValue>

<LocationRole>

<LocationRoleGid>

<Gid>

<Xid>CUSTOMER</Xid>

</Gid>

</LocationRoleGid>

</LocationRole>

<Corporation>

<CorporationName>TEST CORPORATION</CorporationName>

</Corporation>

</Location>

</GLogXMLElement>

</TransmissionBody>

</Transmission>';

UTL_HTTP.set_transfer_timeout (1000);

UTL_HTTP.set_detailed_excp_support (ENABLE => TRUE);

-- Invoking the Web Service.

v_http_req := UTL_HTTP.begin_request (v_chr_url, 'POST');

-- Set the HTTP request headers

UTL_HTTP.set_header (v_http_req, 'content-type', 'text/html');

UTL_HTTP.set_header (v_http_req, 'content-length', LENGTH (v_data_in));

-- Write the data to the body of the HTTP request

UTL_HTTP.write_text (v_http_req, v_data_in);

--Retrieving response of Transmission ID for OTM

v_http_resp := UTL_HTTP.get_response (v_http_req);

UTL_HTTP.read_text (v_http_resp, v_chr_resp_val, 3000);

UTL_HTTP.end_response (v_http_resp);

END;

Note that if you have multiple integrations to be built from external system to OTM system to load data
coming in different formats like EDI, text files, etc you should typlically go for a middleware tool like Oracle
SOA(BPEL), Webmethods etc to translate these files from various formats to XML format defined by
GlogXML schema.

Second way loading data to OTM is using CSV files. You may follow below steps to load location into OTM
using CSV upload.

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
1. First we need to create a sample location manually in OTM.

2. Query for this location from back end table as follows:

select * from location where location_xid = 'TEST SH CORPORATION-45769'

3. Note down the WHERE clause from the query.


4. Goto Business Process Automation > Data Export > CSV Export

5.

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Select Table Name as 'LOCATION' and copy the WHERE clause that you have noted down in earlier step.
6. Click 'Run' and you will have following output:

7. Select the grey text which is location data and save it in .txt file.
Open this .txt file using Microsoft xls application and select comma as delimiter. Save this file as .csv file.
To verify the .csv has data is correct format open the file using textpad and you should see data with
comma separated values. 8. Now upload the file using Business Process Automation -> Integration ->
Integration Manager -> Upload XML/CSV Transmission:

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Important Note:
Ensure that date columns will follow the NLS Date Format mentioned in line 2 of the csv file.The results
screen is something like this. Note that Process Count and Error Count values are populated in the result.

Note: Please post corrections(if any) to 'learnotm@outlook.com'

Posted by learnotm@outlook.com at 2:20 PM


Labels: API, CSV, example, Glog, GlogXML, Inbound, Integration, Integrations, Learn, Oracle, OTM, PLSQL, Schema,
Servlet, upload, XML

30 comments:

Anonymous 4/15/16, 2:22 PM


nice blog please help me learn OTM

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Reply

ruthra 6/25/16, 1:35 PM


How to change Object id in transmission refnum to shipment/order?
Reply

Anonymous 2/27/17, 11:24 AM


Just take the raw xml and make changes and re upload the xml file.
Reply

Anonymous 8/25/17, 7:21 PM


Thanks for writing a amazing,good,great article, although I never
comment but the writing of this article made me to do so.

Thanks again.
conor mcgregor vs floyd mayweather fight download online
Reply

Punit Tiwari 9/14/17, 5:18 AM


Can we update the Location details, say Name (Not mandatory) ? while few transactions have been made
with Location name already.
Reply

Anonymous 11/24/17, 4:27 PM


This website was... how do you say it? Relevant!!
Finally I have found something that helped me. Appreciate it!
Reply

Replies

learnotm@outlook.com 2/9/18, 11:39 AM


Thank you !

Reply

Unknown 12/8/17, 3:34 AM


Amazing article...Helped a lot..Thank you
Reply

Unknown 12/8/17, 3:35 AM


Amazing article and great help...
Reply

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Replies

learnotm@outlook.com 2/9/18, 11:37 AM


Thank you Renil !

Reply

Anonymous 1/28/18, 4:45 PM


Could anyone tell why i_transaction_no is -1 in i_log table?
Reply

Anonymous 5/24/18, 5:49 PM


Nice Share, Keep working hard!! :)
Reply

Anonymous 6/11/18, 6:31 AM


Thanks for sharing your thoughts. I truly appreciate your efforts
and I will be waiting for your further post thank you once again.
Reply

Anonymous 6/12/18, 2:06 PM


I like the helpful info you provide in your articles. I
will bookmark your blog and check again here regularly.
I am quite certain I'll learn lots of new stuff right here!
Good luck for the next!
Reply

Anonymous 6/13/18, 7:15 AM


Way cool! Some very valid points! I appreciate you writing this post and the rest
of the site is also very good.
Reply

suvathi 6/29/18, 1:22 AM


wow great Article, the details you have provided are much clear, easy to understand, if you post some
more Article, it will be very much useful for me.
PL/SQL Training in Chennai
Reply

Anonymous 9/6/18, 5:24 AM


Very nice article, just what I needed.
Reply

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Anonymous 9/20/18, 7:07 AM
bookmarked!!, I like your blog!
Reply

Anonymous 12/2/18, 10:47 PM


Helⅼo, Ӏ enjoy reading through y᧐ur
artiсle post. I like to write a littⅼe
commernt to ѕupport you.
Reply

Anonymous 12/26/18, 10:26 PM


Your mode of explaining everything in this article is truly pleasant, all can simply understand it, Thanks a
lot.
Reply

Anonymous 12/26/18, 11:30 PM


Amazing! Its actually remarkable post, I have got much clear idea about from this paragraph.
Reply

Anonymous 1/3/19, 9:49 AM


Great site. A lot of helpful info here. I am sending it
to some pals ans also sharing in delicious. And obviously, thank
you for your sweat!
Reply

Anonymous 4/22/19, 7:26 PM


I am actually pleased to read this blog posts which carries plenty of valuable information, thanks for
providing these data.
Reply

Anonymous 4/23/19, 2:11 AM


Heya i am for the first time here. I came across this board
and I find It truly useful & it helped me out much.
I hope to give something back and help others like
you helped me.
Reply

Anonymous 5/4/19, 1:46 AM


Awesome! Its actually remarkable piece of writing, I have got much clear idea on the topic of from this
paragraph.
Reply

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Anonymous 5/11/19, 1:40 PM
I am sure this article has touched all the internet viewers, its really
really fastidious post on building up new web site.
Reply

PunPun 6/5/19, 10:43 AM


The article is very helpful, thank you so much !
Reply

Anonymous 6/12/19, 8:52 PM


There is Ԁefinately a great deal to know about this topіc.
I love all the points you mаde.
Reply

Anonymous 6/14/19, 10:00 PM


Prеtty! Thіs has been an extremely wonderful post.
Tһanks for supplying this information.
Reply

Anonymous 6/23/19, 7:05 PM


Pretty! This has been a really wonderful post. Many
thanks for providing this information.
Reply

Newer Post Home Older Post

Subscribe to: Post Comments (Atom)

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com

You might also like