ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQSI v2.1 using ESQL with SAP IDOCS

Post new topic  Reply to topic
 MQSI v2.1 using ESQL with SAP IDOCS « View previous topic :: View next topic » 
Author Message
sebastian
PostPosted: Thu Apr 08, 2004 5:28 am    Post subject: MQSI v2.1 using ESQL with SAP IDOCS Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

Our company is using MQSI v2.1. When we translate any SAP IDOC messages,we use the Neon transform nodes. I am trying to be able to perform this transformation using ESQL instead. I have been able to define individual IDOC segments with message maps and transform these from input text line to xml but the challenge seems to be how in ESQL to determine whether the next segment transformed is a repeat of the last segment, a new segment (that will use a new message map) or a new segment that skips an optional segment.

I am relatively new to SAP IDOCs but the way I understand them is that a message is comprised of groups of 1030 byte segments. Some segments are mandatory and some are optional. Some may be repeated and others will not be but the overall segment order is consistent. For example, if I have segments A (mandatory, not repeating), segment B ( optional, repeating) and segment C (optional not repeating), valid message combinations would be; ABC, ABBC, AC, and A. The segments could not be sent out of order, for example CBA would not be valid.

I am assuming what I am looking for is an ESQL if statement that will judge the incoming segment type and then branch to the appropriate mapping subroutine. Do you have any example of something like this or can you point me in the right direction for how I can do this in ESQL? Thank you,
Sebastian
_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Thu Apr 08, 2004 5:39 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So, what you're saying is that the different segments come in a fixed sequence, with optional and repeating fields?

So you'd want a message that contained an element of a Complex Type with a Type Composition of Sequence, and contained optional and repeating elements of Complex Types that described each segment.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sebastian
PostPosted: Mon Apr 12, 2004 8:55 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

That sounds right. Can this be done in ESQL? Have you done this or seen this done before?

What would help me is seeing an example of how to use an if condition against the input and then branch out to the appropriate mapping logic in ESQL.

Any input is appreciated,

Seb
_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Mon Apr 12, 2004 9:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

sebastian wrote:
That sounds right. Can this be done in ESQL? Have you done this or seen this done before?

It can be done by modelling your data into a message set, and then accessing the appropriate fields in the message tree using ESQL, yes.

And yes, I've done something similar before, but not with IDocs.

sebastian wrote:
What would help me is seeing an example of how to use an if condition against the input and then branch out to the appropriate mapping logic in ESQL.

Well, really you're just asking about the syntax of the IF statement, or the syntax of the CASE statement, or about how to use the RouteToLabel/Label nodes.

All those are in the documentation, including examples. Any examples I could give would be just as generic as those without knowing what your message model would look like or what processing on each segment type you'd need to do.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sebastian
PostPosted: Mon Apr 12, 2004 9:31 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

I know I am just sort of jumping into this, but what confuses me is how to define the message set. Would you define a separate message set for each segment and then determine the type of message set to used by an if at the beginning of the message?

When the message first comes into MQSI, it could be any length that is a multiple of 1030 so how do I hold this in storage to check the value of the message to then apply it to a message set? Do I blob it in and somehow apply a message set to the beginning of the data?

I will dig through the documentation as you suggested. Perhaps then it will become more clear.

thanks for the input,
Seb
_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Mon Apr 12, 2004 9:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

sebastian wrote:
I know I am just sort of jumping into this, but what confuses me is how to define the message set. Would you define a separate message set for each segment and then determine the type of message set to used by an if at the beginning of the message?
Not personally, no.

If your logical message consists of a set of different records, then I would put the definitions for all records in a single message set, and have as many actual messages as I needed to model each unique assembly of records. But that's not saying that if you have a logical message consisting of A, B, C, D and E records - and it's valid to have AAB, AAABBBBBC, and etc, that I would make a message for each of those. As long as you've got optional and repeating elements, keep one message. If you get into situations where you have exclusions - AAABCD is valid but only if it doesn't include E, but ABBBBCDE is valid (i.e., A can only repeat if the set doesn't include E) - then I would start defining different messages.

If your records are in any way identifiable by content - either by something that acts as a tag or a field delimiter, or by something that can be matched by a regular expression, then the MRM can identify your different records for you ("resolve the choice") if you model your data as a TDS message.

Where you have to get into parsing BLOB data is when you have to decide what type of record you've got based on field type - like "if bits ten through 20 are a valid integer and not a string, then I've got record A".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sebastian
PostPosted: Mon Apr 12, 2004 10:14 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

I am trying to learn more by creating my own test data in a miniature SAP IDOC form.

I have 3 segment types, each is 8 bytes long:

SEG1AAAA (mandatory, flat)
SEG2BBBB (optional, repeating)
SEG3CCCC (optional, repeating)

physical message = SEG1AAAASEG2BBBBSEG3CCCC

Message set definition
IDOC_test
SEG1 STRING - 4 bytes
DATA1 STRING - 4 bytes
SEG2 STRING - 4 bytes
DATA2 STRING - 4 bytes
SEG3 STRING - 4 bytes
DATA3 STRING - 4 bytes


Are you saying that you would define a message set that appears as above? What if the message had a repeating third segment? How would you judge the last segment value?

still researching,
Seb
_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Mon Apr 12, 2004 10:26 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Okay, again, your message should be an element of a custom defined complex type.

That type should have a type composition of Sequence where elements are tag delimited (I forget how version 2.1 specifies this), and contain three elements.

Each of those elements should also be of custom defined types. In your very simple example, each of those types are going to only contain your DATAx strings. The properties of the elements of those types, within the Complex type of the message structure, will indicate that the Tag for the element is the appropriate 'SEGx' string (and the tag length for the outer type will indicate that the tag is 4 chars long).
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fschofer
PostPosted: Tue Apr 13, 2004 2:33 pm    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
take a look at the Support Pack
IA0F: WebSphere MQ Integrator - IDoc parser for SAP
http://www-306.ibm.com/software/integration/support/supportpacs/individual/ia0f.html
There you find informations about idoc processing with using ESQL


You can also do the parsing on your own with the CWF / TDS Parsers
without using the Idoc Parser above.


The third possible solution (with automatic message set creation)
is the WBIA Adapter for mySAP.com which exchange Idocs as XML messages with the Broker.
http://www.ibm.com/software/integration/wbiadapters/mysap/
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQSI v2.1 using ESQL with SAP IDOCS
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.