Author |
Message
|
Halloween |
Posted: Wed Dec 09, 2015 8:43 am Post subject: Representing an IDOC message |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Hello,
I have mapped the input XML to output data object in esql. So i made adaptor connection, imported idoc structure and mapped the fields in esql.
Now i want structure like this
Code: |
EDI_DC40 E2KNA1M005 / 0000087997/ / / / / / / / // / / / / US05/ US / / / /San Jose BMW San Jose BMW / / / San Jose / / / 95128-1913CA / / / / /E //1990 W San Carlos St / / / / / / / // / / / / / / / / USD / / NON / / / / / / / / // 060859999012803/ / / // / /// / / / / //// / / ///// / / / / / // / /BMW/ATL_TW_I436000 0000087997San Jose BMW 1990 W San Carlos St San Jose CA 95128-1913 /BMW/ATL_TW_E1KNA1M000 08799701B0 1992102199991231 E2KNVVM006 / D3020000/ /1 /23000008/ / / / / / / A/// / 01/ // / USD 13ZEOM/ / 0066/ / / / / / // // / / / /// / / // // / /BMW/ATL_TW_E1KNVVM000 E0000020.01ADX E2KNVPM002 / SP0000087997 / / E2KNVPM002 / BP0000087997 / / E2KNVPM002 / PY0000087997 / / E2KNVPM002 / SH0000087997X/ / E2KNVIM / / / N E2KNB1M006 / D3 //001/ 1500045 / / / ///// //ZEOM/ / / / / / / / / / / / / / //// / / // / / // 58122 / / / / / / / // / / / / / / / / // / E2KNBKM004 / / / / / / // / / / / / // / / / / / / / E2KNKKM001 / / 123673.00 / / / /US5/ / / / / / / / / / / / /
|
This will be used by SAP team to post it to SAp to create the IDOC.
After mapping to dataobject in esql i get the output as below in MQ Output.
Code: |
<NS1:SapDebmas03BmwAtlTwDebmas03 xmlns:NS1="http://www.ibm.com/xmlns/prod/websphere/j2ca/sap/sapdebmas03bmwatltwdebmas03"><SapDebmas03BmwAtlTwDebmas03IDocBO><SapIDocControlRecord><IDOCTYP>DEBMAS03</IDOCTYP><CIMTYP>/BMW/ATL_TW_DEBMAS03</CIMTYP><MESTYP>/BMW/ATL_TW_I436DEBMAS</MESTYP><RCVPOR>SAPAEI</RCVPOR><RCVPRN>AEICLNT010</RCVPRN><RCVPRT>LS</RCVPRT><SERIAL>yyyyMMddHHmmssSSSS</SERIAL><SNDPFC>LS</SNDPFC><SNDPOR>EAI_ALE01</SNDPOR><SNDPRN>ATL_SB_ALE</SNDPRN><SNDPRT>LS</SNDPRT></SapIDocControlRecord>
<SapDebmas03BmwAtlTwDebmas03DataRecord>
<SapDebmas03BmwAtlTwDebmas03E2kna1m005>
<LAND1>US</LAND1>
<KUNNR>0000031449</KUNNR>
<KTOKD>US05</KTOKD>
<NAME1>BMW Motorcycles of Western Oregon, Tigard</NAME1>
<NAME2>BMW Motorcycles of Western Oregon, Tigard</NAME2>
<STRAS>12010 SW Garden Place</STRAS>
<PSTLZ>97223-8263</PSTLZ>
<ORT01>Tigard</ORT01>
<REGIO>OR</REGIO>
<SPRAS>EN</SPRAS>
<STCD1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<STCD2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<TXJCD>410675900022301</TXJCD>
<UWAER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<KUNAG>0000031449</KUNAG>
<AUFSD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<KDGRP>23</KDGRP>
<BZIRK>000008</BZIRK>
<ANTLF xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"> </ANTLF>
<KZTLF>A</KZTLF>
<VSBED>01</VSBED>
<ZTERM>ZEOM</ZTERM>
<WAERS>USD</WAERS>
<KTGRD>13</KTGRD>
<VKBUR>0067</VKBUR>
<VERSG>1</VERSG>
<VKORG>D302</VKORG>
<VTWEG> </VTWEG>
<SPART>00</SPART>
<TAXKD>N</TAXKD>
<KLIMK>116954.00</KLIMK>
<SBGRP>US3</SBGRP>
<ZUAWA>001</ZUAWA>
<AKONT>1500045</AKONT>
<ZWELS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<FDGRV>/</FDGRV>
<ALTKN/><CESSION_KZ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<BUKRS>D3</BUKRS>
<A_BMW_ATL_TW_CENT>External</A_BMW_ATL_TW_CENT>
<A_BMW_ATL_TW_DMS>AK</A_BMW_ATL_TW_DMS>
<A_BMW_ATL_TW_FRON>0000020.01</A_BMW_ATL_TW_FRON>
<A_BMW_ATL_TW_SPAL>X</A_BMW_ATL_TW_SPAL>
<DEFPA></DEFPA>
<SapDebmas03BmwAtlTwDebmas03E2knvvm007>
<SapDebmas03BmwAtlTwDebmas03E2knvpm002>
<PARVW>SP</PARVW>
<KUNN2>0000031449</KUNN2>
</SapDebmas03BmwAtlTwDebmas03E2knvpm002>
<SapDebmas03BmwAtlTwDebmas03E2knvpm002>
<PARVW>BP</PARVW>
<KUNN2>0000031449</KUNN2>
</SapDebmas03BmwAtlTwDebmas03E2knvpm002>
<SapDebmas03BmwAtlTwDebmas03E2knvpm002>
<PARVW>PY</PARVW>
<KUNN2>0000031449</KUNN2>
</SapDebmas03BmwAtlTwDebmas03E2knvpm002>
<SapDebmas03BmwAtlTwDebmas03E2knvpm002>
<PARVW>SH</PARVW>
<KUNN2>0000031449</KUNN2>
<DEFPA>X</DEFPA>
</SapDebmas03BmwAtlTwDebmas03E2knvpm002>
</SapDebmas03BmwAtlTwDebmas03E2knvvm007>
<KATR1>NO</KATR1>
<KATR2>N</KATR2>
<SapDebmas03BmwAtlTwDebmas03ABmwAtlTwE1kna1m000>
<A_BMW_ATL_TW_DREF>03144901</A_BMW_ATL_TW_DREF>
<SCHANNEL>B0</SCHANNEL>
<DATAB>20070326</DATAB>
<DATBI>99991231</DATBI></SapDebmas03BmwAtlTwDebmas03ABmwAtlTwE1kna1m000></SapDebmas03BmwAtlTwDebmas03E2kna1m005></SapDebmas03BmwAtlTwDebmas03DataRecord></SapDebmas03BmwAtlTwDebmas03IDocBO></NS1:SapDebmas03BmwAtlTwDebmas03>>
message <<NS1:SapDebmas03BmwAtlTwDebmas03 xmlns:NS1="http://www.ibm.com/xmlns/prod/websphere/j2ca/sap/sapdebmas03bmwatltwdebmas03"><SapDebmas03BmwAtlTwDebmas03IDocBO><SapIDocControlRecord><IDOCTYP>DEBMAS03</IDOCTYP><CIMTYP>/BMW/ATL_TW_DEBMAS03</CIMTYP><MESTYP>/BMW/ATL_TW_I436DEBMAS</MESTYP><RCVPOR>SAPAEI</RCVPOR><RCVPRN>AEICLNT010</RCVPRN><RCVPRT>LS</RCVPRT><SERIAL>yyyyMMddHHmmssSSSS</SERIAL><SNDPFC>LS</SNDPFC><SNDPOR>EAI_ALE01</SNDPOR><SNDPRN>ATL_SB_ALE</SNDPRN><SNDPRT>LS</SNDPRT></SapIDocControlRecord><SapDebmas03BmwAtlTwDebmas03DataRecord><SapDebmas03BmwAtlTwDebmas03E2kna1m005><LAND1>US</LAND1><KUNNR>0000031449</KUNNR><KTOKD>US05</KTOKD><NAME1>BMW Motorcycles of Western Oregon, Tigard</NAME1><NAME2>BMW Motorcycles of Western Oregon, Tigard</NAME2><STRAS>12010 SW Garden Place</STRAS><PSTLZ>97223-8263</PSTLZ><ORT01>Tigard</ORT01><REGIO>OR</REGIO><SPRAS>EN</SPRAS><STCD1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><STCD2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><TXJCD>410675900022301</TXJCD><UWAER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><KUNAG>0000031449</KUNAG><AUFSD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><KDGRP>23</KDGRP><BZIRK>000008</BZIRK><ANTLF xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"> </ANTLF><KZTLF>A</KZTLF><VSBED>01</VSBED><ZTERM>ZEOM</ZTERM><WAERS>USD</WAERS><KTGRD>13</KTGRD><VKBUR>0067</VKBUR><VERSG>1</VERSG><VKORG>D302</VKORG><VTWEG> </VTWEG><SPART>00</SPART><TAXKD>N</TAXKD><KLIMK>116954.00</KLIMK><SBGRP>US3</SBGRP><ZUAWA>001</ZUAWA><AKONT>1500045</AKONT><ZWELS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><FDGRV>/</FDGRV><ALTKN/><CESSION_KZ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><BUKRS>D3</BUKRS><A_BMW_ATL_TW_CENT>External</A_BMW_ATL_TW_CENT><A_BMW_ATL_TW_DMS>AK</A_BMW_ATL_TW_DMS><A_BMW_ATL_TW_FRON>0000020.01</A_BMW_ATL_TW_FRON><A_BMW_ATL_TW_SPAL>X</A_BMW_ATL_TW_SPAL><DEFPA></DEFPA><SapDebmas03BmwAtlTwDebmas03E2knvvm007><SapDebmas03BmwAtlTwDebmas03E2knvpm002><PARVW>SP</PARVW><KUNN2>0000031449</KUNN2></SapDebmas03BmwAtlTwDebmas03E2knvpm002><SapDebmas03BmwAtlTwDebmas03E2knvpm002><PARVW>BP</PARVW><KUNN2>0000031449</KUNN2></SapDebmas03BmwAtlTwDebmas03E2knvpm002><SapDebmas03BmwAtlTwDebmas03E2knvpm002><PARVW>PY</PARVW><KUNN2>0000031449</KUNN2></SapDebmas03BmwAtlTwDebmas03E2knvpm002><SapDebmas03BmwAtlTwDebmas03E2knvpm002><PARVW>SH</PARVW><KUNN2>0000031449</KUNN2><DEFPA>X</DEFPA></SapDebmas03BmwAtlTwDebmas03E2knvpm002></SapDebmas03BmwAtlTwDebmas03E2knvvm007><KATR1>NO</KATR1><KATR2>N</KATR2><SapDebmas03BmwAtlTwDebmas03ABmwAtlTwE1kna1m000><A_BMW_ATL_TW_DREF>03144901</A_BMW_ATL_TW_DREF><SCHANNEL>B0</SCHANNEL><DATAB>20070326</DATAB><DATBI>99991231</DATBI></SapDebmas03BmwAtlTwDebmas03ABmwAtlTwE1kna1m000></SapDebmas03BmwAtlTwDebmas03E2kna1m005></SapDebmas03BmwAtlTwDebmas03DataRecord></SapDebmas03BmwAtlTwDebmas03IDocBO></NS1:SapDebmas03BmwAtlTwDebmas03>
|
Any idea how can i convert to the one mentioned before |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Dec 09, 2015 9:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Use DFDL to map your EDI_DC40 and EDI_DD40 including sdata...
Then Map from your XML model to the DFDL model.
Or you could use the object domain and see about passing the XML tree...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
timber |
Posted: Wed Dec 09, 2015 9:45 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
The DataObject domain is for carrying logical data relating to the SAP adapter. Its physical form is XML - so not much use for serializing IDocs.
As fjb_saper says, if you want to output the flat file version of the IDoc then you will need to create a DFDL schema for it.
Creating an XML version would be *lot* easier, given your inexperience with the product. See if you can persuade the receiving application to see reason. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Dec 09, 2015 10:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The OP did not specify if his output to SAP was done via the SAP Adapter or any other object that SAP could use as input (Flat file, Http Post, webservice call ...)  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Halloween |
Posted: Wed Dec 09, 2015 10:50 am Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
First thank you fjb_saper and timber,
You guys have helped drive through for a startup in IIB.
As per fjb,
The DataObject domain is for carrying logical data relating to the SAP adapter. Its physical form is XML - so not much use for serializing IDocs.
Is true coz even when i used RCD, or when i store the physical xml as xml file and try to open it, it is just a plain text with no space or delimeter considering it as dataobject format.
I see it as
Code: |
DEBMAS03/BMW/ATL_TW_DEBMAS03/BMW/ATL_TW_I436DEBMASSAPAEIAEICLNT010LSyyyyMMddHHmmssSSSSLSEAI_ALE01ATL_SB_ALELSUS0000031449US05BMW Motorcycles of Western Oregon, TigardBMW Motorcycles of Western Oregon, Tigard12010 SW Garden Place97223-8263TigardOREN410675900022301000003144923000008 A01ZEOMUSD1300671D302 00N116954.00US30011500045/D3ExternalAK0000020.01XSP0000031449BP0000031449PY0000031449SH0000031449XNON03144901B02007032699991231 |
However, i would need it with delimeter and space. ANd, would you please elaborate on how can i do DFDL. I mean create from the delimeted text file.
When i try to parse the physical form of dataobject as XML it gives me parsing error. I can't create schema out of it and use it to create mapping from dfdl.
And, another confusion what would be the input dfdl. How would i use this physical form of XML to create DFDL on input side of map.
Sorry, if i am like asking too much guys.
Thanks |
|
Back to top |
|
 |
