Sunday, 10 June 2012
SAP Business One and Perl
Do you like this story?
Do you find SAP Business One scheduled reports boring and difficult to use?
Management find it difficult to use SAP Business One Scheduled reports?
You thought if you could convert those reports into custom excel sheet and send it to users separately....
Yes you have come to the right place...
So to begin ... this is what you need...
1) A windows machine with Active perl (should work on linux also, havent tried yet)
2) Download following perl modules from CPAN
DBD::ODBC;
Spreadsheet::WriteExcel;
Net::SMTP;
MIME::Lite;
This is how you use command line utility to do it. Open command prompt and type "perl -MCPAN -e shell". Afterwards type "install DBD::ODBC" etc.
3) Once you have downloaded and installed above modules, connect to the database
my $dsn = join "", (
"dbi:ODBC:",
"Driver={SQL Server};",
"Server=[YOUR SERVER IP];",
"UID=sa;",
"PWD=[YOUR PASSWORD];",
"Database=[DATABASE NAME]",
);
Management find it difficult to use SAP Business One Scheduled reports?
You thought if you could convert those reports into custom excel sheet and send it to users separately....
Yes you have come to the right place...
So to begin ... this is what you need...
1) A windows machine with Active perl (should work on linux also, havent tried yet)
2) Download following perl modules from CPAN
DBD::ODBC;
Spreadsheet::WriteExcel;
Net::SMTP;
MIME::Lite;
This is how you use command line utility to do it. Open command prompt and type "perl -MCPAN -e shell". Afterwards type "install DBD::ODBC" etc.
3) Once you have downloaded and installed above modules, connect to the database
my $dsn = join "", (
"dbi:ODBC:",
"Driver={SQL Server};",
"Server=[YOUR SERVER IP];",
"UID=sa;",
"PWD=[YOUR PASSWORD];",
"Database=[DATABASE NAME]",
);
If it gets connected, means you are all set to retrieve all sorts of reports from SAP.
Refer to other posts to retrieve the data, write to excel file and email to respective people.
Subscribe to:
Post Comments (Atom)
0 Responses to “SAP Business One and Perl”
Post a Comment