Tuesday, 30 July 2013

Trade and Logistics:--Product information management:

Trade and Logistics:
         Trade and logistics including 4 modules
1. Product information management- material ,stock product,Non-stok products(direct orders)
2.procurement and sourcing-purchase orders,vendors,Trade(Purchase) agreements
3.sales and marketing- sales orders, customers, Trade( sales ) Agreements
4.inventory and warehouse management- site, warehouse, location ,pallet, on hand inventory, stock calculation
Ex:
Site-chennai
Warehouse- tnagar,adyar,chrompet,nungambakkam

Diagram:

Site-warehouse-location-aisle-shelf-rack-bin

1.     Product information management:
Path: Pim-setup-dimension group

This module having 3 dimension groups
1.Product Dimension Group
2.Storage Dimension Group
3.Tracking Dimension Group

1.Product Dimension Group:
1.configuration
2.size
3.colour
4.style

2.Storage Dimension Group:
1.site(M)
2.warehouse(M)
3.location
4.palletId

3.Tracking Dimension Group:
1.Batch Number(M)
2.serial number


Products 2 types:
1.      Products- no product dimension group
2.      Product master-product + storage + tracking dimension group

For purchase:
Product receipt-physiacl
Invoice-financial

For sales:
 Packing slip-physical
Invoice-financial

Item delivery:

FIFO- first in first out (date)
FEFO-first expiry first out
Weighted sum- sum of avg of all items of unit price

Witout releasing product, up to it is a general product with doesn’t having any transactions
If we release the product then that product or item having transactions related to financial and physical
When we relaseing the products we can give the company name






Friday, 26 July 2013

file handling in ax

Writing to a Text File
static void textFileWrite(Args _args)
{
TextBuffer tb = new TextBuffer();
;
tb.appendText(“Hello World!”);
tb.appendText(“\nWelcome to MIT”);
tb.appendText(“\nHyderabad”);
tb.toFile(“c:\\Sample.txt”);
}
Reading from a Text File
static void textFileRead(Args _args)
{
TextBuffer tb = new TextBuffer();
;
if(WinApi::fileExists(“c:\\Sample.txt”))
{
tb.fromFile(“c:\\Sample.txt”);
info(tb.getText());
}
else
{
info(“No file exists”);
}
}
Writing to a CSV File
static void cSVFileWrite(Args _args)
{
CommaIO commaIO;
Container readCon;
FileIOPermission fio;
FileDemo ct;
;
commaIO = new CommaIO(“c:\\FileDemo.csv”, “w”);
commaIO.outFieldDelimiter(“,”);
commaIO.outRecordDelimiter(“\r\n”);
if(commaIO)
{
while select ct
{
commaIO.write(ct.Id,ct.Name);
}
}
}
Reading from a CSV File
static void cSVFileRead(Args _args)
{
CommaIO commaIO;
Container readCon;
FileIOPermission fio;
FileDemo ct;
;
if(!WinAPI::fileExists(“c:\\FileDemo.csv”))
{
throw error(“File not available”);
}
fio = new FileIOPermission(“c:\\FileDemo.csv”, “r”);
fio.assert();
commaIO = new CommaIO(“c:\\FileDemo.csv”, “r”);
commaIO.inFieldDelimiter(“,”);
commaIO.inRecordDelimiter(“\r\n”);
if(commaIO)
{
while(CommaIO.status() == IO_Status::Ok)
{
readCon = commaIO.read();
if(conlen(readcon) > 0)
{
ct.Id = conpeek(readcon, 1);
ct.Name = conpeek(readcon, 2);
ct.insert();
}
}
}
}
Writing to a XML File
static void writeXML(Args _args)
{
XMLTextWriter xw;
FileDemo ct;
;
xw = XMLTextWriter::newFile(“c:\\FileDemo.xml”);
xw.writeStartDocument();
xw.writeStartElement(“Details”);
while select ct
{
xw.writeStartElement(“CustomerDetails”);
xw.writeElementString(“Id”,ct.Id);
xw.writeElementString(“Name”,ct.Name);
xw.writeEndElement();
}
xw.writeEndElement();
xw.writeEndDocument();
xw.close();
}
Reading from a XML File
static void readingXML(Args _args)
{
XMLDocument xmlDoc = XMLDocument::newFile(“c:\\FileDemo.xml”);
int i, nooftags;
;
nooftags = xmlDoc.getElementsByTagName(“CustomerDetails”).length();
for(i=0; i<nooftags; i++)
{
info(strfmt(“%1″, xmlDoc.getElementsByTagName(“Id”).item(i).text()));
info(strfmt(“%1″, xmlDoc.getElementsByTagName(“Name”).item(i).text()));
}
}
TableData_to_File
static void TableData_to_File(Args _args)
{
commaIO commaIO;
container readLine;
CustTable k;
FileIOPermission fio;
FileName nameOfTheFile = “c:\\anil.txt”; //csv
;
fio = new FileIOPermission(nameOfTheFile, ‘w’);// read – r, write – w, append – a
fio.assert(); // demand
commaIO = new commaIO(nameOfTheFile,’w');
commaIO.outFieldDelimiter(‘,’); // \t | // outFieldDelimiter
commaIo.outRecordDelimiter(‘\r\n’); // OutRecorDelimiter
commaIO.writeExp(["Accno", "AccountStatement", "CommissionGroup","DefaultDimention"]);
while select k
{
commaIO.writeExp([k.AccountNum,
k.AccountStatement,k.CommissionGroup,k.DefaultDimension]);
}
CodeAccessPermission::revertAssert();
}
TableDataFrom_File
static void TableDataFrom_File(Args _args)
{
commaIO commaIO;
container readLine;
Tab2 k;
FileIOPermission fio;
FileName nameOfTheFile = “c:\\anil.txt”; //csv
;
if (winapi::fileExists(nameOfTheFile) == false)
throw error(strfmt(“file %1 not found”, nameOfTheFile) );
fio = new FileIOPermission(nameOfTheFile, ‘r’);// read – r, write – w, append – a
fio.assert(); // demand
commaIO = new commaIO(nameOfTheFile,’r');
commaIO.inFieldDelimiter(‘,’); // \t – tab, | // outFieldDelimiter
commaIo.inRecordDelimiter(‘\r\n’); // OutRecorDelimiter – read line by line
ttsbegin;
if(commaIO)
{
while(commaIO.status() == IO_status::Ok)
{
readLine = commaIO.read(); //writeExp
if (conlen(readLine) > 1) // check whether there are values in the next line
{
k.Address = conpeek(readLine,1);
k.DName = conpeek(readLine, 2);
k.insert();
}
}
}
ttscommit;
CodeAccessPermission::revertAssert();
}