Difference between revisions of "Sponsored Development: EDI Fact Import/Export"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
m (Links)
m (edit tabbings)
Line 29: Line 29:
  
 
==== Outbound Processing ====
 
==== Outbound Processing ====
*From the document Invoice (Customer) [[Image:8-Invoice (Customer).jpg]]
+
*In the Invoice (Customer) window [[Image:8-Invoice (Customer).jpg]]
  
hit the "Submit EDI" button. "Submit EDI" button is active only after document is Completed.
+
*Press the '''Submit EDI''' button which  is active only after document is ''Completed''.
  
Result:[[Image:9-EDI Result.jpg]]
+
=====Successful EDI Submission=====
 +
[[Image:9-EDI Result.jpg]]
  
 
+
----
 
+
*Runs process that:
**Runs process that:
+
** Look up the DocumentType to see what "Doc Type" to use.
*** Look up the DocumentType to see what "Doc Type" to use.
+
** Look up the BPartner  
*** Look up the BPartner  
+
** Look up right "EDI Format", "EDI Processor" for BPartner and DocType.
*** Look up right "EDI Format", "EDI Processor" for BPartner and DocType.
+
** Read the EDI Format and the document lines to construct the EDI document.  
*** Read the EDI Format and the document lines to construct the EDI document.  
+
*** Get the data strings using ColumnID, and use Type to decide which separator to use.  
**** Get the data strings using ColumnID, and use Type to decide which separator to use.  
+
*** Order them by position.  
**** Order them by position.  
+
*** Truncate lengths, validate usage.
**** Truncate lengths, validate usage.
+
** Using the info from C_EDIProcessor submit the  EDI document.
*** Using the info from C_EDIProcessor submit the  EDI document.
+
  
 
====Inbound Processing====
 
====Inbound Processing====
** Use the scheduler to schedule a process that will poll according to the rules configured on C_EDIProcessor
+
* Use the scheduler to schedule a process that will poll according to the rules configured on C_EDIProcessor
** Look up the Business Partner and EDI_DocType to determine which format to use to parse the file and which document type to create.
+
* Look up the Business Partner and EDI_DocType to determine which format to use to parse the file and which document type to create.
*** EDI element ST01 stores EDI code.  Read this code and look it up in C_EDI_DocType.EDI_Code to return C_EDI_DocType_ID
+
** EDI element ST01 stores EDI code.  Read this code and look it up in C_EDI_DocType.EDI_Code to return C_EDI_DocType_ID
*** EDI element ISA06 stores Interchange Sender ID.  This represents a Business Partner.  Read this code and look it up in C_Bpartner.C_EDI_Sender to return C_BPartner_ID.
+
** EDI element ISA06 stores Interchange Sender ID.  This represents a Business Partner.  Read this code and look it up in C_Bpartner.C_EDI_Sender to return C_BPartner_ID.
*** Use C_EDI_DocType_ID and C_BPartner_ID to find the right C_BPartner_EDI record.  This will tell you which doctype (AD_DocType_ID) to create, and which format (C_EDI_Format_ID) to use to translate the file.
+
** Use C_EDI_DocType_ID and C_BPartner_ID to find the right C_BPartner_EDI record.  This will tell you which doctype (AD_DocType_ID) to create, and which format (C_EDI_Format_ID) to use to translate the file.
 
+
  
As an alternative, C_EDIProcessor could define a JMS queue to post to.
+
----
 +
*As an alternative, C_EDIProcessor could define a JMS queue to post to.
 
Then we could manage the movement of the data with ServiceMix.
 
Then we could manage the movement of the data with ServiceMix.
  
Line 63: Line 63:
 
==== Add Table: "C_EDI_DocType" ====
 
==== Add Table: "C_EDI_DocType" ====
 
[[Image:1-EDI Doc Type.jpg]]
 
[[Image:1-EDI Doc Type.jpg]]
**Fields:  C_EDI_DocType_ID; Value, Name, Description, Help, C_EDI_DocCode (String, used to match with EDI element ST01)
+
*Fields:  C_EDI_DocType_ID; Value, Name, Description, Help, C_EDI_DocCode (String, used to match with EDI element ST01)
**Samples: (850 PO, 810 Invoice)
+
*Samples: (850 PO, 810 Invoice)
  
 
==== Add to "Document Type" window ====
 
==== Add to "Document Type" window ====
 
[[Image:10-Document Type.jpg]]
 
[[Image:10-Document Type.jpg]]
**Field: C_EDIFormat_ID
+
*Field: C_EDIFormat_ID
  
 
====Add Table: "C_EDIFormat" ====
 
====Add Table: "C_EDIFormat" ====
 
[[Image:2-EDI Format.jpg]]
 
[[Image:2-EDI Format.jpg]]
**fields: C_EDIFormat_ID, EDI Format Name, Value, C_EDI_DocType_ID, AD_Table_ID, SegmentSeparator, FieldSeparator
+
*fields: C_EDIFormat_ID, EDI Format Name, Value, C_EDI_DocType_ID, AD_Table_ID, SegmentSeparator, FieldSeparator
  
 
====Add Table: "C_EDIFormat_Line" ====
 
====Add Table: "C_EDIFormat_Line" ====
 
[[Image:3-EDI Format Line.jpg]]
 
[[Image:3-EDI Format Line.jpg]]
**fields: C_EDIFormat_ID, Position, Value, Name, Comments, Type(Element, Segment)
+
*fields: C_EDIFormat_ID, Position, Value, Name, Comments, Type(Element, Segment)
 
   
 
   
 
====Add Table: "C_EDIFormat_LineElement" ====
 
