EDI Talk - Discussions, Chat about GIS, Gentran Integration Suite, Inovis, Extol, SAP and more...
EDI - Electronic Data Interchange
»
GIS
»
Mapping SQL to ASN
Username:
1 Hour
1 Day
1 Week
1 Month
Forever
Password:
Home
Help
Search
Quick Search
Advanced Search
[Close]
Login
Register
Pages: [
1
]
2
« previous
next »
Print
Author
Topic: Mapping SQL to ASN (Read 282 times)
Burmjohn
Full Member
Posts: 155
Mapping SQL to ASN
«
on:
August 05, 2008, 04:38:30 PM »
Mapping from SQL to ASN has not been a fun experience. This is my first outbound SQL map, and wow the documentation is non existent for SQL mapping... I finally think I have things on the right track now (4 days later)
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
Burmjohn
Full Member
Posts: 155
Re: Mapping SQL to ASN
«
Reply #1 on:
August 06, 2008, 10:32:00 PM »
The last few days have really been killing me... Here is a summary of the issue at hand:
I am in the process of trying to establish how we are going to do
outgoing documents with GIS. I am caught between two paths, and I am
not sure which path to choose. If you could please comment to give a
reason why one is better (or not) then the other I would appreciate it.
Our scenario - Data is coming from DB2 running on an AS/400. I am not
sure if its better to map directly from SQL to 856 and then make a
business process to handle the outbound and envelope the document (and
I am not sure how to do that *yet* or if that's possible) OR to map
from SQL to Positional then during the "Outbound Business Process"
call the envelope that calls the map to convert it from positional to
the EDI 856 document.
Keep in mind this is my first attempt at this, I am fresh out of the
mapping class. Unfortunately the mapping class covered positional
based files only. So the examples I review in my book are all
positional based for the business processes that surround the outbound
processes.
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
Burmjohn
Full Member
Posts: 155
Re: Mapping SQL to ASN
«
Reply #2 on:
August 07, 2008, 01:42:49 PM »
I ended up choosing to map to a flat file. After hearing a lot of feedback from people on the mailing lists and other places it made more sense to go to a flat file. The business process to parse a flat file is simple and quick and it will allow me to also archive the extracted data for use later.
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
Burmjohn
Full Member
Posts: 155
Re: Mapping SQL to ASN
«
Reply #3 on:
August 08, 2008, 10:52:58 AM »
The question / problem I have is that IF I choose to "BatchLikeDocuments" = YES in the document extraction part of the BP it ends up putting all of my shipments into ONE ST segment rather then multiple ST segments under one GS and one ISA. If I choose "BatchLikeDocuments" = NO then it creates a separate full ASN for each and every full record rather then multiple ST's as I had envisioned.
Notes: the file passed has multiple ASN data in a positional based format. In my test senerio i am passing 6 unique ASN's but all for the same trading partner - so it should bulk them all under ONE ISA and GS but multiple ST's (because there is one Shipment ID per ST - needs to be unique as per most TP's requirements).
Where am I going wrong?
*** Edit - I was told to move the EDI Envelope outside of my LOOP, and now it works but I am receiving other errors.
I attached my BP for reference
«
Last Edit: August 08, 2008, 10:55:52 AM by Burmjohn
»
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
Burmjohn
Full Member
Posts: 155
Re: Mapping SQL to ASN
«
Reply #4 on:
August 08, 2008, 10:56:04 AM »
I checked the business process and I noticed the following " invoke sub bp failed ", but it still generated the 856 to the folder I specified, and everything appears to be OK.
Below is the error from the BP, I am not sure how to "debug" this.
Name: 856_SQL_to_Flatfile Instance ID:15515 Service Name: Inline Invoke Subprocess Service
com.sterlingcommerce.woodstock.workflow.WorkFlowException: invoke sub bp=null failed.
com.sterlingcommerce.woodstock.workflow.WorkFlowException: Mandatory parameter WFD_NAME not specified.
When I check the subprocess there are no errors, everything reports status "Success".
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
hmbp
Newbie
Posts: 37
Re: Mapping SQL to ASN
«
Reply #5 on:
August 08, 2008, 11:12:18 AM »
This is outbound you are working with, right? Are you using a System Header Map? And the data file is positional or are you working with a CSV file, etc?
Logged
Burmjohn
Full Member
Posts: 155
Re: Mapping SQL to ASN
«
Reply #6 on:
August 08, 2008, 11:16:18 AM »
This is outbound, and I am using a header map, and its a positional file.
Its working because it does split up the positional file into 6 documents if I specify batchdocument = no. I just got a suggestion to nuke the invoke and see if helps or to specify the X12EnvelopeUnified in the invoke to see if that works too.
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
hmbp
Newbie
Posts: 37
Re: Mapping SQL to ASN
«
Reply #7 on:
August 08, 2008, 11:51:47 AM »
Just looked at your BP quickly. Definitely move the EDI Envelope and the Invoke Sub-Process into the loop. Also, try adding the following into the Advanced Properties of the EDI Envelope: Name: TARGET Value: DOC
See if that makes a difference and let me know...
Logged
Burmjohn
Full Member
Posts: 155
Re: Mapping SQL to ASN
«
Reply #8 on:
August 08, 2008, 12:08:46 PM »
I was told to move it out of the loop, originally I had it in the loop and it was either generating multiple ISA's if I had batchlikedocuments = no. If it was yes, then it was smashing all of those shipments in to one ST (which is wrong). Now that its out of the loop it puts each shipment into its own ST and then puts it into one GS and ISA envelope which is correct.
I'll try your suggestion also, what is your output when you have multiple shipments? Does it all go into one ISA/GS envelope or do you makes a new ISA/GS for each shipment for the same trading partner?
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
hmbp
Newbie
Posts: 37
Re: Mapping SQL to ASN
«
Reply #9 on:
August 08, 2008, 01:12:36 PM »
also, how are your record headers that are used for partner resolution? do you have one record and then all the data or is there one header record for each ASN?
example:
does it looks like this:
PARTNER1
ASN 1
ASN 2
or
PARTNER1
ASN1
PARTNER2
ASN2
Logged
Burmjohn
Full Member
Posts: 155
Re: Mapping SQL to ASN
«
Reply #10 on:
August 08, 2008, 01:29:58 PM »
I have a header record for each ASN, which has the receiver id & doc type
Ex:
Header
Shipment
Order
Package
item
item...
Package...
item...
Header
Shipment
Order
Package
item
item...
Package...
item...
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
hmbp
Newbie
Posts: 37
Re: Mapping SQL to ASN
«
Reply #11 on:
August 08, 2008, 01:48:09 PM »
One more thing for you to try before I try and run your BP over here...
Try changing the properties of the EDI envelope from Deferred to Immediate. This should translate and envelope the current message as soon as the EDI Encoder service is finished with the message.
Try that with the EDI Envelope and Invoke Sub-Process inside the loop....
Logged
Burmjohn
Full Member
Posts: 155
Re: Mapping SQL to ASN
«
Reply #12 on:
August 08, 2008, 02:00:06 PM »
If batch is set to YES then it produces one ISA/GS/ST and all of the ASN's are in the one single ST. If batch is set to no then it produces an ISA/GS/ST for each shipment.
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
Burmjohn
Full Member
Posts: 155
Re: Mapping SQL to ASN
«
Reply #13 on:
August 08, 2008, 02:13:58 PM »
One other question, sorry!, how do you check if a primary document is blank / no test so that you can stop a business process? For example in my BP I am running a translation which calls a Map to dump from SQL to Positional, but I dont want to continue if there is nothing there.
Logged
- John
EDI Client Manager @ Luxottica Group
Long Island, NY
hmbp
Newbie
Posts: 37
Re: Mapping SQL to ASN
«
Reply #14 on:
August 08, 2008, 02:34:54 PM »
try doing another "Choice Start" before the Document Extraction. if Document Found = True, continue, if Document Found = not true, then end the process. Never actually did this myself, but in theory it should work.
Logged
Pages: [
1
]
2
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
EDITalk.com
-----------------------------
=> EDITalk.com News / Discussion
=> Suggestion Box
=> Blog Post / Article Idea's and Discussions
-----------------------------
EDI - Electronic Data Interchange
-----------------------------
=> General EDI Discussions
=> VANS - Value Added Networks
=> EDI Documents
=> EDI Software
=> GIS
===> GIS Mapping Discussions
=> Healthcare EDI
-----------------------------
General Discussions
-----------------------------
=> SAP
=> Conferences & Meetings
=> AS/400
=> General Discussion
=> Off Topic
-----------------------------
Vendor Compliance
-----------------------------
=> Vendor Compliance
=> Chargebacks
-----------------------------
Vendor News, Links and Contacts
-----------------------------
=> Vendor News
-----------------------------
EDI Jobs & Related Offers
-----------------------------
=> EDI and Vendor Compliance Jobs Board
Loading...