As OIC gen 2 does not have a provision of batching outbound EDI batching, below is the workaround steps to achieve it.
1.
Create ISA Headers and stage it in a file
Translate 810 invoice with b2b translator!
normalize-space(substring-before($readheader/nsmpr15:ReadResponse/nsmpr1:tes/nsmpr1:test/nsmpr1:C1,"ST*810"))
The above string will give you the
ISA segment before ST segment.
2.
Next ST-segment loop
Loop the multiple invoices to get the
ST repeating segments, I have used the Translate EDI activity.
For writing the ST segment file I used the below schema and appended to
the same ISA file , so that we will have ISA and then ST repeating segments.
<?xml version="1.0"
encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://TargetNamespace.com/fileReference/writedi"
targetNamespace="http://TargetNamespace.com/fileReference/writedi"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:version="NXSD"
nxsd:stream="chars"
nxsd:encoding="UTF8"
>
<xsd:element
name="tes">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:test" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element
name="test" type="tns:testType" />
<xsd:complexType name="testType">
<xsd:sequence>
<xsd:element name="C1" type="xsd:string" nxsd:style="terminated"
nxsd:terminatedBy="${eof}" nxsd:quotedBy=""" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
3.
Footer Segment (GE and IE)
<?xml version="1.0"
encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://TargetNamespace.com/fileReference/writedi"
targetNamespace="http://TargetNamespace.com/fileReference/writedi"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:version="NXSD"
nxsd:stream="chars"
nxsd:encoding="UTF8"
>
<xsd:element
name="Edi810">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:Edi_810" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Edi_810"
type="tns:Edi810Type" />
<xsd:complexType name="Edi810Type">
<xsd:sequence>
<xsd:element name="Record" type="xsd:string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}"
/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Run the Integration and you will see the EDI outbound batching into single edi file .
Happy Learning
====================================================================================
No comments:
Post a Comment