====Add Table: "C_EDIFormat_LineElement" ====
 
[[Image:4-EDI Format Line Element_field.jpg]]
 
[[Image:4-EDI Format Line Element_field.jpg]]
**fields: C_EDIFormat_LineElement_ID, Position, Value, Name, IsMandatory, ElementType(Constant, Field), ConstValue, MinFieldLength
+
*fields: C_EDIFormat_LineElement_ID, Position, Value, Name, IsMandatory, ElementType(Constant, Field), ConstValue, MinFieldLength
  
 
====Add Table: "C_EDIProcessorType" ====
 
====Add Table: "C_EDIProcessorType" ====
 
[[Image:5-EDI Processor Type.jpg]]
 
[[Image:5-EDI Processor Type.jpg]]
 
This table makes flexible addition of new types in future.
 
This table makes flexible addition of new types in future.
**fields: Value(http, ftp, svn, cvs), JavaClass (this is class which is responsible to handle upload of EDI document)
+
*fields: Value(http, ftp, svn, cvs), JavaClass (this is class which is responsible to handle upload of EDI document)
  
 
====Add Table: "C_EDIProcessor" ====
 
====Add Table: "C_EDIProcessor" ====
 
[[Image:6-EDI Processor.jpg]]
 
[[Image:6-EDI Processor.jpg]]
**fields: Host, Account, Password Info, C_EDIProcessorType_ID
+
*fields: Host, Account, Password Info, C_EDIProcessorType_ID
  
 
====Add Table: "C_BPartner_EDI" ====
 
====Add Table: "C_BPartner_EDI" ====
 
[[Image:7-BPartner EDI.jpg]]
 
[[Image:7-BPartner EDI.jpg]]
**fields: C_BPartner_ID, C_EDIFormat_ID, Inbound(Y,N), C_EDIProcessor_ID, C_DocType_ID
+
*fields: C_BPartner_ID, C_EDIFormat_ID, Inbound(Y,N), C_EDIProcessor_ID, C_DocType_ID
  
 
== Links ==
 
== Links ==

Revision as of 19:06, 24 May 2009

License

GPL v2 - the same as Adempiere.

Project Team

Coordinator

BIT Software

Functional Specs

BIT Software


Developers

Testers

Sponsors

Status


Requirements

Outbound Processing

  • In the Invoice (Customer) window 8-Invoice (Customer).jpg
  • Press the Submit EDI button which is active only after document is Completed.
Successful EDI Submission

9-EDI Result.jpg


  • Runs process that:
    • Look up the DocumentType to see what "Doc Type" to use.
    • Look up the BPartner
    • Look up right "EDI Format", "EDI Processor" for BPartner and DocType.
    • Read the EDI Format and the document lines to construct the EDI document.
      • Get the data strings using ColumnID, and use Type to decide which separator to use.
      • Order them by position.
      • Truncate lengths, validate usage.
    • Using the info from C_EDIProcessor submit the EDI document.

Inbound Processing

  • Use the scheduler to schedule a process that will poll according to the rules configured on C_EDIProcessor
  • Look up the Business Partner and EDI_DocType to determine which format to use to parse the file and which document type to create.
    • EDI element ST01 stores EDI code. Read this code and look it up in C_EDI_DocType.EDI_Code to return C_EDI_DocType_ID
    • EDI element ISA06 stores Interchange Sender ID. This represents a Business Partner. Read this code and look it up in C_Bpartner.C_EDI_Sender to return C_BPartner_ID.
    • Use C_EDI_DocType_ID and C_BPartner_ID to find the right C_BPartner_EDI record. This will tell you which doctype (AD_DocType_ID) to create, and which format (C_EDI_Format_ID) to use to translate the file.

  • As an alternative, C_EDIProcessor could define a JMS queue to post to.

Then we could manage the movement of the data with ServiceMix.

Create new windows

0-Menu.jpg

Add Table: "C_EDI_DocType"

1-EDI Doc Type.jpg

  • Fields: C_EDI_DocType_ID; Value, Name, Description, Help, C_EDI_DocCode (String, used to match with EDI element ST01)
  • Samples: (850 PO, 810 Invoice)

Add to "Document Type" window

10-Document Type.jpg

  • Field: C_EDIFormat_ID

Add Table: "C_EDIFormat"

2-EDI Format.jpg

  • fields: C_EDIFormat_ID, EDI Format Name, Value, C_EDI_DocType_ID, AD_Table_ID, SegmentSeparator, FieldSeparator

Add Table: "C_EDIFormat_Line"

3-EDI Format Line.jpg

  • fields: C_EDIFormat_ID, Position, Value, Name, Comments, Type(Element, Segment)

Add Table: "C_EDIFormat_LineElement"

4-EDI Format Line Element field.jpg

  • fields: C_EDIFormat_LineElement_ID, Position, Value, Name, IsMandatory, ElementType(Constant, Field), ConstValue, MinFieldLength

Add Table: "C_EDIProcessorType"

5-EDI Processor Type.jpg This table makes flexible addition of new types in future.

  • fields: Value(http, ftp, svn, cvs), JavaClass (this is class which is responsible to handle upload of EDI document)

Add Table: "C_EDIProcessor"

6-EDI Processor.jpg

  • fields: Host, Account, Password Info, C_EDIProcessorType_ID

Add Table: "C_BPartner_EDI"

7-BPartner EDI.jpg

  • fields: C_BPartner_ID, C_EDIFormat_ID, Inbound(Y,N), C_EDIProcessor_ID, C_DocType_ID

Links

  • sf.net post - OpenBravo weak side: Import EDI File is developed only for a concrete import order case.