Halloween |
Posted: Wed Dec 09, 2015 10:57 am Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Hello guys,
there is no parsing error. i just repeatedly used the physical XML form of dataobject. Should i create xsd then dfdl maps out of it and then do maps to generate text file with delimeter. I am just afraid xsd is for xml and not for dataobject format |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 09, 2015 11:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Or just create a DFDL map & populate that from ESQL or Java, using references into the XML.
Probably easier than creating an XSD for a highly dynamic piece of XML _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
timber |
Posted: Wed Dec 09, 2015 12:27 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
would you please elaborate on how can i do DFDL |
Not possible to teach DFDL via this forum, but there are some good tutorials out there. I suggest that you starting by using Google to find them. Come back when you have enough information to ask the right questions.
Quote: |
Sorry, if i am like asking too much guys |
We don't mind questions, as long the person asking them has made some effort. In this case you have, so no problem.
Quote: |
I am just afraid xsd is for xml and not for dataobject format |
It's a good point. Somebody should invent a technology that uses XSD to describe the logical structure of the data, and XSD annotations to describe its non-XML physical format. Then, some company that sells integration software could create a development environment for that language and put it into their toolkit.
Oh wait...https://en.wikipedia.org/wiki/Data_Format_Description_Language. |
|
Back to top |
|
 |
