Inter-company Documents Module Extension Module Webinar 29 th of October 2009.
-
Upload
rafe-eaton -
Category
Documents
-
view
214 -
download
0
Transcript of Inter-company Documents Module Extension Module Webinar 29 th of October 2009.
Inter-company Documents Module
Extension Module Webinar
29th of October 2009
Page 2Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Agenda
Functionality and Demo 10 min.
Process and Tools 10 min.
Development Technique 10 min.
Q & A 30 min.
Page 3Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Agenda
Functionality and Demo
Process and Tools
Development Technique
Q & A
Page 4Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Goal: Automate the creation of matching documents for transactions between
organizations of the same business group.
Functional Highlights
Functional Concepts:• Different Inter-company documents (orders, invoices, new once)• Bi-directional flows (sales documents could trigger purchase once
and vice versa) and drill down• Inter-company documents rules
Solution Approach:
• Deliver as a Module
• Extension Points Feature
Intercompany Documents
Page 5Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
DEMO
Functional HighlightsIntercompany Documents
Page 6Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Agenda
Functionality and Demo
Process and Tools
Development Technique
Q & A
Page 7Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Functional
Design MODULEMODULE
Process and Tools: from requirements to code
Technial
Design
Test
Plan
User
Manual
Page 8Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
DEMO
Process and Tools: from requirements to code
Page 10Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Functionality and Demo
Process and Tools
Development Technique
Q & A
Agenda
Page 11Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Technique: What is Extension Point?
In general terms:
A way to extend OB (core) procedures (without modifying them)
Page 12Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Technique: What is Extension Point?
A bit more technical:
Trigger that can be set up in any PL Procedure and that can be activated from the extension module to call PL Procedures included in it
Core
Module
Module N
Module M
Page 13Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Technique: Declaration of Extension Point
Extension Points window in Application DictionaryApplication Dictionary || Setup || Extension Points || Extension Point
Description should include the list of parameters that will be available to the external procedures
Page 14Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Technique: How to use Extension Point?
Code external PL procedure following these rules:
The procedure only has one input parameter
Has to retrieve needed parameters that are available from “exchange” table
It has to update the output parameters in the “exchange” table
Possible exceptions are just raised
Subscribe Module PL procedure to the Extension Point
Declare the name of the Module procedure in ADAD || Setup || Extension Points || Extension Point | Procedures
Page 15Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Approach
--1 Only one input paramater with the instance of the extension point executioncreate or replace PROCEDURE INTERCO_CREATE_ORDER(p_ep_instance IN VARCHAR2)...BEGIN--2 Retrieve the parameters using Cur_Params cursorFOR Cur_Params IN (SELECT *FROM ad_ep_instance_paraWHERE ad_ep_instance_id = p_ep_instance) LOOPIF (cur_params.parametername LIKE 'DocAction') THENp_docaction := Cur_Params.p_string;...END LOOP;
p_message:='@INTERCO_ordCreated@' || v_DocumentNo;--3 Update the message output parameter to show the document number of the generated order.UPDATE ad_ep_instance_paraSET p_text = (CASE WHEN p_text IS NULL OR p_text='' THEN p_message ELSE TO_CHAR(p_text) || '<BR>'|| p_message END)WHERE ad_ep_instance_id = p_ep_instanceAND parametername LIKE 'Message';
--4 All exceptions all just raisedEXCEPTIONWHEN OTHERS THENDBMS_OUTPUT.PUT_LINE('INTERCO_CREATE_ORDER exception') ;RAISE;
END INTERCO_CREATE_ORDER;
Inter-company example of a procedure called by an Extension Point
Page 16Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Approach
--1 Only one input paramater with the instance of the extension point executioncreate or replace PROCEDURE INTERCO_CREATE_ORDER(p_ep_instance IN VARCHAR2)...BEGIN--2 Retrieve the parameters using Cur_Params cursorFOR Cur_Params IN (SELECT *FROM ad_ep_instance_paraWHERE ad_ep_instance_id = p_ep_instance) LOOPIF (cur_params.parametername LIKE 'DocAction') THENp_docaction := Cur_Params.p_string;...END LOOP;
p_message:='@INTERCO_ordCreated@' || v_DocumentNo;--3 Update the message output parameter to show the document number of the generated order.UPDATE ad_ep_instance_paraSET p_text = (CASE WHEN p_text IS NULL OR p_text='' THEN p_message ELSE TO_CHAR(p_text) || '<BR>'|| p_message END)WHERE ad_ep_instance_id = p_ep_instanceAND parametername LIKE 'Message';
--4 All exceptions all just raisedEXCEPTIONWHEN OTHERS THENDBMS_OUTPUT.PUT_LINE('INTERCO_CREATE_ORDER exception') ;RAISE;
END INTERCO_CREATE_ORDER;
Inter-company example of a procedure called by an Extension Point
Page 17Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Approach
--1 Only one input paramater with theinstance of the extension point executioncreate or replace PROCEDURE INTERCO_CREATE_ORDER(p_ep_instance IN VARCHAR2)...BEGIN--2 Retrieve the parameters using Cur_Params cursorFOR Cur_Params IN (SELECT *FROM ad_ep_instance_paraWHERE ad_ep_instance_id = p_ep_instance) LOOPIF (cur_params.parametername LIKE 'DocAction') THENp_docaction := Cur_Params.p_string;...END LOOP;
p_message:='@INTERCO_ordCreated@' || v_DocumentNo;--3 Update the message output parameter to show the document number of the generated order.UPDATE ad_ep_instance_paraSET p_text = (CASE WHEN p_text IS NULL OR p_text='' THEN p_message ELSE TO_CHAR(p_text) || '<BR>'|| p_message END)WHERE ad_ep_instance_id = p_ep_instanceAND parametername LIKE 'Message';
--4 All exceptions all just raisedEXCEPTIONWHEN OTHERS THENDBMS_OUTPUT.PUT_LINE('INTERCO_CREATE_ORDER exception') ;RAISE;
END INTERCO_CREATE_ORDER;
Inter-company example of a procedure called by an Extension Point
Page 18Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Approach
--1 Only one input paramater with the instance of the extension point executioncreate or replace PROCEDURE INTERCO_CREATE_ORDER(p_ep_instance IN VARCHAR2)...BEGIN--2 Retrieve the parameters using Cur_Params cursorFOR Cur_Params IN (SELECT *FROM ad_ep_instance_paraWHERE ad_ep_instance_id = p_ep_instance) LOOPIF (cur_params.parametername LIKE 'DocAction') THENp_docaction := Cur_Params.p_string;...END LOOP;
p_message:='@INTERCO_ordCreated@' || v_DocumentNo;--3 Update the message output parameter to show the document number of the generated order.UPDATE ad_ep_instance_paraSET p_text = (CASE WHEN p_text IS NULL OR p_text='' THEN p_message ELSE TO_CHAR(p_text) || '<BR>'|| p_message END)WHERE ad_ep_instance_id = p_ep_instanceAND parametername LIKE 'Message';
--4 All exceptions all just raisedEXCEPTIONWHEN OTHERS THENDBMS_OUTPUT.PUT_LINE('INTERCO_CREATE_ORDER exception') ;RAISE;
END INTERCO_CREATE_ORDER;
Inter-company example of a procedure called by an Extension Point
Page 19Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Approach
--1 Only one input paramater with the instance of the extension point executioncreate or replace PROCEDURE INTERCO_CREATE_ORDER(p_ep_instance IN VARCHAR2)...BEGIN--2 Retrieve the parameters using Cur_Params cursorFOR Cur_Params IN (SELECT *FROM ad_ep_instance_paraWHERE ad_ep_instance_id = p_ep_instance) LOOPIF (cur_params.parametername LIKE 'DocAction') THENp_docaction := Cur_Params.p_string;...END LOOP;
p_message:='@INTERCO_ordCreated@' || v_DocumentNo;--3 Update the message output parameter to show the document number of the generated order.UPDATE ad_ep_instance_paraSET p_text = (CASE WHEN p_text IS NULL OR p_text='' THEN p_message ELSE TO_CHAR(p_text) || '<BR>'|| p_message END)WHERE ad_ep_instance_id = p_ep_instanceAND parametername LIKE 'Message';
--4 All exceptions all just raisedEXCEPTIONWHEN OTHERS THENDBMS_OUTPUT.PUT_LINE('INTERCO_CREATE_ORDER exception') ;RAISE;
END INTERCO_CREATE_ORDER;
Inter-company example of a procedure called by an Extension Point
Page 20Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Technique: Extension Point Summary
This new functionality bring us an improved flexibility on Processes, Orders and Invoice completion that have been hard to customize in previous versions of Openbravo ERP.
Now available:Post process for Orders /C_Order_Post – Finish Process/ Post process for Invoices /C_Invoice_Post – Finish Process./
Page 21Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Development Technique: Spread Extension Point
Read our blog at: http://obdeving.wordpress.com/2009/10/27/extending-existing-procedures-at-openbravo/
Ideas wanted. • Developers forums,• Openbravo developers mailing list • Issue tracker
Page 22Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
Functionality and Demo
Wrap-Up
Process and Tools
Development Technique
Page 23Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team
http://forge.openbravo.com/projects/intercompanyinvoicing
http://wiki.openbravo.com/wiki/Functional_Specification_Style_Guide
http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide
Next webinar:Advanced Payments ModuleNovember 12th 4-5 PM (CET)
Q&A
Page 24Intercompany Documents Module Webinar-Openbravo, ERP Engineering Development Team