Monday, September 25, 2017

Update Comment/Text from Maintain Session in LN 10.X

Infor 10.x session has new option to add Text on session and Text Area instead of old version of Text Editor. Following is code used to insert/update text field in maintain session:


DAL Code:

function extern long before.save.object(long i.mode)
{
long no.of.text.lines.copied

txinh219.lusr = logname$
txinh219.ludt = utc.num()

on case i.mode
case DAL_NEW:
if txinh219.cmnt <> 0 then
no.of.text.lines.copied = text.copy(
"txinh219.cmnt",
"txinh219.cmnt",
"", |* Keyword 1
"", |* Keyword 2
"", |* Keyword 3
"", |* Keyword 4
"", |* Text Group
"") |* Edit Options
endif
break
case DAL_UPDATE:
with.old.object.values.do(fill.old.values)

select tccom121.clan
from tccom121
where tccom121._index1 = {:txinh219.sfbp}
as set with 1 rows
selectdo
endselect

RETIFNOK(tccom.dll4000.rewrite.keywords.of.text(
"txinh219.cmnt",
txinh219.cmnt,
tccom121.clan,
"", |* KW1
"", |* KW1
"", |* KW2
"", |* KW2
"", |* KW3
"", |* KW3
"", |* KW4
"")) |* KW4

break
endcase

return(0)
}


Tuesday, September 5, 2017

Migration of Direct Delivery Sales Order and Link to PO in ERP LN 10.5

Following Steps are to migrate Direct Delivery Sales Order and Link with Purchase Order:

1. Migrate Open Sales Orders
2. Migrate Open Purchase Orders
3. Migrate Tables tdsls402 and tdpur402 for Open Orders
4. Approve Sales Order
5. Select approved sales order line and identify  activities pending till release sales order and find it in tdsls413 table
6. Update fields tdsls413.xcst as executed and tdsls413.nxct as No for selected session.
7. Update Field tdsls413.nxct as yes for actual activity need to execute.

Above steps will take make sales order in release state which were in previous environment and link is already maintained with purchase order.

Friday, March 3, 2017

Integration of Baan V and Other Systems using BOI

Integration of ERP with other System is common part of any organization. Basically I am focusing on BAAN ERP 5 and other systems using QCD/DCD with C4WS and BPM.

We can have Inbound and outbound data flow to BAAN. Following are Steps for sending data out from Baan to other systems using QCD/DCD which termed as Polling.

Steps:
1. Create QCD/DCD
2. Create .jar file and Deploy the same in C4WS
3. Write BOI Dll to Poll Data from Baan V
4. Test Dll using SOAP UI Tool

STEP 1: Create QCD/DCD

For polling, First we need QCD/DCD which define Dll and Fields which we are going to send from BAAN

QCD:
<?xml version="1.0"?>
<QCD>

<ManagerDef Type="BackOrderPoll" JavaPackage="com.boi.distribution.BackOrderPoll">
<Query>BackOrderPollEvent</Query>
</ManagerDef>

<QueryDef Type="BackOrderPollEvent" Language="BaanDLL" >
<DLL>otcboidll0058</DLL>
<Method Scope="Out">tcboidll0058.pollevent</Method>
<Parameters>
<Element Scope="Out">PollBackOrderset</Element>
<Element Scope="Out" JavaPackage="com.baan.erp.error" >ErrorSet</Element>
<Element Scope="Out">EventId</Element>
<Element Scope="Out">Verb</Element>
<Element Scope="In">Source</Element>
</Parameters>
<Return>
<Element>PollBackOrdResult</Element>
</Return>
</QueryDef>
<ElementDef Type="o.evnt" Id="EventId" Model="Data" Datatype="i4"/>
<ElementDef Datatype="string" Model="Data" Id="Verb" Type="o.verb" Length="10" Description="Verb"/>
<ElementDef Datatype="string" Model="Data" Id="Source" Type="Source" Length="5" Description="Source"/> 