Halloween |
Posted: Wed Dec 09, 2015 1:09 pm Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Thanks everyone.
My point was dfdl from what source and what will be output to dfdl mapping
So what i did was instead of creating dfdl, i created message sets.
But i am getting invalid wire format exception.
I am using input as XML and supported formats as Dataobjects
Output as MRM
I am moving all the elements but i am not getting empty output and then throws the Invalid wire format exception. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 09, 2015 1:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Halloween wrote: |
My point was dfdl from what source and what will be output to dfdl mapping |
My point is that this "mapping" may be too complex for a Mapping node.
Halloween wrote: |
So what i did was instead of creating dfdl, i created message sets. |
This is a bad idea. DFDL offers many more features and flexibility than MRM.
Halloween wrote: |
But i am getting invalid wire format exception. |
So you're not just creating a message set, you're not creating it properly.
Halloween wrote: |
I am moving all the elements but i am not getting empty output and then throws the Invalid wire format exception. |
I think you're going to need a more sophisticated strategy than building a message set, block moving all the elements from the XMLNSC to the MRM domain and serializing it.
You will be able to reduce the amount of code you need by leveraging the features of DFDL, but I for one will be moderately impressed if you can get it down to simply moving all the elements. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Halloween |
Posted: Wed Dec 09, 2015 1:52 pm Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Alright so i create DFDL and then move all elements to MRM in ESQl.
But how will i address the delimeter issue / as i mentioned earlier |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Dec 09, 2015 2:15 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Export the structures from SAP either in C or COBOL format.
Import with the DFDL Wizard.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 10, 2015 5:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Halloween wrote: |
Alright so i create DFDL and then move all elements to MRM in ESQl. |
If you're creating a DFDL structure, why would you be moving anything to MRM?
Halloween wrote: |
But how will i address the delimeter issue / as i mentioned earlier |
Within the DFDL model. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Halloween |
Posted: Thu Dec 10, 2015 8:53 am Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Thanks fjb.
@ Victor : Because the flat file that i mentioned with '/' delimeter is a text file.
As per fjb i will export the structure from SAP and then create the dfdl with delimeter.
But i am still confused would i be using esql. what would be the eagle eye view for this approach?
I am trying to put dots together but i myself not clear with how would i approach to this transformation of seemingly simple thing |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 10, 2015 9:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Halloween wrote: |
@ Victor : Because the flat file that i mentioned with '/' delimeter is a text file. |
a) that's still not my name
b) DFDL does text files. Indeed DFDL does all non-XML formats and is the designated successor to MRM
Halloween wrote: |
i myself not clear with how would i approach to this transformation of seemingly simple thing |
You yourself apparently not clear on a number of seemingly simple things. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|