Definitions of Conversion Setups (ecedi5115s000)

Use this session to record the fields, sequence, and options for the conversion of outgoing messages.

Note: This session is protected so that it cannot run simultaneously with sessions that interfere with it or with which it can interfere.

Field Information

Organization

organization

Description

The description or name of the code.

EDI Message

supported EDI messages

Description

The description or name of the code.

Direction

The direction of the EDI message.

Field Type

The ASCII file format.

Note: A conversion setup can be created for files in which the fields areseparated by a field separator, or that have a fixed length.
Conversion Setup Code

The code that identifies the conversion setup.

Description

The description or name of the code.

Destination

The source of the field in an outgoing message, as defined in the Conversion Setups (Relationships) (ecedi5112m000) session.

Field

The name of the field, for example, tdsls400.ofbp. For outgoing conversion setups, you can also use constants. Constants must start with double quotation marks ("). All text between the quotation marks is placed in the message.

Note: If you want to use double quotation marks inside the text string, you must enter additional quotation marks. For example, the output for ""ABC"" is "ABC".
Field

The description or name of the code.

Sequence Number

The sequence number of the field. The same field can be included more than once. If the field appears only once within the conversion setups, you can set this field to 0 or 1. If the field appears more than once in the conversion setup definition, the sequence number can be increased by an increment of 1 for each occurrence of the field within the conversion setup definition.

Processing Sequence

The sequence in which the field will be processed.

Level

The level defined in the Conversion Setups (Relationships) (ecedi5112m000) session.

Description

The description or name of the code.

Start Position

The position of the field in the line.

Note: If the Field Type field in the Networks (ecedi0120s000) session is Fixed Length, you must enter the physical starting position of the field. If the Field Type field in the Networks (ecedi0120s000) session is Delimited, you must enter the field number, starting with number 1.
Element

The index element for an index field or the start position in a string for a string variable.

Index field example

In the case of a string variable, the start position in the string can be specified. This field, in combination with the Length field, allows you to specify a substring (for example: for string "ABCDEFGHIJKLMNOP", the value 3 with a length of 5 produces the following output: "CDEFG").

Field tdsls400.disc (standard depth = 5 levels)
Level 1 10
  2 15
  3 8
  4 5
  5 7

The value 0 outputs the entire field: 010015008005007. This option is only used for internal communication. The values 1 and 3 produce only the following elements: 010 and 008. This output means that the field can also be used for external communication.

Length

The physical length of the field.

Read Next Record

If this check box is selected, a new record will be read at this level for incoming messages, and a new record of the table that belongs to the field will be read for outgoing messages. If this check box is cleared, new records will not be read, but the current records remain active.

Note: This field indicates whether a new record must be read in order to process the contents of the field. Based on the value of this field, you can determine when a new line is ready to be read from the same file.
Iterative Level

The sequence number that indicates where the cursor must move after processing the field. This field is only used if this record is for the last field of an iterative level or for the last field of the conversion setup.

Example

For example: You want to enter a text field that contains data from an ASCII file in an order header, that is performed iteratively. Once the last text field is filled, the cursor is returned to the field with sequence number 3, by using the Sequence Number field. The key and three text fields are included in each line of level 2.

Field Level Sequence Number Iterative Level
Order No. 1 1  
Reference 1 2  
Text Field 2 3  
Text Field 2 4  
Text Field 2 5 3
Key does not Match

The sequence number that indicates where the cursor must move if the key is not valid or the key changes. This field only needs to be filled in if the New record is Yes.

Example 1 - Iterative processing

After all text fields have been processed, the customer number is read. Level 2 is iterative.

Field Level Sequence in Back Back New
Iter. Key record        
Order No. 1 1      
Reference 1 2      
Text Field 2 3   6 yes
Text Field 2 4      
Text Field 2 5 3    
Customer 1 6      

Example 2 - Sequential processing

When all order lines have been filled (level 2) a new order can be introduced (level 1).

Field Level Sequence in Back Back New
Iter. Key record        
Order No. 1 1     yes
Reference 1 2      
Customer 1 3      
Item 2 4   1 yes
Quantity 2 5      
Delivery Date 2 6 4    
Write Record

If this check box is selected, a record must be added to the relevant table after a field for an incoming message has been processed, depending on the result of the output expression. The destination of the field (overhead, header, or line) determines the table where messages will be saved.

Example 1

Field Destination Write record
Order No. header  
Reference header  
Customer header yes
Item line  
Quantity line  
Delivery Date line yes

Fields processed after a write action for the same destination are not added to the relevant table. You cannot start several write actions for the same record (for example: order line). Due to the hierarchy of destinations, LN checks whether or not all higher destinations have been written. If the higher destination has not been written, the relevant destinations are written before the specified destination is written. The hierarchy is:

  • Overhead
  • Header
  • Line

Example 2

Field Destination Write record
Order No. header  
Reference header  
Customer header  
Item line  
Quantity line  
Delivery Date line yes

Because no header has been written yet, the header is written first, followed by the line. If there is no overhead, the line is written before the header.

Evaluation

The code for the evaluation expression. This expression determines whether or not the field is included in the message. The expression is logical and it results in true or false. The default value of this field is 1, true. The expression is carried out before placing the field in the message. In other words, the associated reading and writing actions are always carried out. Actually, the expression is an equation. For example, for the Warehouse field on the purchase order, the expression can be: strip((tdpur400.cwar) <> "" This expression is true if the warehouse field is not filled.

The following lists the operators in order of priority:

  • ()
  • - (reverse sign)
  • * / \
  • &
  • + - (add subtract)
  • = > < <> <= >=
  • NOT
  • AND
  • OR
  • ?:

An expression can contain the following constants:

PI 3.1415926535..
TRUE Always true.
FALSE Always false.

An expression can contain functions.

Numerical ranges can also be used: a IN [10,20] is equal to.a>=20 AND a<=30 a IN [10,20][30,40][50,60] is equal to a>=10 AND a<=20 OR a>=30 AND a<=40 OR a>=50 AND a<=60

Arithmetical Example

() brackets (priority)  
- reverses sign (requires an argument) a=-b
* multiplication 3*5=15
/ division 6/2=3
\ remainder after division 8\3=2
& linking up strings "A"&"B"="AB"
+ addition 2+3=5
- subtraction 3-2=1

Relational (for comparison) Example

= or EQ is equal to 3=5 is false
<> or NE is unequal to 3<>5 is true
> or GT is greater than 3>5 is false
< or LT is less than 3<5 is true
>= or GE is greater than or equal to 3>=5 is false
<= or LE is less than or equal to 3<=5 is true

Logical Example

AND and (both are true) a=b AND b=c
OR or (one of the two is true) a=b OR a=c
NOT not (is not true) NOT (a=b AND b=c)

Others:

condition?true:false if <condition> is true, <true> is executed, otherwise <false> (always place brackets around <condition>, because this has the lowest priority)

Functions

abs(N) Produces the absolute value of N
acos(N) Produces the angle (in radials) of which N is the cosine.
asc(S) Produces the total of the ASCII values of the characters in S, asc("ABC")=65+66+67=198
asin(N) Produces the angle (in radials) of which N is the sine.
atan(N) Produces the angle (in radials) of which N is the tangent.
chr(N) Produces the character of which N is the ASCII value, chr(65)="A"
cos(N) Produces the cosine for angle N (in radials).
cosh(N) Produces the hyperbolic cosine for angle N (in radials)
date() Produces the current day number.
date(J,M,D) Produces the day number in the date represented by D, M and J.
exp(N) Produces 2.718128.. to the power of N.
int(N) Produces the integer of N (rounded down).
len(S) Produces the number of characters in S, len("ABC")=3.
log(N) Produces the natural logarithm of N.
log10(N) Produces the 10-logarithm of N.
max(N,M) Produces the greater value of N or M.
min(N,M) Produces the lesser value of N or M.
pos(S,T) Produces the first position where T occurs in S, pos("ABCDEFEF","EF")=5.
pow(N,M) Produces N to the power of M.
round(N,D,M) Produces the value of N rounded to D decimals. If M=0, N is rounded down, round(1.99,2,0)=1.00. If M=1, N is rounded off normally, round(1.49,2,1)=1.00 and round(1.50,2,1)=2.00. If M=2, N is rounded up, round(1.01,2,2)=2.00.
rpos(S,T) Produces the last position where T occurs in S, rpos("ABCDEFEF,"EF")=7.
sin(N) Produces the sine of angle N (in radials).
sinh(N) Produces the hyperbolic sine of angle N (in radials).
sqrt(N) Produces the non-negative square root of N.
str(N) Creates a string of N, str(1.04)="1.04"
strip(S) Returns S without the spaces following it.
tan(N) Produces the tangent of angle N (in radials).
tanh(N) Produces the hyperbolic tangent of angle N (in radials).
time() Produces the current time in UUMM format.
val(S) Produces the numerical value of S, val("1.04")=1.04.
Description

The description or name of the code.

Assignment

The code for the assignment expression. The result of the expression is written to the ASCII file (outgoing messages), which is updated into the LN application (incoming messages). For example, if you want to set the Planned Delivery Date to a value two days prior to the Planned Receipt Date, you can assign the following assignment expression to the Planned Delivery Date field: tdsls400.prdt - 2.

Note: Any table fields referenced in an assignment expression must be processed before the field to which that assignment expression is assigned. The field referenced in the assignment expression must have a lower processing sequence, as defined in the conversion setup definitions. For example, in the preceding example, field tdsls400.prdt must have a lower processing sequence than field tdsls400.ddat, as defined in the conversion setup definitions.
Conversion Table

The conversion table used to convert the field.

Action when Conversion Table Not Found

The action to be taken if an error occurs during the conversion of outgoing messages. An error can occur because the field is not found in the conversion table.

Note: The value selected must be supported by the processing sessions.
Text Segments

The maximum number of text segments in a text field.

Note: Texts in a message have a special structure that requires separate processing because each text consists of a number of segments, each made up of a number of fields.
Maximum Number of Text Fields per Text Segment

The maximum number of fields in a text segment.

Note: Texts in a message have a special structure that requires separate processing because each text consists of a number of segments, each made up of a number of fields.
Start Position Qualifier

The starting position of the first qualifier. Some code conversions in ERP EDI require a code ID. Code IDs are qualifiers used in code conversions that allow you to convert additional data specifications and are transferred in the first qualifier position of the conversion setup definitions.

Note: If the Field Type field in the Networks (ecedi0120s000) session is Fixed Length, you must enter the physical starting position of the field. If the Field Type field in the Networks (ecedi0120s000) session is Delimited, you must enter the field number, starting with number 1.
Qualifier Length

The physical length of the qualifier.

Note: This value can only be entered if the field type is Fixed Length, as defined in the EDI Parameters (ecedi0100s000) session.
Default Qualifier

The value to be used if no qualifier is used in the message.

Note: If you choose to convert outgoing items with the Item Codes by Item Code System table, the value for the Item Code System field can be entered here. You can use the Item Code IDs table to convert the value of this qualifier to the value used in the message. The value entered here can be overruled by filling in the Item Code System field in the EDI Messages Supported by Business Partner (ecedi0111s000) session.
Conversion Table

The conversion table used to convert the qualifier.

Action when Conversion Table Not Found

The action to be taken if an error occurs during the conversion of outgoing messages. An error can occur because the qualifier is not found in the conversion table.

Field

The mapping information for this descriptive field and the corresponding data element in the EDI message. This descriptive field is used only for informational and reporting purposes.

Qualifier 1

The mapping information for the first qualifier and the corresponding data element in the EDI message.

Qualifier 2

The mapping information for the second qualifier and the corresponding data element in the EDI message.