Your company's business document processing for the trading partner agreement with Company C are as follows.
Mapping Worksheet: Commercial Payments (UN/EDIFACT PAYMUL) Inbound
Header Record
Description | Data Type | Length | Group source | Source | Logic |
---|---|---|---|---|---|
3. Record ID | CH | 2 | Forced to H F in ADF | ||
4. Application ID | CH | 6 |
Forced to REMFAC Increment accumulator T0 |
||
5. Code identifier | CH | 1 | Forced to A | ||
6. Transmitting bank account number | CH | 23 | 6 | Forced to AFII - C078/3194 | If FII/3035=OR |
7. Transmission date | CH | 8 | 0 | DTM - C507/2379 | If C507/2005 = 137 |
8. Transmission time | CH | 6 | ZERO | ||
9. No ordre remise | CH | 10 | ZERO | ||
CH | 1 | Not used | |||
CH | 11 | ||||
10. Currency | CH | 3 | 5 | MOA - C516/6345 | If MOA - C516/5025=9 |
11. Reference Number | CH | 16 | 4 | RFF - C506/1154 | If RFF - C506/1153 = AEK |
12. Reserved | CH | 329 |
Supplier Record
Description | Data Type | Length | Group source | Source | Logic |
---|---|---|---|---|---|
13. Record ID | CH | 2 | Forced with FO in ADF | ||
14. SIRET number of the supplier | CH | 14 | 13 | NAD - C082/3039 |
NAD/3035=PE If exists else use NAD/3035=BE |
15. VAT Code of the supplier | CH | 20 | Not filled | ||
16. Supplier number account number | CH | 32 | 13 | NAD-C080/3036 (truncated to 32 char.) |
NAD/3035=PE If exists else use NAD/3035=BE |
17. Address line 1 | CH | 32 | 13 | NAD-C080/3036 (truncated to 32 char.) |
NAD/3035=PE If exists else use NAD/3035=BE |
18. Address line 2 | CH | 32 | 13 | NAD-C059/3042 occur. 1 (truncated to 32 char.) |
NAD/3035=PE If exists else use NAD/3035=BE |
19. Address line 3 | CH | 32 | 13 | NAD-C059/3042 occur. 2 (truncated to 32 char.) |
NAD/3035=PE If exists else use NAD/3035=BE |
20. Address line 4 | CH | 32 | 13 | NAD-C059/3042 occur. 3 (truncated to 32 char.) |
NAD/3035=PE If exists else use NAD/3035=BE |
21. Address line 5 | CH | 32 | 13 | NAD-C059/3042 occur. 4 (truncated to 32 char.) |
NAD/3035=PE If exists else use NAD/3035=BE |
22. Address line line 6 = 23. Postal code 24. City |
CH CH |
9 23 |
13 |
NAD-3251(Postal code) + NAD-3164(City) |
NAD/3035=PE If exists else use NAD/3035=BE |
25. Reserved | CH | 23 | |||
26. Method of payment | CH | 3 | Forced with COM | ||
27. Prepayment prohibited | CH | 1 | Forced with N | ||
28. Action for payment | CH | 1 | 11 |
'I' 'P' else 'T' |
NAD/3035=PE or BE If PAI C534/4461 = Z7 and INP-C522/4401=ZZB If PAI C534/4461 = Z7 and INP-C522/4401=ZZA or PAI/4461 = Z7 seul (<-> PAI/4461 = Z8) |
29. Reserved | CH | 12 | |||
30. Reserved | CH | 6 | |||
31. Reserved | CH | 32 | |||
32. Country code | CH | 3 | 13 | NAD-3207 |
NAD/3035=PE If exists else use NAD/3035=BE |
33. Telephone number | CH | 10 | 13 | COM-C076/3148 |
NAD/3035=PE If exists else use NAD/3035=BE and If COM/3155=TE |
34. Can proposal be sent by fax? | CH | 1 | 13 | 'Y' Else 'N' |
NAD/3035=PE If exists else use NAD/3035=BE and If COM/3155=FX |
35. Fax number | CH | 10 | 13 | COM-C076/3148 |
NAD/3035=PE If exists else use NAD/3035=BE and If COM/3155=FX |
36. Can proposal be sent e-mail? | CH | 1 | 13 | 'Y' |
NAD/3035=PE If exists else use NAD/3035=BE and If COM/3155=EM |
37. E-mail address | CH | 50 | 13 | COM-C076/3148 Substring "(at)" must be replaced by @ |
NAD/3035=PE If exists else use NAD/3035=BE and If COM/3155=EM |
38. Beneficiary's account number | CH | 34 | 12 | C078/3194 | If FII/3035=BF |
39. Beneficiary's bank name | CH | 11 | 12 | C078/3433 | If FII/3035=BF (check if needed for phase 1. Not managed for VMB in phase 1) |
40. Bank's country code | CH | 3 | 12 | C078/3207 | If FII/3035=BF (check if needed for phase 1. Not managed for VMB in phase 1) |
41. Beneficiary's contact | CH | 35 | 12 | CTA-C056/3412 |
NAD/3035=PE If exists else use NAD/3035=BE If CTA/3139 = IC |
Beneficiary Record (Non-financial)
Description | Data Type | Length | Group source | Source | Logic |
---|---|---|---|---|---|
42. Record ID | CH | 2 | Forced with BE in ADF |
If NAD/3035=PE exists Else use NAD/3035=BE |
|
43. Beneficiary Identification | CH | 35 | 13 | NAD - C082/3039 |
If NAD/3035=PE exists Else use NAD/3035=BE |
44. Address line 1 | CH | 32 | 13 | NAD-C080/3036 (truncated to 32 char.) |
If NAD/3035=PE exists Else use NAD/3035=BE |
45. Address line 2 | CH | 32 | 13 | NAD-C059/3042 occur. 1 (truncated to 32 char.) |
If NAD/3035=PE exists Else use NAD/3035=BE |
46. Address line 3 | CH | 32 | 13 | NAD-C059/3042 occur. 2 (truncated to 32 char.) |
If NAD/3035=PE exists Else use NAD/3035=BE |
47. Address line 4 | CH | 32 | 13 | NAD-C059/3042 occur. 3 (truncated to 32 char.) |
If NAD/3035=PE exists Else use NAD/3035=BE |
48. Address line 5 | CH | 32 | 13 | NAD-C059/3042 occur. 4 (truncated to 32 char.) |
If NAD/3035=PE exists Else use NAD/3035=BE |
49. Address line 6 = 50. Postal code 51. City |
CH CH |
9 23 |
13 |
NAD-3251(Postal code) + NAD- NAD-3251(Postal code) + NAD-3164(City) |
NAD/3035=PE exists Else use NAD/3035=BE |
52. Country code | CH | 3 | 13 | NAD-3207 |
If NAD/3035=PE exists Else use NAD/3035=BE |
53. Employee ID | CH | 35 | 13 | CTA-C056/3412 |
If NAD/3035=OY PE exists à NAD/3035 = BE and 3139 = IC |
54. Telephone number | CH | 20 | 13 | COM-C076/3148 |
If NAD/3035=PE exists Else use NAD/3035=BE and If COM/3155=TE |
55. Fax number | CH | 20 | 13 | COM-C076/3148 |
If NAD/3035=PE exists Else use NAD/3035 = BE and If COM/3155=FX |
56. Email address | CH | 50 | 13 |
COM-C076/3148 Substring "(at)" must be replaced by @ |
If NAD/3035=PE exists Else use NAD/3035 = BE and If COM/3155=EM |
Client Transfer Record
Description | Data Type | Length | Group source | Source | Logic |
---|---|---|---|---|---|
57. Record ID | CH | 2 | Forced with 'DO' in ADF |
If NAD/3035=OY exists |
|
58. Client Identification | CH | 35 | 13 | NAD - C082/3039 |
If NAD/3035=OY exists |
59. Address line 1 (name of order party) | CH | 32 | 13 | NAD-C080/3036 (truncated to 32 char.) |
If NAD/3035=OY exists |
60. Address line 2 | CH | 32 | 13 | NAD-C059/3042 occur. 1 (truncated to 32 char.) |
If NAD/3035=OY exists |
61. Address line 3 | CH | 32 | 13 | NAD-C059/3042 occur. 2 (truncated to 32 char.) |
If NAD/3035=OY exists |
62. Address line 4 | CH | 32 | 13 | NAD-C059/3042 occur. 3 (truncated to 32 char.) |
If NAD/3035=OY exists |
63. Address line 5 | CH | 32 | 13 | NAD-C059/3042 occur. 4 (truncated to 32 char.) |
If NAD/3035=OY exists |
64. Address line 6 = 65. Postal code 66. City |
CH CH |
9 23 |
13 |
NAD-3251(Postal code) + NAD-3164(City) |
NAD/3035=OY exists |
67. Country code | CH | 3 | 13 | NAD-3207 |
If NAD/3035=OY exists |
68. Correspondant name | CH | 35 | 13 | CTA-C056/3412 |
If NAD/3035=OY exists and 3139 = IC |
69. Telephone number | CH | 20 | 13 | COM-C076/3148 |
If NAD/3035=OY and If COM/3155=TE |
70. Fax number | CH | 20 | 13 | COM-C076/3148 |
If NAD/3035=OY and If COM/3155=FX |
71. Email address | CH | 50 | 13 | COM-C076/3148 Substring "(at)" must be replaced by @ |
If NAD/3035=OY and If COM/3155=EM |
Expiry Record
Description | Data Type | Length | Group source | Source | Logic |
---|---|---|---|---|---|
Record ID | CH | 2 | Forced with EC in ADF | ||
72. Client reference number | CH | 10 | Informed automatically by VMB | ||
73. Due date | CH | 8 | 4 |
(Same as what was put in the FO record) 'I' 'P' Else 'T' |
C507/2005=203 |
74. Action for payment | CH | 1 | 13 |
NAD/3035=PE or BE If PAI C534/4461 = Z7 and INP-C522/4401=ZZB If PAI C534/4461 = Z7 and INP-C522/4401=ZZA or PAI/4461 = Z7 only (<-> PAI/4461 = Z8) |
|
75. Reserved | CH | 12 | 13 | ||
76. Reserved | CH | 6 | 13 | ||
77. Method of payment | CH | 3 | 13 | Forced with COM | |
78. Bank account to be charged | CH | 23 | 13 | Not filled | |
79. Bank account for commissions | CH | 23 | 13 | Not filled | |
80. Bank account to be credited | CH | 23 | 13 | Not filled | |
81. Currency | CH | 3 | 11 | MOA - C516/6345 |
If C516/5025=9 |
82. Customer reference number | CH | 12 | 11 | RFF - C506/1154 |
RFF C506/1153=CR |
83. Payment reference number | CH | 12 | 11 | RFF - C506/1154 |
RFF C506/1153=PQ |
Branch Record
Description | Data Type | Length | Group source | Source | Logic |
---|---|---|---|---|---|
84. Record ID | CH | 2 | 17 | Forced with FI in ADF | |
85. Client Identification | CH | 35 | 17 | NAD - C082/3039 |
If NAD/3035=BY and not SG13/3035=OY |
86. Address line 1 (name of order party) | CH | 32 | 17 | NAD-C080/3036 (truncated to 32 char.) |
If NAD/3035=BY and not SG13/3035=OY |
87. Address line 2 | CH | 32 | 17 | NAD-C059/3042 occur. 1 (truncated to 32 char.) |
If NAD/3035=BY and not SG13/3035=OY |
88. Address line 3 | CH | 32 | 17 | NAD-C059/3042 occur. 2 (truncated to 32 char.) |
If NAD/3035=BY and not SG13/3035=OY |
89. Address line 4 | CH | 32 | 17 | NAD-C059/3042 occur. 3 (truncated to 32 char.) |
If NAD/3035=BY and not SG13/3035=OY |
90. Address line 5 | CH | 32 | 17 | NAD-C059/3042 occur. 4 (truncated to 32 char.) |
If NAD/3035=BY and not SG13/3035=OY |
91. Address line 6 = 92. Postal code 93. City |
CH |
9 23 |
17 |
NAD-3251(Postal code) + NAD-3164(City) |
NAD/3035=BY exists and not SG13/3035 = OY |
94. Country code | CH | 3 | 17 | NAD-3207 |
If NAD/3035=BY and not SG13/3035=OY |
95. Telephone number | CH | 20 | 17 | Not filled | |
96. Fax number | CH | 20 | 17 | Not filled | |
97. Email address | CH | 50 | 19 | FTX-C108/4440 (1 per occurrence) and Substring "(at)" must be replaced by @ |
If NAD/3035=BY exists and If FTX-4451=CTA and FTX-C107/4441=EM |
98. Correspondent Name | CH | 35 | 17 | RFF-C506/1154 |
If NAD/3035=BY exists and If RFF-C506/1153=CTA |
Invoice Record
Description | Data Type | Length | Group source | Source | Logic |
---|---|---|---|---|---|
99. Record ID | CH | 2 | Forced with FA in ADF | ||
100. Reserved | CH | 2 | 17 | ||
101. Customer Invoice Number | CH | 20 | 17 |
RFF - C506/1154 (truncated to 20 char.) else blank |
If C506/1153 = ALK |
102. Supplier Invoice Number | CH | 20 | 17 | DOC - C503/1004 (truncated to 20 char.) If it isn't the customer invoice number) Else blank | |
103. Currency | CH | 3 | 17 | MOA C516/6345 | |
104. Invoice amount | CH | 15 | 17 | MOA C516/5004 |
If C516/5025 = 12 |
105. Sign | CH | 1 | 17 |
Forced with + If DOC-C002/1001= 380 Forced with - If DOC-C002/1001= 381 |
|
106. Invoice date | CH | 8 | 17 | DTM - C507/2380 |
If DTM/2005 =137 |
107. Acknowledgment Reference Number |
CH | 20 | 17 | Not filled | |
108. Invoice title | CH | 32 | 17 | DOC-C002/1000 | |
109. Branch reference number | CH | 35 | 17 | RFF - C506/1154 |
If C506/1153 =AOK (defined by the customer) |
Trailer Record
Field name | Description | Data Type | Length | Source | Logic |
---|---|---|---|---|---|
110. TOCENR | Record ID | CH | 2 | Forced with T | |
111. TOTOTMT | Total amount | N2 | 15 |
Absolute value of the sum of all invoices = sum of MOA- C516/5004 (group 17) |
If C516/5025 = 128 then MOA-C516/5004 (group 23) must be equal to absolute value of invoices (whatever way) |
112. TONBR | Total number of records | N0 | 6 |
Number of lines written in output file (counting begin and end records) |
If C270/6069 = 2 then CNT - C270/6066 must be equal to the number of lines in the input message (number of LIN segments in group 4) |
113. TOFIL1 | Reserved | CH | 15 |
Sample EDI source data
UNB+UNOB:1+35226440200046:5+1234567890123:5+040428:1620+20040428162011'
UNH+1+PAYMUL:D:96A:UN'
BGM+452+1+9'
DTM+137:20040428:102'
LIN+1'DTM+203:20040629:102'
RFF+AEK:0404280420110001'
MOA+9:30501:EUR'
FII+OR+30066109720001044530335+CMCIFRPP:25:5:+FR'
SEQ++1'
MOA+9:15001:EUR'
RFF+CR:DF-0000001199'
PAI+::Z7'FCA+14'
FII+BF+FR5130077023000000250245P32+SMCTFR2AVAL:25:5:STE MARSEILLAISE +FR'
NAD+BE+77946774500013++LABORATOIRE BIOLOGIE MEDICALE+13 RUE
FARNERIE::+VALENCE++26001+FR'
CTA+IC+:.'INP+YC7:+1:ZZA'PRC+8'
DOC+381:::1+1'MOA+12:999:EUR'
DTM+137:20040430:102'RFF+ALK:1'
RFF+AOK:TST_CAMP'RFF+CTA:.::'
NAD+BY+CZ++CROUZET AUTOMATISMES+2 RUE DOCTEUR ABEL:BP 59:+VALENCE CEDEX 09++26902+FR'
AJT+999'MOA+999:0'FTX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON. SCHNEIDER-ELECTRIC.COM+FRA'
DOC+380:::2+2'
MOA+12:1000:EUR'
DTM+137:20040430:102'\
RFF+ALK:2'RFF+AOK:TST_CAMP'
RFF+CTA:.::'NAD+BY+CZ++CROUZET AUTOMATISMES+2 RUE DOCTEUR ABEL:BP 59:+VALENCE CEDEX 09++26902+FR'
AJT+999'
MOA+999:0'
FTX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON.SCHNEIDER-ELECTRIC.COM+FRA'
DOC+380:::1+1'
MOA+12:15000:EUR'
DTM+137:20040430:102'
RFF+ALK:1'RFF+AOK:TST_CAMP'
RFF+CTA:.::'
NAD+BY+SIRET F01++FILIALE 01 CAMPAGNE+ADR1 F01:ADR2 F01:+VILLE++01010+'AJT+999'
MOA+999:0'F
TX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON.SCHNEIDER-ELECTRIC.COM+FRA'SEQ++2'
MOA+9:5500:EUR'
RFF+CR:DF-0000001200'
PAI+::Z7'FCA+14'
FII+BF+FR7613906001317060301400048+:25:5:CRCA LORIOL+FR'
NAD+BE+38482501400010++CGS PLASTIQUES SARL+ATELIER RELAIS N.4:Z-A LES
BLACHES:+LORIOL SUR DROME++26270+FR'
CTA+IC+:VCOM'
COM+TLEBRETON(AT)GNULINE.COM:EM'
INP+YC7:+1:ZZA'
PRC+8'DOC+380:::1+1'
MOA+12:2500:EUR'
DTM+137:20040430:102'
RFF+ALK:1'
RFF+AOK:TST_CAMP'RFF+CTA:VCOM::'
NAD+BY+CZ++CROUZET AUTOMATISMES+2 RUE DOCTEUR ABEL:BP 59:+VALENCE CEDEX 09++26902+FR'AJT+999'
MOA+999:0'
FTX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON.SCHNEIDER-ELECTRIC.COM+FRA'DOC+380:::2+2'
MOA+12:3000:EUR'
DTM+137:20040430:102'
RFF+ALK:2'RFF+AOK:TST_CAMP'
RFF+CTA:VCOM::'
NAD+BY+CZ++CROUZET AUTOMATISMES+2 RUE DOCTEUR ABEL:BP 59:+VALENCE CEDEX 09++26902+FR'AJT+999'
MOA+999:0'
FTX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON.SCHNEIDER-ELECTRIC.COM+FRA'SEQ++3'MOA+9:5000:EUR'
RFF+CR:DF-0000001201'
PAI+::Z7'FCA+14'
FII+BF+FR7611978000010119410301077+:25:5:FACTOCIC PARIS+FR'
NAD+BE+217++FACTOCIC PC/GESPAC LE CRES+TOUR FACTO::+PARIS LA DEFENSE
CEDEX++92988+FR'
CTA+IC+:FACTOCIC PC/GESPAC LE CRES'
COM+TLEBRETON(AT)GNULINE.COM:EM'INP+YC7:+1:ZZA'
PRC+8'
DOC+380:::1+1'
MOA+12:1000:EUR'
DTM+137:20040430:102'
RFF+ALK:1'RFF+AOK:TST_CAMP'
RFF+CTA:FACTOCIC PC/GESPAC LE CRES::'
NAD+BY+CZ++CROUZET AUTOMATISMES+2 RUE DOCTEUR ABEL:BP 59:+VALENCE CEDEX 09++26902+FR'
AJT+999'MOA+999:0'
FTX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON.SCHNEIDER-ELECTRIC.COM+FRA'
DOC+380:::2+2'
MOA+12:4500:EUR'
DTM+137:20040430:102'
RFF+ALK:2'RFF+AOK:TST_CAMP'
RFF+CTA:FACTOCIC PC/GESPAC LE CRES::'
NAD+BY+CZ++CROUZET AUTOMATISMES+2 RUE DOCTEUR ABEL:BP 59:+VALENCE CEDEX 09++26902+FR'
AJT+999'MOA+999:0'
FTX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON.SCHNEIDER-ELECTRIC.COM+FRA'
DOC+381:::3+3'
MOA+12:500:EUR'
DTM+137:20040430:102'
RFF+ALK:3'RFF+AOK:TST_CAMP'
RFF+CTA:FACTOCIC PC/GESPAC LE CRES::'
NAD+BY+CZ++CROUZET AUTOMATISMES+2 RUE DOCTEUR ABEL:BP 59:+VALENCE CEDEX 09++26902+FR'AJT+999'
MOA+999:0'
FTX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON.SCHNEIDER-ELECTRIC.COM+FRA'
SEQ++4'MOA+9:5000:EUR'
RFF+CR:DF-0000001202
'PAI+::Z7'FCA+14'
FII+BF+FR0210096001070107840958A46+:25:5:LYONNAISE DE BANQ+FR'
NAD+PE+31184268600017++LES CHARPENTIERS DE BOURGOGNE+4, RUE LAVOISIER- BP 99::+DIJON LONGVIC++21603+FR'CTA+IC+:.'
NAD+BE+DF-0000001202++LABORATOIRE BIOLOGIE MEDICALE+::++++'
COM+NON RENSEIGNE:EM'
INP+YC7:+1:ZZA'
PRC+8'DOC+380:::1+1'
MOA+12:10000:EUR'
DTM+137:20040430:102'
RFF+ALK:1'
RFF+AOK:TST_CAMP'
RFF+CTA:.::'
NAD+BY+SIRET F01++FILIALE 01 CAMPAGNE+ADR1 F01:ADR2 F01:+VILLE++01010+'
AJT+999'MOA+999:0'
FTX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON.SCHNEIDER-ELECTRIC.COM+FRA'
DOC+381:::2+2'MOA+12:5000:EUR'
DTM+137:20040430:102'
RFF+ALK:2'RFF+AOK:TST_CAMP'
RFF+CTA:.::'
NAD+BY+SIRET F01++FILIALE 01 CAMPAGNE+ADR1 F01:ADR2 F01:+VILLE++01010+'AJT+999'
MOA+999:0'
FTX+COM++EM::+THIERRY.LEBRETON(AT)FR.NON.SCHNEIDER-ELECTRIC.COM+FRA'
CNT+2:1'
UNT+154+1'
UNZ+1+20040428162011'
Sample Record Oriented Data (Records are Truncated):
H REMFACA30066109720001044530335200404280000000000000000 EUR040428042FO77946774500013 LABORATOIRE BIOLOGIE MEDICALE LABORATOIRE
EC 20040629P COM
FICZ CROUZET AUTOMATISMES 2 RUE DOCTE
FA 1 1 EUR000000000099900-200404301
FICZ CROUZET AUTOMATISMES 2 RUE DOCTE
FA 2 2 EUR000000000100000+200404302
FISIRET F01 FILIALE 01 CAMPAGNE ADR1 F01
FA 1 1 EUR000000001500000+200404301
FO38482501400010 CGS PLASTIQUES SARL CGS PLASTIQU
EC 20040629P COM
FICZ CROUZET AUTOMATISMES 2 RUE DOCTE
FA 1 1 EUR000000000250000+200404301
FICZ CROUZET AUTOMATISMES 2 RUE DOCTE
FA 2 2 EUR000000000300000+200404302
FO217 FACTOCIC PC/GESPAC LE CRES FACTOCIC PC/
EC 20040629P COM
FICZ CROUZET AUTOMATISMES 2 RUE DOCTE
FA 1 1 EUR000000000100000+200404301
FICZ CROUZET AUTOMATISMES 2 RUE DOCTE
FA 2 2 EUR000000000450000+200404302
FICZ CROUZET AUTOMATISMES 2 RUE DOCTE
FA 3 3 EUR000000000050000-200404303
FO3118426860001 LES CHARPENTIERS DE BOURGOGNE LES CHARPENT
BEDF-0000001202 LABORATOIRE BIOLOGIE MEDICALE
EC 20040629P COM
FISIRET F01 FILIALE 01 CAMPAGNE ADR1 F01
FA 1 1 EUR000000001000000+200404301
FISIRET F01 FILIALE 01 CAMPAGNE ADR1 F01
FA 2 2 EUR000000000500000-200404302
T 000000004349900000031
Sample mapping commands
The following sample mapping commands listed by reference number in the mapping worksheet under the Description colunm or Field name column (Trailer Record only).
Example #6:
6. Transmitting bank account number CH 23 6 FII - C078/3194 If FII/3035=OR
If (StrCompN (\Table 1\70 C FII Loop\70 C FII\1 M 3035\\, "OR", 2) = 0)
\HDR_REC\TRANS_BANK\ACCT\\ = \Table 1\70 C FII Loop\70 C FII\2 C C078\1 C 3194\\
EndIf
Example #16:
16. Supplier number CH 32 13 NAD-C080/3036 (truncated to 32 char.)
NAD/3035=PE If exists else use NAD/3035=BE
*** Since this has an else and it is possible to get both NAD loops a Local Variable can be usefull
Create a Local Variable SupplierNumber with scope Document Character and length 32
Qualify (StrComp (\Table 1\100 C NAD Loop\100 C NAD\1 M 3035\\, "PE") EQ 0)
Qualify (StrComp (\Table 1\100 C NAD Loop\100 C NAD\1 M 3035\\, "BE") EQ 0)
SupplierNumber = SubString (\Table 1\100 C NAD Loop\100 C NAD\4 C C080\1 M 3036\\, 1, 32)
\SUPPLIER_REC\SUPPLIER_NUM\\ = SupplierNumber
If (IsEmpty (SupplierNumber))
SupplierNumber = SubString (\Table 1\100 C NAD Loop\100 C NAD\4 C C080\1 M 3036\\, 1, 32)
\SUPPLIER_REC\SUPPLIER_NUM\\ = SupplierNumber
EndIf
Example #64
64. Address line 6 =
65. Postal code
66. City
NAD-3251(Postal code) + NAD-3164(City) NAD/3035=OY exists
Qualify (StrComp (\Table 1\100 C NAD Loop\100 C NAD\1 M 3035\\, "OY") EQ 0)
\CLIENT_TRANS_REC\ADDR_6\\ = Concat (\Table 1\100 C NAD Loop\100 C NAD\8 C 3251\\,
\Table 1\100 C NAD Loop\100 C NAD\6 C 3164\\)
Example #71
71. Email address CH 50 13 COM-C076/3148 Substring "(at)" must be replaced by @ If
NAD/3035=OY and If COM/3155=EM
*** Add Local Variable email scope document, character length 50.
*** Add Local Variable Position scope document, real initial value 0.
If (StrCompN (\Table 1\100 C NAD Loop\120 C COM\1 M C076\2 M 3155\\, "EM", 3) = 0)
Position = Find (\Table 1\100 C NAD Loop\120 C COM\1 M C076\1 M 3148\\, "(at)", 1)
If (Position > 0)
email = SubString (\Table 1\100 C NAD Loop\120 C COM\1 M C076\1 M 3148\\, 1, Position)
email = Concat (email, '@')
email = Concat (email, SubString (\Table 1\100 C NAD Loop\120 C COM\1 M C076\1 M 3148\\, Position+4))
Else
email = \Table 1\100 C NAD Loop\120 C COM\1 M C076\1 M 3148\\
EndIf
\Client_TRANS_REC\EMAIL\\ = email
EndIf
Example #112
112. TONBR Total number of records N0 6 Number of lines written in output file (counting begin and end records)
If C270/6069 = 2 then CNT - C270/6066 must be equal to the number of lines in the input message (number of LIN segments in group 4)
*** Create a Local Variable LINCount Scope Document Integer with initial value 0
Under the LIN Loop or Segment:
LINCount = LINCount + 1
If (\Table 1\860 C CNT\1 M C270\2 M 6066\\ != LINCount)
Error (1, 5001, "Control Value and Line Item Count do not match")
EndIf