<ElementDef Type="PollBackOrderset" Model="Elements" JavaPackage="com.boi.distribution.BackOrderPoll">
<Group Occurs="ZeroOrMore">
<Element>BackOrderStruct</Element>
</Group>
</ElementDef>



<ElementDef Type="tcboidll0058.pollevent" Id="PollBackOrdResult" Model="Elements" JavaPackage="com.boi.distribution.BackOrderPoll">
<Group Occurs="Required">
<Element>PollBackOrderRetval</Element>  
<Element>PollBackOrderset</Element>
<Element JavaPackage="com.baan.erp.error" >ErrorSet</Element>
<Element>EventId</Element>
<Element>Verb</Element>
</Group>
</ElementDef>


<ElementDef Type="tcboidll0058.pollevent" Id="PollBackOrderRetval" Model="Data" Datatype="i4"/>
<ElementDef Type="tcboidll0058.pollevent" Id ="tcboidll0058.pollevent" Model="Data" Datatype="i4"/>
</QCD>

DCD:

<?xml version="1.0"?>
<DCD>
    
 <ElementDef Type="BackOrderStruct" Model="Elements" JavaPackage="com.boi.distribution.BackOrderPoll">
<Group Occurs="Required">
<Element>BackOrderDate</Element>
<Element>BackOrderId</Element>
<Element>BackOrderQty</Element>
<Element>BackOrderReasonCode</Element>
<Element>CsrId</Element>
<Element>CustomerId</Element>
<Element>DistributorId</Element>
<Element>ItemCode</Element>
<Element>ItemCommonDescription</Element>
<Element>ItemCommonSize</Element>
<Element>OrderedItemId</Element>
<Element>OrderHeaderId</Element>
<Element>OrderLineId</Element>
<Element>OrderPlacedBy</Element>
<Element>OrderTypeId</Element>
<Element>PlanningCode</Element>
<Element>PoNumber</Element>
<Element>QuantityOrdered</Element>
<Element>ShipmentId</Element>
<Element>ShipToAddress</Element>
<Element>SplitNumber</Element>
<Element>TimesBackOrdered</Element>
</Group>
</ElementDef>

<ElementDef Type="BackOrderDate" Id="BackOrderDate" Model="Data" Datatype="string" Length="20"/>
<ElementDef Type="BackOrderId" Id="BackOrderId" Model="Data" Datatype="i4"/>
<ElementDef Type="BackOrderQty" Id="BackOrderQty" Model="Data" Datatype="i4"/>
<ElementDef Type="BackOrderReasonCode" Id="BackOrderReasonCode" Model="Data" Datatype="string" Length="2"/>
<ElementDef Type="CsrId" Id="CsrId" Model="Data" Datatype="string" Length="40"/>
<ElementDef Type="CustomerId" Id="CustomerId" Model="Data" Datatype="string" Length="5"/>
<ElementDef Type="DistributorId" Id="DistributorId" Model="Data" Datatype="string" Length="5"/>
<ElementDef Type="ItemCode" Id="ItemCode" Model="Data" Datatype="string" Length="47"/>
<ElementDef Type="ItemCommonDescription" Id="ItemCommonDescription" Model="Data" Datatype="string" Length="450"/>
<ElementDef Type="ItemCommonSize" Id="ItemCommonSize" Model="Data" Datatype="string" Length="132"/>
<ElementDef Type="OrderedItemId" Id="OrderedItemId" Model="Data" Datatype="string" Length="11"/>
<ElementDef Type="OrderHeaderId" Id="OrderHeaderId" Model="Data" Datatype="string" Length="16"/>
<ElementDef Type="OrderLineId" Id="OrderLineId" Model="Data" Datatype="string" Length="11"/>
<ElementDef Type="OrderPlacedBy" Id="OrderPlacedBy" Model="Data" Datatype="string" Length="10"/>
<ElementDef Type="OrderTypeId" Id="OrderTypeId" Model="Data" Datatype="string" Length="2"/>
<ElementDef Type="PlanningCode" Id="PlanningCode" Model="Data" Datatype="i4"/>
<ElementDef Type="PoNumber" Id="PoNumber" Model="Data" Datatype="string" Length="30"/>
<ElementDef Type="QuantityOrdered" Id="QuantityOrdered" Model="Data" Datatype="i4"/>
<ElementDef Type="ShipmentId" Id="ShipmentId" Model="Data" Datatype="string" Length="30"/>
<ElementDef Type="ShipToAddress" Id="ShipToAddress" Model="Data" Datatype="string" Length="30"/>
<ElementDef Type="SplitNumber" Id="SplitNumber" Model="Data" Datatype="i4"/>
<ElementDef Type="TimesBackOrdered" Id="TimesBackOrdered" Model="Data" Datatype="i4"/>
</DCD>

Step 2: Create .Jar File from Business Studio and Deploy in C4WS
  Go to Business Studio >> Open Project >> Build >> Build Project

  This will create .jar file in local folder of Project. Copy the .Jar file and use the same to deploy in C4WS. We will get Web Service URL which will be used by other application to call BAAN Dll and fetch data from BAAN ERP.


Step 3: Create BOI Dll 
Create library in Baan as per your naming convention as BOI Dll. Add function which is mentioned in QCD to fetch data from Baan and return data set to other system.We are using one common event table to get key fields to send data to other system. We can add parameter as Key field to Retrieve data from Baan. Use Key fields and Fetch all fields from related table and put into Structure.

function  extern long tcboidll0058.pollevent(
domain tcmcs.long PollBackOrderSet,
domain tcmcs.long StndErrorStruct,
ref domain awcom.num o.evnt,
ref domain tcmcs.str10 o.verb,
ref domain tcmcs.str20 o.osrc
)

{

    // Add logic to get key fields and fetch all fields.
    ret.backord.1 = container.set.fields(PollBackOrderSet,
    "PollBackOrdResult")

ret.backord = container.set.fields(ret.backord.1,
    "PollBackOrderset")

ret.backord.1 = container.set.fields(PollBackOrderSet,
    "BackOrderStruct",
     "BackOrderDate", back.ord.date,
                      ......}
        return (PollBackOrderSet)

}

Step 4: Test using SOUP UI
 Copy Web Service URL from C4WS and Use it to create Request in SOAP UI as Follows:

     Once we send request from SOAP UI, we will get response from Baan as Return Structure in SOAP UI.

Monday, February 6, 2017

Integration of Supplier Exchange and Infor 10.4 using ION


Supplier Exchange and LN 10.4 integration for ASN, PO, Inventory Count etc. documents.

1. Create Connection point for Supplier Exchange:



2. Create Connection point for LN:




3. Create Document Flow:
    We have created single document flow as
     1. LN -> Supplier Exchange
             Documents:
                i. Purchase Order(Sync) etc.
     2. Supplier Exchange -> LN
             Documents:
                i. ASN
               ii. Purchase Order(Process)

4. 

Friday, January 27, 2017

Integration of Infor EAM and COUPA using ION and BPM

In recent requirement, we need to integrate requisition process of Infor EAM and COUPA using ION and BPM.

Following are Steps we follow to Create this Integration in ION:

1. Create Connection Point:

   i. Database Connection Point for EAM(Infor Application)

 


     ii: File Share Connection Point for COUPA:
    
                 


           Check "Create non-existing Folder(s)" check box to create new folder. No need to create first and add. 

2. Create Document Flow:


This document flow will define flow of data from EAM to COUPA Folder.


3. BPM :
     BPM will pick file from COUPA folder from ION path and send/insert into COUPA.




Wednesday, January 11, 2017

Modified Script changes with SCITE after Server disconnect

As developer we have habit to write a ton of code in one go and test the same after all coding. Sometime we forget to save changes to the script while connection on and somehow connection to server lost. We save script in impression that we are connected to server but script is locked in application lock and new changes wasn't available in script. 

Windows save these temporary file in following folder so we can get all changes from these temporary files.

C:\Users\XXXXX\AppData\Local\Infor\BW\ERPLN\tmp